usnistgov / PyHyperScattering

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

integrateImageStack energy index error #108

Open cbishop4 opened 10 months ago

cbishop4 commented 10 months ago

When using integrateImageStack on a loaded series that was stacked along 'polarization', I get the following error:

File ~/PyHyperScattering/src/PyHyperScattering/PFEnergySeriesIntegrator.py:60, in PFEnergySeriesIntegrator.integrateSingleImage(self, img) 58 if n == 'energy': 59 idx_of_energy = i ---> 60 en = float(getattr(img,multiindex_name).values[idx_of_energy][0]) 61 except KeyError: 62 pass

IndexError: index 1 is out of bounds for axis 0 with size 1

This is specifically happening with scans 39911, 39912, 39913, and 39914, from cycle 2022-2.

pbeaucage commented 10 months ago

Are these energy+polarization scans, or just pure polarization scans?

cbishop4 commented 10 months ago

Energy+polarization, I think I should be able to quick fix it and push the changes this afternoon (unless you're about to tell me something I'm missing)