Open jl-wynen opened 7 months ago
Here is my (incomplete) idea to finally resolve the problem of finding the stitching parameters. Using the chopper cascade seems troublesome currently, so let us try calibration via a sample with known peak positions.
Approach:
time_offset = tof + t_{0,i}
for subframe i
.
4.t_{0,i}
is basically the center of a PSC opening. We know the opening angle and rotation speed, so defining open and close times is now simple. I think this is essentially a single "virtual" chopper, even if there are 2 choppers in practice.scippneutron.tof.chopper_cascade
to compute subframe bounds at all detector positions. ~This does not require any other choppers, I think?~ ... but we still somehow need params for the other choppers. No idea yet how to solve that.The stitching code itself is now part of ScippNeutron (to be released), see scippneutron.tof.unwrap.to_time_of_flight. There is also scippneutron.tof.unwrap.time_of_flight_origin_wfm_from_chopper but it is unclear/questionable if this will be used in practice for defining the subframe bounds.
Executive summary
Perform WFM stitching of 2 frames of DREAM instrument
Context and background knowledge
Example plots on confluence: https://confluence.esss.lu.se/display/DAM/DREAM+-+WFM+stitching
References
DREAM specs:
DREAM instrument proposal (page 22)
WFM:
https://www.sciencedirect.com/science/article/abs/pii/S0168900213002386?via%3Dihub https://www.sciencedirect.com/science/article/abs/pii/S0168900220308640?via%3Dihub https://www.sciencedirect.com/science/article/abs/pii/S0168900212016142?via%3Dihub
Environment
This method will be used to reduce data detected by the mantle.
If csv files are used as inputs, choppers' settings have to be hard-coded or manually enterered by the users or read by a sort of characterisation file.
When ESS NeXus files will be used, these settings will be read from the metadata stored in the file.
Preconditions
Inputs
Scipp data structure (for mantle detector)
Methodology
WFM stitching has to be performed early in the reduction process for data collected by the mantle, i.e., after loading the relevant files.
Outputs
Scipp dataArray with same structure as input but with data stitched
Which interfaces are required?
Python module / function
Test cases
data_dream_HF_mil_closed_alldets_1e9.csv.zip shared on owncloud (this file was generated using mantle, endcap backward and forward and high resolution detectors)
Acceptance Criteria
Multidimensional (3, 2 and 1 D) data collected by mantle detector is stitched
Comments
Depends on https://github.com/scipp/scippneutron/pull/472