Static mask during local refinement

Hello. I would like to use static mask for local refinement, however, when I set the mask to static, the mask was still dynamic. I tried to remove the 3 parameters for dynamic mask (Dynamic mask threshold, Dynamic mask near, Dynamic mask far), however, this is illegal and the job refused to run. How can I properly set the mask to static?

Thank you very much,
Chen

Hello @chenzhao,

Unfortunately, static masking is not currently implemented in local refinement yet and indeed the mask does default to dynamic regardless of the mask type parameter passed. This is something we are working on fixing in the future, as it may be useful in cases where dynamic masking produces strange or unstable results. Apologies for this!

Best regards,
Michael

Hi Michael,

Thank you for the information! I am looking forward!

Best,
Chen

Doesn’t it use the static mask, but threshold it at 1 and then add configured the edge to that?

Currently, the masking behaviour in local refinement is that

  • The initial mask slices shown at the start of the job stream log are identical to the mask that is provided to the job (aside from them being shifted to have an origin at the fulcrum)
  • For each refinement iteration, the actual mask that is used to compute the volumes for alignment is generated by multiplying the current volume with the initial mask, thresholding this using the threshold factor, and dilating using the near and far parameters. This mask is displayed at each iteration in the stream log in the “Real Space Mask Slices Iteration x”.

This behaviour is always the case, so in particular passing ‘static’ to the mask type will still follow this behaviour, which is different from how static masking works in other jobs like new homogeneous refinement for example. In any case, the mask is dynamically updated each iteration using the current volume – but we plan on adding the option for true static masks that don’t change each iteration to future versions of local refinement.

Best,
Michael

Great, thanks for the detailed explanation.

That means that a work-around to control the mask should be: 1) provide a mask, 2) set the dynamic mask threshold to 1, and then 3) set the near distance (where soft edge begins to decay) and far distance (where soft edge reaches zero) to mimic your initial mask. I’ll give this a test today.

3 Likes

any update on this test @DanielAsarnow

Quite late to post on this thread, perhaps, but @DanielAsarnow 's approach seems to work. A correction to his post would be that dynamic mask threshold should instead be set to something very small (I used 0.001). For local refinement of small flexible domains, I noticed this “static” masking approach helped a bit with alignments.

Hi @mmclean ,
I am using version v3.3.1+220215, I was wondering if the masking in local refinement is still static in the local refinement?
Thanks

Hi @Man_at_Work,

Local refinement (the non-legacy version) uses static masking by default as it is now the recommended option due to the tendency of dynamic masking to promote overfitting. However, dynamic masking can be activated by setting the “Mask (dynamic, static, null)” parameter to dynamic. You can check out the event log to look for the message “Static masking was enabled” or “Dynamic masking will be enabled”.

Best,
Michael

2 Likes