njcuk9999 / apero-drs

A PipelinE to Reduce Observations - The DRS for SPIRou (CFHT)
MIT License
12 stars 0 forks source link

Apero 0.7.288: calibration files from red/ not copied in calib/ #764

Open larnoldgithub opened 3 months ago

larnoldgithub commented 3 months ago

I just discoverd this for one night at least (21BQ20-Jan18) . The processing is from Oct 20 2023.

In October I have processed all calibrations, all files are in the nights directories, QC are OK.

spdrs@apikipiha:/data/spirou4/apero-data/offline/red/21BQ20-Jan18$ dfits 00AAB13D89*|fitsort PATHNAME OBJDRSN DPRTYPE QCC_ALL  DRSPDATE
FILE                                                PATHNAME                            OBJDRSN DPRTYPE     QCC_ALL DRSPDATE                
00AAB13D89_pp.fits                                  /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2ds_A.fits                           /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2ds_AB.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2ds_B.fits                           /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2ds_C.fits                           /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2dsff_A.fits                         /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2dsff_AB.fits                        /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2dsff_AB_ccf_smart_fp_mask_AB.fits   /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_AB_wave_fplines_AB.fits        /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_AB_wave_night_AB.fits          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_A_ccf_smart_fp_mask_A.fits     /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_A_wave_fplines_A.fits          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_A_wave_night_A.fits            /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_B.fits                         /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2dsff_B_ccf_smart_fp_mask_B.fits     /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_B_wave_fplines_B.fits          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_B_wave_night_B.fits            /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_C.fits                         /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_e2dsff_C_ccf_smart_fp_mask_C.fits     /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_C_wave_fplines_C.fits          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_e2dsff_C_wave_night_C.fits            /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:20:22.555 
00AAB13D89_pp_s1d_v_A.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_v_AB.fits                         /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_v_B.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_v_C.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_w_A.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_w_AB.fits                         /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_w_B.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_s1d_w_C.fits                          /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-20 00:23:45.430 
00AAB13D89_pp_shapel.fits                           /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2023-10-19 11:49:42.028 
00AAB13D89_pp_shapel_orderps_A.fits                 /data/sessions/spirou/21BQ20-Jan18          FLAT_DARK   T       2023-10-19 15:39:09.121 
00AAB13D89_pp_shapel_orderps_AB.fits                /data/sessions/spirou/21BQ20-Jan18          FLAT_DARK   T       2023-10-19 15:39:09.121 
00AAB13D89_pp_shapel_orderps_B.fits                 /data/sessions/spirou/21BQ20-Jan18          FLAT_DARK   T       2023-10-19 15:39:09.121 
00AAB13D89_pp_shapel_orderps_C.fits                 /data/sessions/spirou/21BQ20-Jan18          DARK_FLAT   T       2023-10-19 15:39:09.121 

But I recently got an error from lbl and the reason is that some FP_FP aren't present in calib/:

spdrs@apikipiha:/data/spirou4/apero-data/offline/calib$ dfits 00AAB13D89*|fitsort PATHNAME OBJDRSN DPRTYPE QCC_ALL  DRSPDATE
FILE                                        PATHNAME                            OBJDRSN DPRTYPE     QCC_ALL DRSPDATE                
00AAB13D89_pp_e2dsff_AB_wave_night_AB.fits  /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2024-03-21 03:39:08.583 
00AAB13D89_pp_e2dsff_A_wave_night_A.fits    /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2024-03-21 03:39:08.583 
00AAB13D89_pp_e2dsff_B_wave_night_B.fits    /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2024-03-21 03:39:08.583 
00AAB13D89_pp_e2dsff_C_wave_night_C.fits    /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2024-03-21 03:39:08.583 
00AAB13D89_pp_shapel.fits                   /data/sessions/spirou/21BQ20-Jan18          FP_FP       T       2024-03-20 14:41:49.566 

why all calibrations from that night have not been copied the calib/ dir, while QC are all good ?

I'm goint to copy them manually and re-run the job that failed. I guess Apero will update his calib and findex db with the new files put in calib/ In principle I also should redo the extraction etc. for that night.

njcuk9999 commented 3 months ago

Im not sure of the problem here but although we run LBL inside APERO, LBL and APERO work completely separately. The only link is apero_lbl_ref which symlinks files in to the lbl/calib directory. Please dont get confused between the calib dir for apero and the lbl/calib directory from lbl. As stated previously apero_lbl_ref only uses the /red/ directory not the calib dorectory from apero at all.

Extraction is done using the apero calib directory and all lbl stuff is done using the lbl/calib directory. So which are the files missing from?

Note you cannot just copy files into the apero calib directory they should be copied when calibration recipes are run and if they are not there should be a good reason for it unless the recipe crashed between saving files to the red directory and copying them to the apero calib directory.

For lbl/calib it all comes down to apero_lbl_ref as stated before maybe there is a problem in this code but the lbltcalib directory is only for lbl not anything else in apero so no apero reductions should be affected.

Note as well in the apero calib directory it only has files thag are used in other apero recipes not all calib files in the red directory are copied to the apero calib directory.

larnoldgithub commented 3 months ago

@njcuk9999 the issue reported here is not connected to LBL. it just suggests that when apero did the processing of all calibrations, fore some reason it failed copying the FP_FP in the calib/ directory.

njcuk9999 commented 3 months ago

okay then we should find the log for the wave_night on that night, it must have crashed after writing the file to disk and before copying. Otherwise I cannot understand how this could happen.