usnistgov / PyHyperScattering

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

feat/bug: Update SST1 i0 correction #18

Open pdudenas opened 2 years ago

pdudenas commented 2 years ago

Some of the headerdict keys used in the correction step for the SST1 loadSingleImage function are from ALS 11.0.1.2 and don't work for SST1 data. This is part of a larger issue on normalization. To do this properly we need to read in the sample Au mesh current and a calibration scan under the same conditions.

pbeaucage commented 2 years ago

This would be really great! I think the place I would start with it would be in the Databroker loader since we have (theoretically) infinite access there to any scan (so you can just specify a scan number for the calibration). The Au mesh is pretty easy in DB as well.

EliotGann commented 2 years ago

In the future this will be much easier with a preprocessor for diode calibrations... working on that now on the acquisition side. then there will be a new stream just like the dark stream now, which just includes the calibration scan

pbeaucage commented 2 years ago

I0 correction, albeit without a i0 / diode correction term, is implemented in commit 45cdfe96 along with support for getting monitor values at all points.

pbeaucage commented 2 years ago

OK, so we have i0 now in the form of the mesh reading. The thing we really need, though, at least I think so in a mildly sleep deprived state, is to multiply the measured mesh(E,pol,slitconfig) by the ratio (diode/mesh)(E,pol,slitconfig) for an open beam diode scan so as to get the true i0.

What is the best way to get that function in? There are several good options:

@pdudenas @EliotGann