Open shawnknabel opened 10 months ago
Apologies for the late reply. The pipeline expects all of your data to be in the same directory, not split into raw and cals.
@MNBrod No problem! Sorry to bother you with mundane stuff. I've moved all the files to the same level and am trying it again. The .tar files from KOA unpacked into separate subdirectories, so I expected the pipeline would expect that.
Hi Max,
I've tried to run the cal files from a list with "reduce_kcwi -b -l calib_files.txt" in the directory that holds all the fits files from the night (cal and sci). It looks like it isn't processing the blue bias files and is looping through all the files indefinitely. I've attached the log files and will paste the kcwib.proc below:
| FRAMENO | CID | DID | TYPE | GRPID | TTIME | CAM | IFU | GRAT | GANG | CWAVE | BIN | FILT | MJD | STAGE | SUFF | OFNAME | TARGNAME | filename | | 1 | 6503b422da14e3cd53bcbacc | 2201009 | DARK | 2023-11-07-1 | 1.0 | BLUE | FPCam | RM2 | 0.00 | 3370.30 | 2,2 | None | 60255.954446 | 1 | int | kb231108_00001.fits | HORIZONSTOW | KB.20231107.82464.13.fits.gz | | 11 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.082010 | 9 | intb | kr231107_00011.fits | unknown | kr231107_00011.fits | | 12 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.083179 | 9 | intb | kr231107_00012.fits | unknown | kr231107_00012.fits | | 13 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.084359 | 9 | intb | kr231107_00013.fits | unknown | kr231107_00013.fits | | 14 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.085540 | 9 | intb | kr231107_00014.fits | unknown | kr231107_00014.fits | | 15 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.086720 | 9 | intb | kr231107_00015.fits | unknown | kr231107_00015.fits | | 16 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.087889 | 9 | intb | kr231107_00016.fits | unknown | kr231107_00016.fits | | 17 | NONE | 1100101 | BIAS | 2023-11-07-11 | 0.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.089070 | 9 | intb | kr231107_00017.fits | unknown | kr231107_00017.fits | | 18 | 64e6b7c46522234a6092fdd0 | 1110100 | CONTBARS | 2023-11-07-18 | 40.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.097109 | 1 | int | kr231107_00018.fits | unknown | KR.20231107.08390.24.fits.gz | | 18 | 64e6b7c46522234a6092fdd0 | 1111000 | MCBARS | 2023-11-07-18 | 5.6 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.096637 | 3 | mcbars | kb231107_00018.fits | unknown | KB.20231107.08349.44.fits.gz | | 19 | 64e6b7c46522234a6092fdd0 | 1110100 | CONTBARS | 2023-11-07-18 | 40.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.098077 | 1 | int | kr231107_00019.fits | unknown | KR.20231107.08473.88.fits.gz | | 20 | 64e6b7c46522234a6092fdd0 | 1111000 | MARC | 2023-11-07-20 | 80.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.102752 | 3 | marc | kb231107_00020.fits | unknown | KB.20231107.08877.80.fits.gz | | 20 | 64e6b7c46522234a6092fdd0 | 1110100 | CONTBARS | 2023-11-07-18 | 40.0 | RED | Small | RL | 138.93 | 7849.95 | 1,1 | None | 60255.099022 | 1 | int | kr231107_00020.fits | unknown | KR.20231107.08555.48.fits.gz | | 20 | 64e6b7c46522234a6092fdd0 | 1111000 | ARCLAMP | 2023-11-07-20 | 80.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.102752 | 1 | int | kb231107_00020.fits | unknown | KB.20231107.08877.80.fits.gz | | 79 | 6503b422da14e3cd53bcbacc | 1111000 | CONTBARS | 2023-11-07-79 | 5.6 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.673590 | 1 | int | kb231107_00079.fits | HORIZONSTOW | KB.20231107.58198.16.fits.gz | | 79 | 6503b422da14e3cd53bcbacc | 1111000 | MCBARS | 2023-11-07-79 | 5.6 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.673590 | 3 | mcbars | kb231107_00079.fits | HORIZONSTOW | KB.20231107.58198.16.fits.gz | | 81 | 6503b422da14e3cd53bcbacc | 1111000 | ARCLAMP | 2023-11-07-81 | 80.0 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.679682 | 1 | int | kb231107_00081.fits | HORIZONSTOW | KB.20231107.58724.52.fits.gz | | 81 | 6503b422da14e3cd53bcbacc | 1111000 | MARC | 2023-11-07-81 | 80.0 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.679682 | 3 | marc | kb231107_00081.fits | HORIZONSTOW | KB.20231107.58724.52.fits.gz | | 146 | 6503b422da14e3cd53bcbacc | 1110100 | CONTBARS | 2023-11-07-146 | 40.0 | RED | Small | RL | 139.91 | 7149.89 | 1,1 | None | 60255.674063 | 1 | int | kr231107_00146.fits | HORIZONSTOW | KR.20231107.58239.00.fits.gz | | 147 | 6503b422da14e3cd53bcbacc | 1110100 | CONTBARS | 2023-11-07-146 | 40.0 | RED | Small | RL | 139.91 | 7149.89 | 1,1 | None | 60255.675007 | 1 | int | kr231107_00147.fits | HORIZONSTOW | KR.20231107.58320.60.fits.gz | | 148 | 6503b422da14e3cd53bcbacc | 1110100 | CONTBARS | 2023-11-07-146 | 40.0 | RED | Small | RL | 139.91 | 7149.89 | 1,1 | None | 60255.675951 | 1 | int | kr231107_00148.fits | HORIZONSTOW | KR.20231107.58402.20.fits.gz |
Hi, just a followup here! I'm running the pipeline from a list of just the basic bias, contbars, lamps, and dome flats. The pipeline is now ingesting and processing all the individual calibration files, but it seems it still isn't able to make the master bias. It might be a filename problem? I've tried it using the KOA filenames and the original telescope filenames.
Thank you for your help!
See here from the DRFP.log:
024-01-02 14:20:38:DRPF:INFO: Event completed: name bias_subtract_overscan, action SubtractOverscan, arg name kb231107_00013.fits.gz, recurr False 2024-01-02 14:22:20:DRPF:INFO: Event completed: name bias_trim_overscan, action TrimOverscan, arg name kb231107_00013.fits.gz, recurr False 2024-01-02 14:22:20:DRPF:ERROR: Exception [Errno 2] No such file or directory: '/data/raw_data/KECK_2023_11_07_KCWI/take2_regular_filenames/KOA_59782/KCWI/raw/cal/2023-11-07/redux/kb231107_00011_intb.fits' while invoking MakeMasterBias 2024-01-02 14:22:20:DRPF:INFO: Event failed: name bias_make_master, action MakeMasterBias, arg name kb231107_00013.fits.gz, recurr False
Below is kcwib.proc
| FRAMENO | CID | DID | TYPE | GRPID | TTIME | CAM | IFU | GRAT | GANG | CWAVE | BIN | FILT | MJD | STAGE | SUFF | OFNAME | TARGNAME | filename | | 11 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.081927 | 9 | intb | kb231107_00011.fits | unknown | kb231107_00011.fits | | 12 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.083958 | 9 | intb | kb231107_00012.fits | unknown | kb231107_00012.fits | | 13 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.085977 | 9 | intb | kb231107_00013.fits | unknown | kb231107_00013.fits | | 14 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.088007 | 9 | intb | kb231107_00014.fits | unknown | kb231107_00014.fits | | 15 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.090025 | 9 | intb | kb231107_00015.fits | unknown | kb231107_00015.fits | | 16 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.092057 | 9 | intb | kb231107_00016.fits | unknown | kb231107_00016.fits | | 17 | NONE | 1101009 | BIAS | 2023-11-07-11 | 0.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.094075 | 9 | intb | kb231107_00017.fits | unknown | kb231107_00017.fits | | 18 | 64e6b7c46522234a6092fdd0 | 1111000 | CONTBARS | 2023-11-07-18 | 5.6 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.096637 | 1 | int | kb231107_00018.fits | unknown | kb231107_00018.fits.gz | | 18 | 64e6b7c46522234a6092fdd0 | 1111000 | MCBARS | 2023-11-07-18 | 5.6 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.096637 | 3 | mcbars | kb231107_00018.fits | unknown | kb231107_00018.fits.gz | | 20 | 64e6b7c46522234a6092fdd0 | 1111000 | ARCLAMP | 2023-11-07-20 | 80.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.102752 | 1 | int | kb231107_00020.fits | unknown | kb231107_00020.fits.gz | | 20 | 64e6b7c46522234a6092fdd0 | 1111000 | MARC | 2023-11-07-20 | 80.0 | BLUE | Small | RL | 138.93 | 4599.90 | 1,1 | KBlue | 60255.102752 | 3 | marc | kb231107_00020.fits | unknown | kb231107_00020.fits.gz | | 79 | 6503b422da14e3cd53bcbacc | 1111000 | CONTBARS | 2023-11-07-79 | 5.6 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.673590 | 1 | int | kb231107_00079.fits | HORIZONSTOW | kb231107_00079.fits.gz | | 79 | 6503b422da14e3cd53bcbacc | 1111000 | MCBARS | 2023-11-07-79 | 5.6 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.673590 | 3 | mcbars | kb231107_00079.fits | HORIZONSTOW | kb231107_00079.fits.gz | | 81 | 6503b422da14e3cd53bcbacc | 1111000 | ARCLAMP | 2023-11-07-81 | 80.0 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.679682 | 1 | int | kb231107_00081.fits | HORIZONSTOW | kb231107_00081.fits.gz | | 81 | 6503b422da14e3cd53bcbacc | 1111000 | MARC | 2023-11-07-81 | 80.0 | BLUE | Small | RL | 28.76 | 4599.90 | 1,1 | KBlue | 60255.679682 | 3 | marc | kb231107_00081.fits | HORIZONSTOW | kb231107_00081.fits.gz |
Hello,
Please see my above message for a more thorough record of my issue. Best I can tell, I think I am having trouble with filenames or locations where processed bias frames are saved and then accessed during the MakeMasterBias.py routine.
From KCWI.log, this is where the 7th bias frame has been processed and the precondition for MakeMasterBias is satisfied.
2024-01-02 14:22:20:KCWI:INFO:MakeMasterBias.py: Checking precondition for MakeMasterBias 2024-01-02 14:22:20:KCWI:INFO:kcwi_proctab.py: Looking for BIAS frames 2024-01-02 14:22:20:KCWI:INFO:kcwi_proctab.py: Camera is BLUE 2024-01-02 14:22:20:KCWI:INFO:kcwi_proctab.py: Target type is BIAS 2024-01-02 14:22:20:KCWI:INFO:kcwi_proctab.py: Looking for frames with CCDCFG = 1101009 2024-01-02 14:22:20:KCWI:INFO:kcwi_proctab.py: Looking for frames with GRPID = 2023-11-07-11 2024-01-02 14:22:20:KCWI:INFO:MakeMasterBias.py: pre condition got 7, expecting 7
From DRFP.log, the MakeMasterBias fails while trying to find the file for frame 11 (the first bias file).
2024-01-02 14:22:20:DRPF:ERROR: Exception [Errno 2] No such file or directory: '/data/raw_data/KECK_2023_11_07_KCWI/take2_regular_filenames/KOA_59782/KCWI/raw/cal/2023-11-07/redux/kb231107_00011_intb.fits' while invoking MakeMasterBias 2024-01-02 14:22:20:DRPF:INFO: Event failed: name bias_make_master, action MakeMasterBias, arg name kb231107_00013.fits.gz, recurr False
Here are the files that have been created in my redux directory.
shawnknabel@pingui:/data/raw_data/KECK_2023_11_07_KCWI/take2_regular_filenames/KOA_59782/KCWI/raw/cal/2023-11-07/redux$ ls kb231107_00011.fits_intb.gz kb231107_00018_trace.fits kb231107_00012.fits_intb.gz kb231107_00020.fits_int.gz kb231107_00013.fits_intb.gz kb231107_00020.fits_marc.fits kb231107_00014.fits_intb.gz kb231107_00079.fits_int.gz kb231107_00015.fits_intb.gz kb231107_00079.fits_mcbars.fits kb231107_00016.fits_intb.gz kb231107_00079_trace.fits kb231107_00017.fits_intb.gz kb231107_00081.fits_int.gz kb231107_00018.fits_int.gz kb231107_00081.fits_marc.fits kb231107_00018.fits_mcbars.fits
Looking back at KCWI.log, where frame 11 was ingested, it appears to save a different file name.
2024-01-02 14:12:05:KCWI:INFO:kcwi_file_primitives.py: ------------------- Ingesting file kb231107_00011.fits.gz ------------------- 2024-01-02 14:12:06:KCWI:INFO:kcwi_file_primitives.py: <<< read 1 imgs and 1 tables out of 2 hdus in kb231107_00011.fits.gz 2024-01-02 14:12:06:KCWI:INFO:kcwi_pipeline.py: FILE TYPE DETERMINED AS BIAS 2024-01-02 14:12:06:KCWI:INFO:kcwi_pipeline.py: GROUPID is 2023-11-07-11 2024-01-02 14:12:06:KCWI:INFO:kcwi_pipeline.py: STATEID is Shared Bias (0) 2024-01-02 14:12:06:KCWI:INFO:kcwi_pipeline.py: CAMERA is BLUE 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: Img # 00011, Amp 1 [2122:2279, 0:4112] 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: Amp1 oscan counts (DN): 9944 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: Amp1 Read noise from oscan in e-: 2.607 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: Img # 00011, Amp 2 [2320:2477, 0:4112] 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: Amp2 oscan counts (DN): 9877 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: Amp2 Read noise from oscan in e-: 2.998 2024-01-02 14:12:06:KCWI:INFO:SubtractOverscan.py: kcwidrp.primitives.SubtractOverscan 2024-01-02 14:12:06:KCWI:INFO:TrimOverscan.py: kcwidrp.primitives.TrimOverscan 2024-01-02 14:12:06:KCWI:INFO:kcwi_file_primitives.py: >>> Saving 1 hdus to redux/kb231107_00011.fits_intb.gz 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: proctable updated with kb231107_00011.fits and kb231107_00011.fits 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: writing proc table file: kcwib.proc 2024-01-02 14:13:43:KCWI:INFO:MakeMasterBias.py: Checking precondition for MakeMasterBias 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: Looking for BIAS frames 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: Camera is BLUE 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: Target type is BIAS 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: Looking for frames with CCDCFG = 1101009 2024-01-02 14:13:43:KCWI:INFO:kcwi_proctab.py: Looking for frames with GRPID = 2023-11-07-11 2024-01-02 14:13:43:KCWI:INFO:MakeMasterBias.py: pre condition got 2, expecting 7
Hello! I am trying to run the KCWI_DRP on my ubuntu machine. I have a conda environment with python3.7 and up to date packages. I got the proprietary data from the KOA under my program, and the "raw" files are split into two subdirectories "cal" and "sci". I am getting an error that appears to be saying it can't find any of the calibration files. I had a similar-ish problem last year and submitted an issue #126 and have consulted those responses in my troubleshooting efforts.
I would appreciate any assistance. Thank you very much! With warmest regards, Shawn
Terminal commands and output below.