Skip to content
Snippets Groups Projects
Commit 8c8060f3 authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #19478 option for h5 file

parent 95456817
No related branches found
No related tags found
No related merge requests found
......@@ -638,7 +638,7 @@ void MantidEV::loadEventFile_slot() {
QString file_path = getFilePath(last_event_file);
QString Qfile_name =
QFileDialog::getOpenFileName(this, tr("Load event file"), file_path,
tr("Nexus Files (*.nxs);; All files(*)"));
tr("Nexus Files (*.nxs *.h5);; All files(*)"));
if (Qfile_name.length() > 0) {
m_uiForm.EventFileName_ledt->setText(Qfile_name);
......
......@@ -125,9 +125,11 @@ optimize_UB = params_dictionary[ "optimize_UB" ]
# Get the fully qualified input run file name, either from a specified data
# directory or from findnexus
#
short_filename = "%s_%s_event.nxs" % (instrument_name, str(run))
short_filename = "%s_%s" % (instrument_name, str(run))
if data_directory is not None:
full_name = data_directory + "/" + short_filename
full_name = data_directory + "/" + short_filename + ".nxs.h5"
if not os.path.exists(full_name):
full_name = data_directory + "/" + short_filename + "_event.nxs"
else:
candidates = FileFinder.findRuns(short_filename)
full_name = ""
......@@ -135,7 +137,7 @@ else:
if os.path.exists(item):
full_name = str(item)
if not full_name.endswith('nxs'):
if not full_name.endswith('nxs') and not full_name.endswith('h5'):
print("Exiting since the data_directory was not specified and")
print("findnexus failed for event NeXus file: " + instrument_name + " " + str(run))
exit(0)
......@@ -362,12 +364,12 @@ else:
CellType=cell_type, Centering=centering,
AllowPermutations=allow_perm,
Apply=True, Tolerance=tolerance )
if output_nexus:
SaveNexus(InputWorkspace=peaks_ws, Filename=run_conventional_integrate_file )
else:
SaveIsawPeaks(InputWorkspace=peaks_ws, AppendFile=False,
Filename=run_conventional_integrate_file )
SaveIsawUB(InputWorkspace=peaks_ws, Filename=run_conventional_matrix_file )
if output_nexus:
SaveNexus(InputWorkspace=peaks_ws, Filename=run_conventional_integrate_file )
else:
SaveIsawPeaks(InputWorkspace=peaks_ws, AppendFile=False,
Filename=run_conventional_integrate_file )
SaveIsawUB(InputWorkspace=peaks_ws, Filename=run_conventional_matrix_file )
end_time = time.time()
print('\nReduced run ' + str(run) + ' in ' + str(end_time - start_time) + ' sec')
......
......@@ -168,20 +168,23 @@ first_time = True
if output_nexus:
#Only need this for instrument for peaks_total
short_filename = "%s_%s_event.nxs" % (instrument_name, str(run_nums[0]))
short_filename = "%s_%s" % (instrument_name, str(run_nums[0]))
if data_directory is not None:
full_name = data_directory + "/" + short_filename
full_name = data_directory + "/" + short_filename + ".nxs.h5"
if not os.path.exists(full_name):
full_name = data_directory + "/" + short_filename + "_event.nxs"
else:
candidates = FileFinder.findRuns(short_filename)
full_name = ""
for item in candidates:
if os.path.exists(item):
full_name = str(item)
if not full_name.endswith('nxs'):
if not full_name.endswith('nxs') and not full_name.endswith('h5'):
print("Exiting since the data_directory was not specified and")
print("findnexus failed for event NeXus file: " + instrument_name + " " + str(run))
print("findnexus failed for event NeXus file: " + instrument_name + " " + str(run_nums[0]))
exit(0)
#
# Load the first data file to find instrument
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment