Masking bug during local refinement


It seems as though local refinement is ignoring user-supplied masking parameters in all iterations after the initial one (see screenshot below).

In this run, to exaggerate the effect, I have set the dynamic mask initial at 0 and the dynamic mask final at 20 Å. You can see that in the first (0th) iteration, the very fuzzy mask is correctly applied. In all subsequent iterations, the mask applied appears to be very sharp - almost binary, even though the dynamic mask sections look as one would expect given the supplied params.


(here, I have set “enforce non-negativity” to false, to make the bug more apparent, but it is also present using defaults)

The odd thing is, this is happening on one of my GPU workstations, but not the other, even though both have been updated to 2.14. On the GPU where it is an issue, varying the softness of the initial input mask has no effect - I still see these sharp mask edges in later iterations.

Hi @olibclarke, this is very strange… nothing has changed (as far as we can tell) in local refinement in the last couple versions.

PS I’m hoping to free up some time to focus on the various local refinement issues/improvements that are pending!

1 Like

Thanks @apunjani - I don’t think it necessarily popped up in this version, I just noticed it now, when using very soft masking params. And actually I now see it on both my GPUs, but not for every dataset - if there is any info I can provide that would be helpful to debug, please let me know.


Ah - a clue - it only seems to happen when non-uniform refinement is switched on in local refinement - e.g. here, using EMPIAR 100288 as a test case, with and without NU, same input mask:

Here, iteration 1 with NU on vs off - you can see the funky hard edged artefacts when NU is on:

I suspect the same might be happening in “normal” NU refine based on comparison with homogeneous, but can’t confirm because I can’t see the masked maps in that case

This bug is still present @apunjani - it really becomes a problem when using smaller masks. Have you been able to reproduce and/or identify the cause?

The weird thing is that when I download the refinement mask from that iteration it looks fine, but the masked volumes seem to have been masked with a binary mask (and show consequent ringing near the mask edges)…

Hi @olibclarke,

We’re looking into this bug – it should be fixed in an upcoming change to local refinement!



Hi @mmclean is there any timeline as to when this bug might be fixed?

Hi @olibclarke,

This issue will be fixed in the next release, v3.0, for Local Refinement.

Best, Michael

1 Like

Fantastic news thank you Michael, look forward to trying it!