Skip to content

Commit

Permalink
Use MultiDomainFunction in IntegratePeaks1DProfile
Browse files Browse the repository at this point in the history
This is a squashed version of mantidproject#38515

Use MultiDomainFunction to tie peak params accross pixels

Fit only pixels I/sig > min using skew detemrined background

Have defined min I/sig in input validator as 0.5 (previously 0)

Skip peak early if not in x-range of data

Delete fit workspaces from ADS

need to be in ADS due to bug in issue mantidproject#38476

Fix bug in logic for peaks on edge

Fix typo in fit result status

Add check for any True in final fit peak mask

Update unit test I/sig values and number edge pixels

Number edge pixels changed because previously any pixels on the detector edge attempted to be fitted would be classed as "on  edge".
Here we fit a much larger number of pixels, so the condition is updated to be only the successful fits (rather than all attempted)

Fix bug in intensity estimation fixing poisson cost func test

Test was failing as initial guess was far from data - this was because hadn't mutliplied counts by bin-width when integrating

Add colorbar to plot

Add option to specify minimum number of pixels in peak (and test)

Add test for fixing peak params

Fix test for d-spacing tolerance - was not testing actual behaviour

To do this offset the simulated peaks in one of the two pixels containing the peak - when the center is free to vary (unconstrained by the DIFC ratio or user imposed limits) in the final/second fit, the same solution will be reached.
Hence the I/sig values unchanged, with one exception: I have updated the I/sig test value for Poisson fit - the final fit is still good, just slightly different.

Add constraint on FWHM to stop peak fitting background or noise

Same constraint as used in main.
Have needed to adjust I/sig of Gaussian unit test as bin-widths are quite large relative to FWHM. If you set fwhm_min -> 0.5 fwhm_min then get initial I/sig

Reduce bin-width in unit test

In limit where FWHM comparabel to bin-width (which is about to be one of post-fit checks impose)

Add post fit check on peak FWHM

And loosen constrints on FWHM by factor 2

Fix hessian error strategy unit test

Fix unit test I/sig values and fix doc test

Have increased as capturing more of the peak

Remove duplicate code for freeing/removing ties

Add release note

Update doc test value - not sure why this changed since last time...

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
  • Loading branch information
RichardWaiteSTFC authored and peterfpeterson committed Jan 17, 2025
1 parent b53674e commit 6739d05
Show file tree
Hide file tree
Showing 5 changed files with 403 additions and 310 deletions.
Loading

0 comments on commit 6739d05

Please sign in to comment.