diff --git a/droplet_growth/register.py b/droplet_growth/register.py index 8634ba25ea4e1d9e1fa1df278ccfd833289e191c..4bbffd2414e455dd44a303d423f80d9127752e5c 100644 --- a/droplet_growth/register.py +++ b/droplet_growth/register.py @@ -87,12 +87,12 @@ def align_stack(data_or_path, template16, mask2, plot=False, path=None, binnings aligned_stack = np.stack((aligned_bf, aligned_tritc, mask2)).astype('uint16') - imwrite((p:="".join((*path.split('.')[:-1] , suffix))), aligned_stack, imagej=True, metadata=META_ALIGNED) + imwrite((p:=path.replace('.nd2', suffix)), aligned_stack, imagej=True, metadata=META_ALIGNED) print(f'Saved aligned stack {p}') return aligned_stack -def align_stack_nd(stack, template16, mask2, path=None, plot=False, binnings=(1,16,2), suffix='.aligned.tif') -> (np.ndarray, dict): +def align_stack_nd(stack, template16, mask2, path=None, plot=False, binnings=(1,16,2), suffix='.aligned.tif') -> Tuple[np.ndarray, dict]: ''' stack should contain two channels: bright field and fluorescence. BF will be binned 8 times and registered with template8 (aligned BF).