Open mducle opened 1 year ago
Summation is not a problem though first request sounds a bit strange -- nxspe files are normalized by current (or something more advanced) so it is weighted signal which contributes to the final sqw
. And you can easy weight signals in Mantid if it is necessary (do not see why))
Currently, Horace makes the assumption that each individual
nxspe
file which is combined into asqw
is:psi
) or incident energy.Neither of these conditions necessarily pertain during experiments. Often users would run a "quick" scan over with shorter runs (perhaps 5 min per angle) in order to see a broad overview of the data and then will perhaps re-run the same angles, or with finer angular steps with longer scans (perhaps 10 min per angle). For this to work in Horace, they would need to sum the equivalent angles before input into Horace (e.g. in Mantid), or to run several runs with the same amount of time as the first set (e.g. 2 sets of 5 min run at each angle instead of a single 10 min run). Furthermore, this increases the size of the
sqw
file which is proportional to the number of contributingnxspe
files.So, it would be good if
gen_sqw
could:a. Accept an optional
weight
argument which is a length-N vector (same size aspsi
) of weights for each contributingnxspe
file. b. Check thepsi
input argument for unique values and sum togethernxspe
files withpsi
values within a tolerance (say 0.1 degrees). At present users set the values ofpsi
so could explicitly define which files should be summed, but we may move in future to reading the values ofpsi
directly from the input data files - in principle the rotation angle modulo a phase (orientation where theu
vector is parallel to the incident beam) is stored in the files already.Implementing feature (a) will require somewhat extensive changes to the internals of Horace but would probably take not more than 1-person-month (full time). One (a) is implemented, (b) should be very easy (less than 1-person-week).
Comments sought from: @abuts @tgperring @davidvoneshen @mincentatties