Skip to content

Commit

Permalink
refs #8614 Removed unnecessary parameter in instrument definition file
Browse files Browse the repository at this point in the history
Generic loader now distinguish between nexus and event nexus file.
  • Loading branch information
abuts committed Dec 16, 2013
1 parent 1f6b9b2 commit 30d851b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
6 changes: 0 additions & 6 deletions Code/Mantid/instrument/LET_Parameters.xml
Expand Up @@ -34,11 +34,6 @@
<value val="LET_rings_123.map"/>
</parameter>

<!-- Parameter describes if nexus source data files are written in event mode or not (reducer treats nxs files as nexus event files then) -->
<parameter name="nexus_in_event_mode" type="bool">
<value val = "False"/>
</parameter>


<!-- RunNumber to use for diag instead of the input run number if none - use input run -->
<parameter name="mask_run" type="string">
Expand Down Expand Up @@ -82,7 +77,6 @@
</parameter>



<parameter name="scale-factor">
<value val="1.7016e8"/>
</parameter>
Expand Down
11 changes: 4 additions & 7 deletions Code/Mantid/scripts/Inelastic/CommonFunctions.py
Expand Up @@ -69,7 +69,7 @@ def mark_as_loaded(filename):
logger.notice("Marking %s as loaded." % filename)
_loaded_data.append(data_name)

def load_runs(runs, sum=True,event_mode = False):
def load_runs(runs, sum=True):
"""
Loads a list of files, summing if the required.
"""
Expand All @@ -96,9 +96,9 @@ def load_runs(runs, sum=True,event_mode = False):
else:
# Try a single run
force = False
return load_run(runs,force,event_mode)
return load_run(runs,force)

def load_run(run_number, force=False,event_mode = False):
def load_run(run_number, force=False):
"""Loads run into the given workspace.
The AddSampleLog algorithm is used to add a Filename property
Expand Down Expand Up @@ -137,10 +137,7 @@ def load_run(run_number, force=False,event_mode = False):
if filename.endswith("_event.nxs"):
LoadEventNexus(Filename=filename, OutputWorkspace=output_name)
elif ext.startswith(".n"):
if event_mode :
LoadEventNexus(Filename=filename,OutputWorkspace=output_name,LoadMonitors='1')
else:
LoadNexus(Filename=filename,OutputWorkspace=output_name)
Load(Filename=filename,OutputWorkspace=output_name,LoadMonitors='1')
elif filename.endswith("_event.dat"):
#load the events
LoadEventPreNexus(EventFilename=filename, OutputWorkspace=output_name)
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py
Expand Up @@ -789,7 +789,7 @@ def load_data(self, runs,new_ws_name=None,keep_previous_ws=False):
event_mode = True;

sum = True
result_ws = common.load_runs(runs, sum,event_mode)
result_ws = common.load_runs(runs, sum)
if new_ws_name != None :
if keep_previous_ws:
result_ws = CloneWorkspace(InputWorkspace = result_ws,OutputWorkspace = new_ws_name)
Expand Down

0 comments on commit 30d851b

Please sign in to comment.