-
Hello, I wanted to compress my data stored as I have fData_compressed = types.untyped.DataPipe( ...
'data', myData, ...
'chunkSize', [1, 512], ...
'axis', 2); Inspired by the example, I chose the chunk size such that it spans each row of my 4D matrix. I set The complete traceback is Error using hdf5lib2
The HDF5 library encountered an error and produced the following stack trace information:
H5D__chunk_construct dimensionality of chunks doesn't match the dataspace
Error in H5D.create (line 63)
id = H5ML.hdf5lib2('H5Dcreate', varargin{:} );
Error in types.untyped.datapipe.BlueprintPipe/write (line 219)
did = H5D.create(fid, fullpath, tid, sid, lcpl, dcpl, dapl);
Error in types.untyped.DataPipe/export (line 278)
obj.internal = obj.internal.write(fid, fullpath);
Error in indexing (line 297)
B = builtin('subsref', obj, S);
Error in types.core.TimeSeries/export (line 364)
refs = obj.data.export(fid, [fullpath '/data'], refs);
Error in types.core.ImageSeries/export (line 154)
refs = export@types.core.TimeSeries(obj, fid, fullpath, refs);
Error in types.core.TwoPhotonSeries/export (line 110)
refs = export@types.core.ImageSeries(obj, fid, fullpath, refs);
Error in types.untyped.Set/export (line 181)
refs = v.export(fid, propfp, refs);
Error in types.core.NWBFile/export (line 843)
refs = obj.acquisition.export(fid, [fullpath '/acquisition'], refs);
Error in NwbFile/export (line 62)
refs = export@types.core.NWBFile(obj, output_file_id, '/', {});
Error in nwbExport (line 36)
nwb(i).export(filename);
Error in sketch (line 89)
nwbExport(nwb, nwbFilePath); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @yzhaoinuw ! Great to see you are exploring the advanced writing tools! NWB does not allow you to save a TwoPhotonSeries with data shape (1, width, height, depth). It should be height x width x time or depth x height x width x time. |
Beta Was this translation helpful? Give feedback.
-
Setting the
It worked and passed the NWBInspector. The resulting compressed size is smaller than what it would be without setting the |
Beta Was this translation helpful? Give feedback.
Setting the
chunkSize
to [1,width
,height
, 1] works. Using a concrete example, suppose the dimension of myTwoPhotonSeries
data is [1, 512, 512, 131]. Then, thechunkSize
can be [1, 512, 512, 1]. Credits to ChatGPT, who further explains thatIt worked and passed the NWBInspector. The resulting compressed size is smaller than what it would be without setting the
chunkSize