usnistgov / PyHyperScattering

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

Integrator changes for multi-indexes on xarray >= 2022.6 #61

Closed pbeaucage closed 1 year ago

pbeaucage commented 1 year ago

Several issues came up in xarray >= 2022.6 with integration. Particularly:

Casting energy to a Pandas data frame and dropping duplicates no longer works well to generate an integrator list, so I use np.unique instead.

More importantly, when the integrator inspects the xarray's indexes object, xarray >= 2022.6 patches in a fake index label for each multiindex level, which had to be undone for our auto-stacking to work.

pbeaucage commented 1 year ago

Closing - complete.