mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
210 stars 122 forks source link

Only Change PxD when Fitting Polarised SANS Analyser Transmission (`release-next` Special Edition) #37505

Closed cailafinn closed 3 months ago

cailafinn commented 3 months ago

Clone of #37481 for the release-next branch.

Description of work

Summary of work

Adjust the algorithm (after discussions with the scientists) to only fit the PxD parameter (explanations for why we're doing this can be found in the documentation and the issue description).

Fixes #37445 Refs #37459

Further detail of work

Note: this PR does not cover the changes to the error calculation for this algorithm. That will come later.

To test:

  1. Run the following script:
    
    CreateSampleWorkspace(OutputWorkspace='mt', Function='User Defined', UserDefinedFunction='name=LinearBackground, A0=-0.112, A1=-0.004397', XUnit='wavelength', NumBanks=1, BankPixelWidth=1, XMin=3.5, XMax=16.5, BinWidth=0.1)
    CreateSampleWorkspace(OutputWorkspace='dep', Function='User Defined', UserDefinedFunction='name=ExpDecay, Height=0.1239, Lifetime=1.338', XUnit='wavelength', NumBanks=1, BankPixelWidth=1, XMin=3.5, XMax=16.5, BinWidth=0.1)

output = DepolarizedAnalyserTransmission("dep", "mt", OutputFitCurves='out_fit')


2. Check the outputted curves and parameter look sensible (is it a good fit?)
3. Run the algorithm from the Algorithm window and check the validation is working
4. Build the docs and check they are formatted correctly. 

*This does not require release notes* because **this functionality is new to this release.**

---

### Reviewer

Please comment on the points listed below ([full description](http://developer.mantidproject.org/ReviewingAPullRequest.html)).
**Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review.** If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

#### Code Review

- Is the code of an acceptable quality?
- Does the code conform to the [coding standards](http://developer.mantidproject.org/Standards/)?
- Are the unit tests small and test the class in isolation?
- If there is GUI work does it follow the [GUI standards](http://developer.mantidproject.org/Standards/GUIStandards.html)?
- If there are changes in the release notes then do they describe the changes appropriately?
- Do the release notes conform to the [release notes guide](https://developer.mantidproject.org/Standards/ReleaseNotesGuide.html)?

#### Functional Tests

- Do changes function as described? Add comments below that describe the tests performed?
- Do the changes handle unexpected situations, e.g. bad input?
- Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as **Approve**. A member of `@mantidproject/gatekeepers` will take care of it.

### Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.