Hi Delnia,
The --mask flag in ts_aretomo tells WarpTools to apply per-tilt masks when building the image stacks that get passed to AreTomo2 for alignment.
These masks come from the BoxNet neural network step during frame series processing. If you ran BoxNet on your frame series (the "pick particle" / masking option), it creates a binary mask for each micrograph that marks "dirt" regions -- things like ice contamination, carbon edges, gold bead residue, or other artifacts.
When you enable --mask in ts_aretomo, for each tilt image:
1. The corresponding BoxNet mask is loaded and rescaled to the stack's pixel size.
2. Connected components in the mask are identified (i.e. individual dirt patches).
3. For each patch, the mean and standard deviation of the surrounding (non-masked) pixel intensities are calculated.
4. The masked pixels are replaced with Gaussian random noise matching those local statistics, with a soft edge to blend smoothly into the surrounding image.
The result is that artifacts are replaced with featureless noise that won't confuse AreTomo's alignment procedure. This can improve tilt series alignment quality when your images contain contamination or other high-contrast features that would otherwise dominate the cross-correlation.
For this flag to work, you need to have BoxNet masking results from the frame series processing step. If no mask files exist for a given tilt, that tilt is simply left unmodified.
— Warp Bot
THIS IS AN AUTOMATED MESSAGE GENERATED BY AN LLM. IT MAY OR MAY NOT SOLVE YOUR PROBLEM. IF YOU'D LIKE TO SPEAK TO A HUMAN, SAY SO IN YOUR MESSAGE.