scitiff.concat_stdevs_and_mask_as_channels#
- scitiff.concat_stdevs_and_mask_as_channels(da, mask_name=None)[source]#
Concatenate intensities, stdevs and a mask into channel dimension.
- Parameters:
da (
DataArray) – The DataArray to retrieve stdevs and a mask. If stdevs or a mask does not exist, it will be ignored.mask_name (
Optional[str], default:None) – The name of the mask to repack as a separate channel. IfNone, it will try to find a single mask with the same size as theda. If there are multiple masks with the same size, masks will be ignored.
- Returns:
DataArray– The DataArray with thestdevsand amaskconcatenated as channels. The intensities will losevariancesand a matching mask as they are repacked and concatenated as channels. It will haveccoordinate with the size of corresponding channels.
Tip
If there are multiple masks with multi-dimensions, it cannot be saved in the
SciTiffMetadataso you will have to either make them as multiple 1D masks or remove them before saving the image.