From c6fbb5965c0dfa1919230e185ef1461545a91801 Mon Sep 17 00:00:00 2001 From: Andrey Aristov <aaristov@pasteur.fr> Date: Fri, 13 May 2022 16:22:53 +0200 Subject: [PATCH] update suffix --- droplet_growth/register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/droplet_growth/register.py b/droplet_growth/register.py index 8634ba2..4bbffd2 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). -- GitLab