From 30d851b62df4c23388026c94451c0a38a329f567 Mon Sep 17 00:00:00 2001 From: Alex Buts Date: Mon, 16 Dec 2013 11:26:41 +0000 Subject: [PATCH] refs #8614 Removed unnecessary parameter in instrument definition file Generic loader now distinguish between nexus and event nexus file. --- Code/Mantid/instrument/LET_Parameters.xml | 6 ------ Code/Mantid/scripts/Inelastic/CommonFunctions.py | 11 ++++------- .../scripts/Inelastic/DirectEnergyConversion.py | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Code/Mantid/instrument/LET_Parameters.xml b/Code/Mantid/instrument/LET_Parameters.xml index 99c364ea44da..20b97858ed70 100644 --- a/Code/Mantid/instrument/LET_Parameters.xml +++ b/Code/Mantid/instrument/LET_Parameters.xml @@ -34,11 +34,6 @@ - - - - - @@ -82,7 +77,6 @@ - diff --git a/Code/Mantid/scripts/Inelastic/CommonFunctions.py b/Code/Mantid/scripts/Inelastic/CommonFunctions.py index e49bf9261357..397f6fb67ab3 100644 --- a/Code/Mantid/scripts/Inelastic/CommonFunctions.py +++ b/Code/Mantid/scripts/Inelastic/CommonFunctions.py @@ -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. """ @@ -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 @@ -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) diff --git a/Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py b/Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py index 53e9cc3795cb..1c23392cc207 100644 --- a/Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py +++ b/Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py @@ -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)