hdf5 conversion fails
martinschorb opened this issue · comments
Hi got a new one while downsampling this file:
https://oc.embl.de/index.php/s/yOYootw12pbPlVw
File "<ipython-input-7-068badfec019>", line 125, in write_bdv
overwrite = False)
File "c:\users\schorb\documents\pybdv-master\pybdv-master\pybdv\converter.py", line 364, in make_bdv
overwrite=overwrite_)
File "c:\users\schorb\documents\pybdv-master\pybdv-master\pybdv\converter.py", line 154, in make_scales
overwrite=overwrite)
File "c:\users\schorb\documents\pybdv-master\pybdv-master\pybdv\downsample.py", line 65, in downsample
compression='gzip', dtype=ds_in.dtype)
File "C:\Software\Anaconda3\envs\pyEM\lib\site-packages\h5py\_hl\group.py", line 136, in create_dataset
dsid = dataset.make_new_dset(self, shape, dtype, data, **kwds)
File "C:\Software\Anaconda3\envs\pyEM\lib\site-packages\h5py\_hl\dataset.py", line 140, in make_new_dset
maxshape, scaleoffset, external)
File "C:\Software\Anaconda3\envs\pyEM\lib\site-packages\h5py\_hl\filters.py", line 212, in fill_dcpl
plist.set_chunk(chunks)
File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5p.pyx", line 430, in h5py.h5p.PropDCID.set_chunk
ValueError: All chunk dimensions must be positive (all chunk dimensions must be positive)
This file has run before...
Is it maybe related to the 2D issue? I am still providing the data with empty 3rd axis.
This file has run before...
Is it maybe related to the 2D issue? I am still providing the data with empty 3rd axis.
Yes, I think that is 2D related. How are you specifying the downsampling factors?
I think you need to give it a 1 in the axis you have inflated, e.g.
scale_factors = [[1, 2, 2], [1, 2, 2]]
if you add the singleton axis in front.
That's what I do for all my data anyway...
downscale_factors = ([1,2,2],[1,2,2],[1,2,2],[1,4,4])
Ok, I think I know what the issue is. I will try to fix it later and let you know.
Fixed in 82da91c.