Ticket #1688 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

GenericAbsorptionCorrection to allow a Gauge Volume to be defined

Reported by: Nick Draper Owned by: Russell Taylor
Priority: critical Milestone: Iteration 25
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

Allow another shape, a gauge volume to be defined, only scatering in this area needs to be considered and accepted, but the whole shape needs to be considered for path lengths.

We should create another version of CreateSampleShape to define the guage volume and shape, and store this along with the sample object.

Attachments

AbsorptionTests.py (3.0 KB) - added by Martyn Gigg 10 years ago.

Change History

comment:1 Changed 10 years ago by Russell Taylor

  • Status changed from new to accepted
  • Summary changed from GenereicAbsorptionCorrection to allow a Gauge Volume to be defined to GenericAbsorptionCorrection to allow a Gauge Volume to be defined

comment:2 Changed 10 years ago by Russell Taylor

(In [6671]) Add the concept of a gauge volume to the generic Absorption Correction algorithm. Re #1688. Some other minor tidying up.

comment:3 Changed 10 years ago by Russell Taylor

(In [6865]) Generalise Cylinder & FlatPlate absorption algorithms to use the sample position and not just assume the sample is at the origin. Re #1688.

comment:4 Changed 10 years ago by Russell Taylor

(In [7139]) Add 'CuboidGaugeVolume' absorption correction algorithm. Re #1688.

comment:5 Changed 10 years ago by Russell Taylor

(In [7161]) Check properly for sample object not being set. Re #1688.

comment:6 Changed 10 years ago by Russell Taylor

  • Status changed from accepted to verify
  • Resolution set to fixed

So I've actually done this in 2 ways, the one described above which requires running CreateSampleShape and DefineGaugeVolume to define the sample and active volumes respectively, then AbsorptionCorrection.

After doing this, I discovered that the gauge volume is always a cuboid for the instruments of interest so I realised that this could be done an easier way making use of the FlatPlateAbsorption code. So now there's a CuboidGaugeVolumeAbsorption algorithm that requires the sample to have been defined using CreateSampleShape and then takes in parameters defining the size of the gauge volume a la FlatPlateAbsorption. This was very last minute though, so it should be tested carefully.

comment:7 Changed 10 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:8 Changed 10 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I've run into a crash with CuboidGaugeVolumeAbsorption correction. Running the attached script I get a crash which when I ran in debug showed up something wrong in FlatPlateAbsorption. Given nothing happens in CuboidGaugeVolumeAbsorption however this is not surprising I guess.

comment:9 Changed 10 years ago by Russell Taylor

(In [7184]) Add protection against the gauge volume not being fully within the sample. Re #1688.

comment:10 Changed 10 years ago by Russell Taylor

  • Status changed from reopened to accepted

comment:11 Changed 10 years ago by Russell Taylor

(In [7186]) Some clarifying comments. Re #1688.

comment:12 Changed 10 years ago by Russell Taylor

  • Status changed from accepted to verify
  • Resolution set to fixed

The attached script has a bug in it - the variable slabWidthInCM was being passed twice in the call to CuboidGaugeVolumeAbsorption (and the slab thickness not at all). Still, this highlighted problems if the gauge volume was not fully enclosed by the sample and this is now protected against.

comment:13 Changed 10 years ago by Martyn Gigg

  • Status changed from verify to verifying

Changed 10 years ago by Martyn Gigg

comment:14 Changed 10 years ago by Martyn Gigg

  • Status changed from verifying to closed

I've corrected the script.

Fiddling with numbers in the script gives the expected agreements/disagreements. CylinderAbsorption tested in isolation and gives sensible results.

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2535

Note: See TracTickets for help on using tickets.