diff --git a/src/droplet_growth/register.py b/src/droplet_growth/register.py index e8f0dca8c97ef27ed372b8a76abb36e6f993fc60..fe866b03b6ee7024cb2a758e00ceb81d78e0ff8e 100644 --- a/src/droplet_growth/register.py +++ b/src/droplet_growth/register.py @@ -26,6 +26,13 @@ META_ALIGNED = {'ImageJ': '1.53c', 'LUTs': [grey, green, blue] } +constraints={ + "scale": [1, 0.1], + "tx": [0, 150], + "ty": [0, 150], + "angle": [0, 10], +} + def align_stack(data_or_path, template16, mask2, plot=False, path_to_save=None, binnings=(1,16,2), suffix='.aligned.tif'): ''' stack should contain two channels: bright field and fluorescence. @@ -280,7 +287,7 @@ def register(image, template): ''' assert np.array_equal(image.shape, template.shape), \ f'unequal shapes {(image.shape, template.shape)}' - return reg.similarity(template, image, constraints={'scale': [1,0.2], 'tx': [0, 500], 'ty': [0, 500], 'angle': [0, 30]}) + return reg.similarity(template, image, constraints=constraints) def filter_by_fft(