Skip to content

Commit 213e1f4

Browse files
authored
Merge pull request #6 from ornlneutronimaging/img339_summedfits_output
Copy `_SummedImg.fits` from raw folder to corrected folder when running the mcp_correction code
2 parents 4805cdb + 23712bb commit 213e1f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/mcp_detector_correction.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
shutter_count_file = glob.glob(input_dir + "/*_ShutterCount.txt")[0]
5252
shutter_time_file = glob.glob(input_dir + "/*_ShutterTimes.txt")[0]
5353
spectra_file = glob.glob(input_dir + "/*_Spectra.txt")[0]
54+
summed_file = glob.glob(input_dir + "/*_SummedImg.fits")[0]
5455

5556
# validation
5657
print("Validating input arguments")
@@ -59,6 +60,7 @@
5960
assert Path(shutter_count_file).exists()
6061
assert Path(shutter_time_file).exists()
6162
assert Path(spectra_file).exists()
63+
assert Path(summed_file).exists()
6264

6365
# process metadata
6466
print("Processing metadata")
@@ -95,8 +97,11 @@
9597
os.path.basename(shutter_time_file))
9698
out_spectra_file = os.path.join(output_dir,
9799
os.path.basename(spectra_file))
100+
out_summed_file = os.path.join(output_dir,
101+
os.path.basename(summed_file))
98102
shutil.copyfile(shutter_count_file, out_shutter_count)
99103
shutil.copyfile(shutter_time_file, out_shutter_time)
104+
shutil.copyfile(summed_file, out_summed_file)
100105
# handle proper spectra parsing
101106
if skip_first_last_img:
102107
skipping_meta_data(df_meta).to_csv(

0 commit comments

Comments
 (0)