Skip to content

Commit

Permalink
Re #10803 Minor bug in EnergyBins
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Dec 18, 2014
1 parent 5e90371 commit 6052848
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/scripts/Inelastic/Direct/PropertiesDescriptors.py
Expand Up @@ -81,6 +81,8 @@ def __set__(self,instance,values):
nBlocks = len(value);
if nBlocks%3 != 0:
raise KeyError("Energy_bin value has to be either list of n-blocks of 3 number each or string representation of this list with numbers separated by commas")
else:
value = None
#TODO: implement single value settings according to rebin
object.__setattr__(instance,'_energy_bins',value);
#end EnergyBins
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/scripts/test/DirectPropertyManagerTest.py
@@ -1,9 +1,10 @@
import os
os.environ["PATH"] = r"c:/Mantid/Code/builds/br_master/bin/Release"
from mantid.simpleapi import *
from mantid import api
import unittest
import inspect
import numpy as np
import os
import sys
from Direct.PropertyManager import PropertyManager

Expand Down Expand Up @@ -435,6 +436,8 @@ def test_set_energy_bins_and_ei(self):
self.assertAlmostEqual(en,ei[ind])


prop_man.energy_bins = None

#TODO: this one is not completed

def test_set_defailts_from_instrument(self) :
Expand Down Expand Up @@ -686,7 +689,7 @@ def test_hadmask_options_locked(self):
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 6052848

Please sign in to comment.