Ticket #5483 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

[C2E / IDA] - Improve User Input Validation

Reported by: Peter Parker Owned by: Peter Parker
Priority: major Milestone: Release 2.2
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Dereck Kachere

Description (last modified by Peter Parker) (diff)

C2E

Calibration

This has default values read from the Instr Parameter File and are good approximations to start from. However they could need tweaking so we should have checks:

  • (PeakMax - Min) > 0.
  • BackMax > BackMin - this will also do (BackMax - Min) > 0.
  • Perhaps also ((BackMax < PeakMin) OR (BackMin > PeakMax)).

The former is for background on negative side of peak & latter for positive side to ensure background range does not overlap peak.

Resolution

Rebinning has defaults (fixed & those for graphite002) and checks should be like Fury.

  • (High-Low) > 0.
  • Range multiple of Width.

For background a bit like Calibration:

  • End > Start (ensuring (End - Start) > 0).
  • For negative side Start > Low.
  • For postive side End < High.

Diagnostics

Like Calibration:

  • Range1 - (End - Start) > 0.
  • If Range2 used - (End-Start) > 0 and ((End2 < Start1) OR (Start2 > End1))

IDA

Elwin

Just like C2E/Diagnostics except no sensible defaults.

CalcCorr

Mainly checks that values are > 0.

  • Flat - All Thicknesses > 0.
  • Can Angle - cannot be 90 +- 10.
  • Cylinder - R2 > R1, R3 > R2 and StepSize < (R2 - R1).
  • Sample/Can details - NumberDensity > 0 and (Scattering + Absorption) > 0.
  • Sampe & can densities and cross sections cannot be negative.

Change History

comment:1 Changed 8 years ago by Peter Parker

Refs #5483 - Better validation in Fury.

Accounting for floating point nature of doubles, also Python check.

Changeset: f9834e112bb6a0eda8df612cff2606e4bb04b135

comment:2 Changed 8 years ago by Peter Parker

Refs #5483 - Better validation in Fury.

Accounting for floating point nature of doubles, also Python check.

Changeset: f9834e112bb6a0eda8df612cff2606e4bb04b135

comment:3 Changed 8 years ago by Peter Parker

Refs #5483 - Changes from Spencer including error checking.

Changeset: dfba8692b30ea7f2adf6c3d57552296476d75008

comment:4 Changed 8 years ago by Peter Parker

Refs #5483 - More changes from Spencer re input validation.

Changeset: 5239799c2e104101c6c2d4619b22aa48a7a78190

comment:5 Changed 8 years ago by Peter Parker

Refs #5483 - Better validation in Fury.

Accounting for floating point nature of doubles, also Python check.

Changeset: f9834e112bb6a0eda8df612cff2606e4bb04b135

comment:6 Changed 8 years ago by Peter Parker

Refs #5483 - Changes from Spencer including error checking.

Changeset: dfba8692b30ea7f2adf6c3d57552296476d75008

comment:7 Changed 8 years ago by Peter Parker

  • Status changed from new to accepted
  • Description modified (diff)

comment:8 Changed 8 years ago by Peter Parker

Refs #5483 - Add more validation.

  • Cover the case when using Plot Raw in Calib/Diag where the user might

accidentally choose a run from a different instrument than the one that is selected in the Energy Transfer tab. This was causing Mantid to crash.

Changeset: a37f2e964ee8d41c8d67df2028ebb4b71dfd2744

comment:9 Changed 8 years ago by Peter Parker

Refs #5483 - Add validation to C2E/IDA where missing.

This should cover all the items in the ticket description that haven't already been covered.

Attempted to clean up a lot of the boiler plate code surrounding detection and reporting of invalid inputs.

A couple of the items on CalcCorr may be subject to change.

Changeset: 8b734ddd84a1689e179d419f89fd02e496f5e3a3

comment:10 Changed 8 years ago by Peter Parker

Refs #5483 - Delete errant qualification not shown in MSVC.

Changeset: 80c19ec7043cffdb2ecde70d28dae76d676f4b1f

comment:11 Changed 8 years ago by Peter Parker

Refs #5483 - Fix another quirk not shown by MSVC.

Changeset: db54d9912f4e50f388f6b58e5e26a63d2d9786fb

comment:12 Changed 8 years ago by Peter Parker

Refs #5483 - Final amendments.

Changeset: 4fd4833dcfbeaa821e674f271bbe45955e328b81

comment:13 Changed 8 years ago by Peter Parker

  • Status changed from accepted to verify
  • Resolution set to fixed
  • Description modified (diff)

To test, simply go to the appropriate interfaces and ensure that the inputs are validated as mentioned in the ticket description.

No need for input files - clicking "Run" on these tabs will display a list of which inputs are not valid.

comment:14 Changed 8 years ago by Dereck Kachere

  • Status changed from verify to verifying
  • Tester set to Dereck Kachere

comment:15 Changed 8 years ago by Dereck Kachere

  • Status changed from verifying to closed

Tests were carried out and passed.

Calibration: all conditions desired were met and no ranges were allowed to overlap. Resolution: an error message came up when the range was not a multiple of the width. Background: all conditions were functional. Diagnostics: similar case; no overlaps were allowed. Clever that user cannot even enter a negative sign for the 'Thickness'

comment:16 Changed 8 years ago by Peter Parker

Refs #5483 - Add more validation.

  • Cover the case when using Plot Raw in Calib/Diag where the user might

accidentally choose a run from a different instrument than the one that is selected in the Energy Transfer tab. This was causing Mantid to crash.

Changeset: a37f2e964ee8d41c8d67df2028ebb4b71dfd2744

comment:17 Changed 8 years ago by Peter Parker

Refs #5483 - Add validation to C2E/IDA where missing.

This should cover all the items in the ticket description that haven't already been covered.

Attempted to clean up a lot of the boiler plate code surrounding detection and reporting of invalid inputs.

A couple of the items on CalcCorr may be subject to change.

Changeset: 8b734ddd84a1689e179d419f89fd02e496f5e3a3

comment:18 Changed 8 years ago by Peter Parker

Refs #5483 - Delete errant qualification not shown in MSVC.

Changeset: 80c19ec7043cffdb2ecde70d28dae76d676f4b1f

comment:19 Changed 8 years ago by Peter Parker

Refs #5483 - Fix another quirk not shown by MSVC.

Changeset: db54d9912f4e50f388f6b58e5e26a63d2d9786fb

comment:20 Changed 8 years ago by Peter Parker

Refs #5483 - Final amendments.

Changeset: 4fd4833dcfbeaa821e674f271bbe45955e328b81

comment:21 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6329

Note: See TracTickets for help on using tickets.