usnistgov / PyHyperScattering

Tools for hyperspectral x-ray and neutron scattering data loading, reduction, slicing, and visualization.
Other
8 stars 9 forks source link

feat: support tiff format Nika masks in Integrators #11

Closed pbeaucage closed 3 years ago

pbeaucage commented 3 years ago

Oversight: most people with existing RSoXS workflows are using @EliotGann's fork which doesn't write masks as hdf5 but rather tiffs. Need to tweak PFGeneralIntegrator.loadNikaMask to accept a tiff or hdf5, after checking that the tiff orientation matches the hdf5 orientation.

Thanks to @cbishop4 for pointing this out.

pbeaucage commented 3 years ago

@cbishop4 had an error where a Path was failing on the path format specifier. Need to explicitly cast to string before doing the 'if h5 in ...' logic.

pbeaucage commented 3 years ago

Also, mask orientation continues to be problematic. May be tied to the "invert 0,0" corner option in Nika. Perhaps have an option to flip the mask, or a set of options.