mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Allow bespoke flipper configurations and output spin state in PolarizationCorrectionWildes

Open rbauststfc opened this issue 2 years ago • 1 comments

The PolarizationCorrectionWildes algorithm takes one of six possible flipper configurations, which map to the order of the workspaces in the input workspace group. POLREF currently have a flipper setup that is different to the full flipper configuration ('00, 01, 10, 11') taken by the algorithm. This means they would currently need to re-order the workspaces in the group before calling the algorithm, which is not convenient. They would like to be able to pass in a bespoke flipper configuration to the algorithm. This greater flexibility would be good for future-proofing the algorithm too.

We've also been asked to make it possible to define the order of the workspaces in the output workspace group. This is because analysis software accepts data in different orders and so it would be more convenient to be able to define the required output order than have to re-order afterwards.

The following should be needed to implement this:

  • [x] Bespoke flipper configurations - we need to consider backwards compatibility. I think the existing property could take different flipper configurations if we change the validation. We may also need to update parseFlipperSetup. We will need to extend the logic in the exec method that checks if there's an analyser, as I don't think it will currently handle a reverse of the no analyser configuration. Otherwise I don't think any further changes should be required.
  • [ ] Output workspace ordering - we need to add a new parameter called SpinStateOrder or similar (you input flipper configurations but then output spin states). We may be able to extend/re-use some of the parsing and validation that was written for the bespoke flipper configuration, although the user will need to pass in either '++, --' or 'pp, mm' etc. here (I'd recommend trying to use the first format for consistency with the documentation, depending on what can be supported). We will need to re-write the groupOutput method to support bespoke ordering of the output workspace group.
  • [ ] Ensure algorithm documentation is fully up to date with all changes.
  • [ ] PolarizationCorrectionWildes can be called via PolarizationEfficiencyCor, so PolarizationEfficiencyCor and it's documentation will need to be updated to support these changes.

Exposing the extra fields in the Reflectometry GUI will be covered separately under issue #37617.

rbauststfc avatar Jan 24 '23 09:01 rbauststfc