Skip to content

Commit

Permalink
refs #10693. Change warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Dec 19, 2014
1 parent fbb888f commit d80ed4c
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -182,10 +182,13 @@ def __verify_input_workspace(self, to_cut):

# Try to sanity check the order of the dimensions. This is important.
axes_check = self.getProperty("CheckAxes").value

# Coordinate system message
restricted_coordinates_message = "Input Workspace should be in reciprocal lattice dimensions (HKL)"
if axes_check:

if not coord_system == SpecialCoordinateSystem.HKL:
raise ValueError("Input Workspace must be in reciprocal lattice dimensions (HKL)")
raise ValueError(restricted_coordinates_message)

predicates = ["^(H.*)|(\\[H,0,0\\].*)$","^(K.*)|(\\[0,K,0\\].*)$","^(L.*)|(\\[0,0,L\\].*)$"]
n_crystallographic_dims = __builtin__.min(3, ndims)
Expand All @@ -194,6 +197,9 @@ def __verify_input_workspace(self, to_cut):
p = re.compile(predicates[i])
if not p.match( dimension.getName() ):
raise ValueError("Dimensions must be in order H, K, L")
else:
if not coord_system == SpecialCoordinateSystem.HKL:
logger.warning(restricted_coordinates_message)

def __verify_projection_input(self, projection_table):
if isinstance(projection_table, ITableWorkspace):
Expand Down

0 comments on commit d80ed4c

Please sign in to comment.