Closed ka-sarthak closed 8 months ago
A hacky fix for Brucker reader which was needed to process both 1d and rsm scans.
RawData
field in rawfile containing the measurements has different data structure for 1d and 2d scan. For 1d, it is a list of dict, where length of the list is the number of measurements. While for 2d, in each of the rawfile, it is a list of values.
The axis position has to be calculated using start, end, step-size of the axis. But this can sometimes lead to 1 extra value for the position than the number of measurement values leading to a mismatch in dimensions for intensity and axis. Resolved this by using number of MeasurementPoints
(available in the raw file) directly to calculate axis position array (which happens to be the case for 1d scan testfiles). In case, MeasurementPoints
is equal to 1 (which appears to be the case for RSM test files), use step-size
of the axis instead along with it's start and end position to determine the array of axis positions.
TODO
len(list) = n
, for 1D line scan, we havelen(list) = 1
detect_scan_type
,modify_scan_data