Skip to main content

HDF5SaveDataHookStruct

HDF5SaveDataHookStruct

The HDF5SaveDataHook structure has the following members:

MemberDescription
UInt32 versionStructure version = 1000 means "1.000".
Int32 operation
0:none (called from UI)
1:HDF5SaveData operation
2:HDF5SaveGroup operation
WAVE waveToSaveReference to the wave being saved.
Int32 gzipLevelLevel for zip compression from 0 to 9.
Int32 shuffle
0:no shuffle
1:shuffle
Int64 chunkSizes[4]Chunk size for dimensions 0, 1, 2, and 3 (rows, columns, layers, chunks)

The current structure version is 1000. If you are called with a version field greater than 1000 but less than 2000, this means that fields were added but that they default to reasonable values. If you are called with a version field 2000 or greater, this means that some incompatible change was made to the structure and your function should return 0.

If operation is 0 then the wave is being saved as a result of a user-interface actions such as File→Save Experiment or File→Save Graph Copy or the HDF5 Browser Save Waves and Save Data Folder buttons or the Data Browser Save Copy button.

If operation is 1 then the wave is being saved by a call to HDF5SaveData. If operation is 2 then the wave is being saved by a call to HDF5SaveGroup. In these cases, you should respect the compression settings specified to those operations unless there is good reason to override them.

If you do not set chunkSizes[dim] or specify chunkSizes[dim]=0, Igor uses the size of the corresponding wave dimension as the chunk size for that dimension. If you specify a chunkSizes[dim] that is greater than the number of elements in the corresponding wave dimension, Igor clips chunkSizes[dim] to that number.

If chunkSizes[dim]==DimSize(dim) for all dimensions that exist in the wave, then the wave is being saved as a single chunk. This may be because HDF5 default compression is being used or because HDF5SaveGroup was called or because HDF5SaveData was called without specifying chunk sizes. In these cases, you may want to override the chunk sizes if you have a good reason to do so.

See Using HDF5SaveDataHook for further discussion.