Ticket #1308 (closed: fixed)
Handle units in return types of functions + lookups for parameters
Reported by: | Nick Draper | Owned by: | Anders Markvardsen |
---|---|---|---|
Priority: | critical | Milestone: | Iteration 24 |
Component: | Keywords: | ||
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description
Add a result_unit parameter to the xml and if it is specified then we need to use it and the ConvertUnits code to convert the value through to the fitting unit.
we need to be able to handle these at least
- TOF and other units
- 1/TOF
Posibilities
- possibly use muparser to evaulate the math string, but first work out the conversion factor between the base units. That way we should even be able to handle 1/(TOF)2
- Handle the parsing yourself (not as good).
Change History
comment:12 Changed 10 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:14 Changed 10 years ago by Martyn Gigg
- Status changed from verifying to reopened
- Resolution fixed deleted
comment:16 Changed 10 years ago by Anders Markvardsen
(In [5931]) Added unit to parameters for IkedaCarpenter function in GEM_Definition.xml.
Note that unit conversion is a bit more complicated for this function because we in that function calculate lambda values for each x-axis values. Hence in specifying the units for the IC parameters I have ignored units that refers to this lambda. This applies to two parameters. The true unit of Kappa is 1/[dSpacing2] however it is treated as dimensionless. The true unit of alpha1 is [TOF/dSpacing] however treated as it has unit TOF....
Tested that I could fit IC function for a peak in workspace index 1 of Test/Nexus/focussedGEM38370_TOF.nxs and same starting width when fitting in both d-spacing and TOF.
Also changed warning "IkedaCarpenterPV function should ONLY be used when working with x-axis unit = TOF" to information: "IkedaCarpenterPV function is perhaps best used when working with x-axis unit = TOF"
(Further work on IC needed. Tickets will be generated.)
Refs #1308.
comment:17 Changed 10 years ago by Anders Markvardsen
- Status changed from accepted to verify
- Resolution set to fixed
comment:18 Changed 10 years ago by Anders Markvardsen
comment:19 Changed 10 years ago by Anders Markvardsen
comment:21 Changed 10 years ago by Martyn Gigg
- Status changed from verifying to closed
Verified in [5943]
Confirmed for GEM and IkedaCarpenter that fit works when in units other than TOF.
comment:22 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2155
(In [4952]) Code for processing result-unit in LoadInstrument and added boost build flag to VS. Refs #1308