From 23712bb4b585c084071f82195abcde6ae4f523d1 Mon Sep 17 00:00:00 2001 From: Michael Walsh Date: Mon, 3 Oct 2022 13:28:35 -0400 Subject: [PATCH] Copy from raw folder to corrected folder when running the mcp_correction code --- scripts/mcp_detector_correction.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/mcp_detector_correction.py b/scripts/mcp_detector_correction.py index cf1dcdb..79e5d00 100755 --- a/scripts/mcp_detector_correction.py +++ b/scripts/mcp_detector_correction.py @@ -51,6 +51,7 @@ shutter_count_file = glob.glob(input_dir + "/*_ShutterCount.txt")[0] shutter_time_file = glob.glob(input_dir + "/*_ShutterTimes.txt")[0] spectra_file = glob.glob(input_dir + "/*_Spectra.txt")[0] + summed_file = glob.glob(input_dir + "/*_SummedImg.fits")[0] # validation print("Validating input arguments") @@ -59,6 +60,7 @@ assert Path(shutter_count_file).exists() assert Path(shutter_time_file).exists() assert Path(spectra_file).exists() + assert Path(summed_file).exists() # process metadata print("Processing metadata") @@ -95,8 +97,11 @@ os.path.basename(shutter_time_file)) out_spectra_file = os.path.join(output_dir, os.path.basename(spectra_file)) + out_summed_file = os.path.join(output_dir, + os.path.basename(summed_file)) shutil.copyfile(shutter_count_file, out_shutter_count) shutil.copyfile(shutter_time_file, out_shutter_time) + shutil.copyfile(summed_file, out_summed_file) # handle proper spectra parsing if skip_first_last_img: skipping_meta_data(df_meta).to_csv(