Ticket #9891 (closed: fixed)
A FitMD and/or fit for 1D or 2D matrix workspaces shoule be able to produce a workspace with fitting function values
Reported by: | Alex Buts | Owned by: | Roman Tolchenov |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Alex Buts |
Description
At the moment Fit (1D) invoked with 0 fitting count produces a workspace with the spectra, containing fitting function values. This is good approach for 1D fitting, but one trying N>=2D fitting should have possibility to view fitting function first. The current approach does not scale to more then 1 dimensions
An algorithm or wrapper around Fit algorithm, which return the workspace with fit function values at parameters, specified as input to the fit algorithm is necessary.
Attachments
Change History
comment:2 Changed 6 years ago by Alex Buts
1D approach creates workspace with 3 spectra, were X-vector has X-values from input workspace and 3 Y-spectra vectors have: 1) initial data , 2) fitting function values in points X 3) difference between 1 and 2 in points X
(it seems when function is composite , more spectra with particular function values are added.)
2D workspace already have number of spectra, so additional dimension is necessary to add data from points 2 and 3.
The suggestion is to create additional workspace for data specified by 2). Item 3) can be calculated if necessary by minus operation.
comment:4 Changed 6 years ago by Roman Tolchenov
- Status changed from assigned to inprogress
Re #9891. Added EvaluateMDFunction algorithm.
Changeset: efaaa4d20cfa61c74b6638ac2b0341f9ae597f55
comment:5 Changed 6 years ago by Roman Tolchenov
Re #9891. Unit test.
Changeset: 70488cda54504854ce43343e563f58f1b860d2a0
comment:6 Changed 6 years ago by Roman Tolchenov
Re #9891. Output a histo workspace from FitMD.
Changeset: c552656ffd5b07f275bd0193eecf1e9dc29228e0
comment:7 Changed 6 years ago by Roman Tolchenov
Re #9891. Fixing the builds.
Changeset: 9253100b69aa153f9fce27c35e562dc0f38db57a
comment:8 Changed 6 years ago by Roman Tolchenov
Re #9891. Fix doxygen warning.
Changeset: c86c4b58d3f870ec5ff4b207edbee9a21958889e
comment:9 Changed 6 years ago by Roman Tolchenov
Re #9891. Set all fitting errors to 1.0
Changeset: 8ee0e902480f309b87b23c21c6f445aafca08dd7
comment:10 Changed 6 years ago by Roman Tolchenov
- Status changed from inprogress to verify
- Resolution set to fixed
To test
- Load the attached file.
- Run the following script:
fun='name=UserFunctionMD,Formula=a*exp(-(sqrt((x)^2+(z-2.16)^2)-0.45)^2*(s)),a=40000,s=10' ws = 'Slice' Fit(fun,ws,MaxIterations=10,Output='out')
- Check that there is out_Workspace workspace and it has the same structure as Slice.
comment:11 Changed 6 years ago by Alex Buts
- Status changed from verify to verifying
- Tester set to Alex Buts
comment:12 Changed 6 years ago by Alex Buts
- Status changed from verifying to reopened
- Resolution fixed deleted
There are some uncertainties about the functions produced worth look into
comment:13 Changed 6 years ago by Roman Tolchenov
- Status changed from reopened to verify
- Resolution set to fixed
It works fine on my machine (windows and linux).
comment:15 Changed 6 years ago by Alex Buts
All discrepancies have mysteriously disappeared.
Weird. And fitting itself does not work, though the calculated function looks correct. Fitting would be the topic for another ticket.
comment:16 Changed 6 years ago by Alex Buts
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/9891_fit_output_md_workspace'
Full changeset: d3a798f289dee8b6f6dcf81791b1404e87590f13
comment:17 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10733
Perhaps I'm missing something here, why does the 1D approach not work for higher dimensions?