Photon-HDF5 / photon-hdf5

Photon-HDF5 Reference Documentation
http://photon-hdf5.readthedocs.io/
3 stars 3 forks source link

Specify the type of pixelID used in a file #29

Closed smXplorer closed 8 years ago

smXplorer commented 8 years ago

It would help to add a field that specifies whether the "pixel IDs" are single numbers or pairs of numbers (or something else)

tritemio commented 8 years ago

If I recall correctly, phconvert always save them as arrays of length >= 1, exactly to avoid this scalar vs array issue in some languages.

smXplorer commented 8 years ago

Yes but my concern is with two-dimensional (or n-dimensional) Pixel IDs.

tritemio commented 8 years ago

Ah, I see. That feature is not implemented yet, it is discussed in #1. My concern is that while logically it would work, having an array of a "structure" (let's say (module, pixel)) will be a compatibility nightmare.

tritemio commented 8 years ago

Actually re-reading #1, my proposal was using a normal 2D array, not an array of struct.

It still unimplemented, but each HDF5 array has an attribute declaring the shape (i.e. the size in each dimension). Is it possible in labview to read this attribute? If yes, from there you gather if it's a 1D or 2D array.

smXplorer commented 8 years ago

Regarding the last question: yes, it is possible to read the array dimension without loading the array. However, the 2D array is a specific situation (which I argued elsewhere could in fact be avoided by encoding pixel IDs on 32 bit or 64 bit integers). It has to be handled by the reading software entirely differently from the single pixel or multiple pixels with scalar ID cases In other words, the problem could be solved by limiting this option to a specific measurement_type (say, 2D_measurement_type). This would avoid adding this suggested additional field. In this case, the documentation should be modified and not mention the possibility of 2D arrays of pixel IDs in general, but only mention that it applies for specific measurement types.

tritemio commented 8 years ago

Closing this issue, let's move any discussion to the related issue #1.