You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"ValueError: in1 and in2 should have the same dimensionality" error is thrown when "is_volume=True" when running Filter.DeconvolvePSF. Function works correctly when is_volume = False
Filtering images using Filter.GaussianHighPass(is_volume=True) prior to deconvolution does not throw the same error.
Image stack that is being processing is 1 FOV, 8 rounds, 2 color, 3 zplanes.
Description
"ValueError: in1 and in2 should have the same dimensionality" error is thrown when "is_volume=True" when running Filter.DeconvolvePSF. Function works correctly when is_volume = False
Filtering images using Filter.GaussianHighPass(is_volume=True) prior to deconvolution does not throw the same error.
Image stack that is being processing is 1 FOV, 8 rounds, 2 color, 3 zplanes.
Steps/Code to Reproduce
from starfish import FieldOfView
imgs = experiment[current_fov].get_image(FieldOfView.PRIMARY_IMAGES)
print("Images loaded")
print(imgs)
#apply transforms
warp = ApplyTransform.Warp()
warp.run(imgs, transforms_list=transforms_list, in_place=True)
print("Images warped")
if imgs.num_zplanes > 1: vol = True
else: vol=False
#Apply filters
ghp = Filter.GaussianHighPass(sigma=2, is_volume=vol)
ghp.run(imgs, verbose=True, in_place=True)
print("High passed")
from starfish.types import Levels
dpsf = Filter.DeconvolvePSF(num_iter=15, sigma=2, level_method=Levels.SCALE_SATURATED_BY_CHUNK, is_volume=vol)
dpsf.run(imgs, verbose=True, in_place=True)*
print("Deconvolved")
glp = Filter.GaussianLowPass(sigma=1, is_volume=vol)
glp.run(imgs, in_place=True, verbose=True)
print("low passed")
Error occurs at *
Expected Results
10%|█ | 5/48 [00:00<00:01, 36.92it/s]Images loaded
<starfish.ImageStack (r: 8, c: 2, z: 3, y: 2048, x: 2048)>
100%|██████████| 48/48 [00:00<00:00, 79.02it/s]
Images warped
100%|██████████| 16/16 [00:00<00:00, 1336.78it/s]
High passed
100%|██████████| 16/16 [00:00<00:00, 3007.70it/s]
Deconvolved
100%|██████████| 16/16 [00:00<00:00, 1458.32it/s]
low passed
Actual Results
10%|█ | 5/48 [00:00<00:01, 36.92it/s]Images loaded
<starfish.ImageStack (r: 8, c: 2, z: 3, y: 2048, x: 2048)>
100%|██████████| 48/48 [00:00<00:00, 79.02it/s]
Images warped
100%|██████████| 16/16 [00:00<00:00, 1336.78it/s]
High passed
100%|██████████| 16/16 [00:00<00:00, 1145.81it/s]
File "\20201020_starfish_workflow_3_errorid_z_norm.py", line 1233, in
dpsf.run(imgs, verbose=True, in_place=True)
File "starfish\core\pipeline\algorithmbase.py", line 23, in helper
result = func(*args, **kwargs)
File "starfish\core\image\Filter\richardson_lucy_deconvolution.py", line 210, in run
level_method=self.level_method,
File "starfish\core\imagestack\imagestack.py", line 862, in apply
**kwargs)
File "starfish\core\imagestack\imagestack.py", line 949, in transform
return list(zip(results, selectors))
File "concurrent\futures_base.py", line 598, in result_iterator
yield fs.pop().result()
File "concurrent\futures_base.py", line 435, in result
return self.__get_result()
File "concurrent\futures_base.py", line 384, in __get_result
raise self._exception
File "concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "starfish\core\imagestack\imagestack.py", line 964, in _processing_workflow
return worker_callable(sliced, *args, **kwargs) # type: ignore
File "starfish\core\imagestack\imagestack.py", line 880, in _in_place_apply
result = apply_func(data, *args, **kwargs)
File "starfish\core\image\Filter\richardson_lucy_deconvolution.py", line 158, in _richardson_lucy_deconv
x = convolve_method(im_deconv, psf, 'same')
File "scipy\signal\signaltools.py", line 525, in fftconvolve
raise ValueError("in1 and in2 should have the same dimensionality")
ValueError: in1 and in2 should have the same dimensionality
Versions
Windows-10-10.0.19041-SP0
Python 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:11:50) [MSC v.1916 64 bit (AMD64)]
NumPy 1.19.0
SciPy 1.5.1
scikit-image 0.15.0
pandas 1.0.5
sklearn 0.23.1
xarray 0.16.0
sympy 1.6.1
starfish 0.2.1
The text was updated successfully, but these errors were encountered: