Skip to content

Commit

Permalink
Re #11628 fixing unit tests and more detailed description of the
Browse files Browse the repository at this point in the history
CreatePSDBleedMask algorithm.
  • Loading branch information
abuts committed Apr 27, 2015
1 parent b2af805 commit fb077fe
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
29 changes: 24 additions & 5 deletions Code/Mantid/docs/source/algorithms/CreatePSDBleedMask-v1.rst
Expand Up @@ -9,17 +9,36 @@
Description
-----------

The algorithm identifies tubes, which become saturated due to hign
neutron flux (e.g. from inense bragg peaks) affecting these tubes
so that tubes are not counting neutrons but show constant high
counts over the tube and generates mask workspace to exclude such tubes.

The effect occurs due some old data acsqusition electronics and
observed as homogeneous high counts reading symmetric over the whole
tube length.

The diagnostic test attempts to find all tubes within the instrument
attached to the workspace. If successful, each tube is tested for
saturation above the level defined by the 'MaxTubeFramerate' property.
If any pixel, not including those marked to be ignored around the
equatorial region, are counting above this threshold then the entire
tube is masked.
saturation above the level defined by the production of 'MaxTubeFramerate'
property by 'goodfrm' log value, retrieved from the workspace.

If any pixel, excluding the number of central pixels specified by
'NIgnoredCentralPixels' property, is counting above this threshold
then the entire tube is masked.

The image below shows "over-corrected" image, where used 'MaxTubeFramerate'
set up too low. Number of tubes with high neutron flux on them become masked.

.. image:: /images/BleedingCorrections.png

Restrictions on the input workspace
###################################

- The workspace must contain either raw counts or counts/us.
- The workspace must contain goodfrm log with value ideally
specifying the good frames arrival rate. Any value proportional to this
rate would work after appropriate adjasment to 'MaxTubeFramerate' value.


Usage
-----
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/scripts/test/DirectPropertyManagerTest.py
@@ -1,5 +1,5 @@
import os
#os.environ["PATH"] = r"c:/Mantid/Code/builds/br_master/bin/Release;" + os.environ["PATH"]
os.environ["PATH"] = r"c:/Mantid/Code/builds/br_master/bin/Release;" + os.environ["PATH"]
from mantid.simpleapi import *
from mantid import api
import unittest
Expand Down Expand Up @@ -871,7 +871,7 @@ def test_hadmask_options_locked(self):

# verify if changed properties list does not change anything
changed_prop = propman1.update_defaults_from_instrument(ws.getInstrument())
self.assertEqual(len(changed_prop),4)
self.assertEqual(len(changed_prop),2)
self.assertFalse(propman1.use_hard_mask_only)
self.assertEqual(propman1.hard_mask_file,'a_hard_mask_file.msk')
self.assertTrue(propman1.run_diagnostics)
Expand Down

0 comments on commit fb077fe

Please sign in to comment.