Add polarisation spin state to ISIS ORSO file metadata #36685
Labels
ISIS Team: LSS
Issue and pull requests managed by the LSS subteam at ISIS
Reflectometry
Issues and pull requests related to reflectometry
Milestone
For POLREF data, we need to identify which spin state is being saved by populating the
measurement->instrument_settings->polarization
metadata in the header of the ISIS ORSO file that's produced bySaveISISReflectometryORSO
. For example, in the.ort
ASCII file you would see:We should also include the spin state in the dataset name. Currently, for data from workspace groups we're including the workspace name and incident angle in the dataset name to avoid generating duplicates, i.e.
# data_set: ws_grp_name_1 0.5
.This should be changed so that workspace groups for polarised data use the incident angle and spin state (instead of the workspace name) to uniquely identify each dataset. This would appear as follows in the file:
# data_set: 0.5 po
We should use the following notation in the ORSO file to identify the spin state:
po
ormo
pp
,pm
,mp
ormm
Eventually there would be an ANR (with only the analyser) case, however we don't currently support ANR reduction in Mantid, so this is out of scope of this issue.
To identify the spin state of a workspace in the
SaveISISReflectometryORSO
algorithm, I think the most reliable approach would be for polarisation correction algorithmsPolarizationCorrectionWildes
andPolarizationCorrectionFredrikze
to add an entry to the sample log that provides this information for each child workspace in the input group.Our scientists have expressed a preference that we use the ORSO notation in our sample log. The two correction algorithms use different notation for parallel and anti-parallel:
PolarizationCorrectionWildes
: we should set the spin state in the sample log from the name of the output workspace. For example, the Wildes++
output workspace would be spin statepp
,+-
would bepm
,-+
would bemp
and--
would bemm
. It's important to set the spin state based on the output workspace name rather than the input flipper configuration as the Wildes flipper configuration does not tell us the spin state, it just tells us which flippers are on or off on the instrument. An instrument can be set up for cross-polarization, which would mean the flipper configurations correspond to different input spin states than they would normally. Regardless of the instrument setup, the maths in the calculation handles this automatically so that the final outputs are labelled with their correct spin state.PolarizationCorrectionFredrikze
: subscriptspp, pa, ap, aa
are used for the input measurements and corrected outputs. Thep
represents parallel anda
represents anti-parallel, so here we are passing in the spin states directly and no further information is needed about the instrument setup. Therefore, we should again set the spin state in the sample log from the name of the output workspaces as follows:pp
workspace will be spin statepp
, outputpa
is spin statepm
, outputap
is spin statemp
, outputaa
is spin statemm
.p
workspace will be spin statepo
, outputa
is spin statemo
.I have opened the following issues to handle adding the spin state to the output workspaces produced by the correction algorithms:
The text was updated successfully, but these errors were encountered: