///set so that only STD_MOS products from chip1 are associated (also to chip2) as flux standard stars are taken only on chip 1 ///Original file: DFO rules provided by Wolfgang by e-mail on 29.03.2012 ///kept only LSS/MOS/MXU (no IMG/PMOS/IPOL) /// Replaced DO.CLASS with REFLEX.CATG throughout /// Replaced PRO.CATG for pipeline products with REFLEX.CATG to avoid association of pre-existing calibration products /// This first block provides a dummy classification to all files, thus overcoming the feature of the DO to stop as soon as one file has no classification. if (T) then { REFLEX.CATG="UNDEFINED"; } /// This block copies PRO.CATG into REFLEX.CATG to cover the case in which the latter is not assigned explicitely below. if PRO.CATG is string then { REFLEX.CATG=PRO.CATG; } if DPR.CATG=="CALIB" and DPR.TYPE=="BIAS" and TPL.NEXP>3 then { RAW.TYPE = "BIAS"; REFLEX.CATG = "BIAS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="DARK" and TPL.NEXP>1 then { RAW.TYPE = "DARK"; REFLEX.CATG = "DARK"; } if DPR.CATG=="CALIB" and DPR.TYPE=="FLAT,LAMP" and INS.MODE=="LSS" and DPR.TECH!="INS-THROUGH" and TPL.NEXP>2 then { RAW.TYPE = "LAMP_LSS"; REFLEX.CATG = "SCREEN_FLAT_LSS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="WAVE,LAMP" and INS.MODE=="LSS" and DPR.TECH!="INS-THROUGH" and TPL.NEXP>2 then { RAW.TYPE = "LAMP_LSS"; REFLEX.CATG = "LAMP_LSS"; } if INS.MODE=="LSS" and INS.SLIT.POS==-999.99 then { RAW.TYPE = "MOS_2_LSS"; REFLEX.CATG = "MOS_2_LSS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="FLAT,LAMP" and INS.MODE=="MOS" and TPL.ID!="FORS2_specphot_cal_daycalib" and TPL.ID!="FORS2_specphot_cal_scrflat_fast" then { RAW.TYPE = "LAMP_MOS"; REFLEX.CATG = "SCREEN_FLAT_MOS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="WAVE,LAMP" and INS.MODE=="MOS" and TPL.ID!="FORS2_specphot_cal_daycalib" and TPL.ID!="FORS2_specphot_cal_wave_fast" then { RAW.TYPE = "LAMP_MOS"; REFLEX.CATG = "LAMP_MOS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="FLAT,LAMP" and INS.MODE=="MOS" and (TPL.ID=="FORS2_specphot_cal_daycalib" or TPL.ID=="FORS2_specphot_cal_scrflat_fast") and TPL.NEXP>2 then { RAW.TYPE = "LAMP_STD"; REFLEX.CATG = "SCREEN_FLAT_MOS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="WAVE,LAMP" and INS.MODE=="MOS" and (TPL.ID=="FORS2_specphot_cal_daycalib" or TPL.ID=="FORS2_specphot_cal_wave_fast") then { RAW.TYPE = "LAMP_STD"; REFLEX.CATG = "LAMP_MOS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="FLAT,LAMP" and INS.MODE=="MXU" then { RAW.TYPE = "LAMP_MXU"; REFLEX.CATG = "SCREEN_FLAT_MXU"; } if DPR.CATG=="CALIB" and DPR.TYPE=="WAVE,LAMP" and INS.MODE=="MXU" then { RAW.TYPE = "LAMP_MXU"; REFLEX.CATG = "LAMP_MXU"; } if DPR.CATG=="CALIB" and DPR.TYPE=="STD" and INS.MODE=="LSS" then { RAW.TYPE = "STD_LSS"; REFLEX.CATG = "STANDARD_LSS"; } if DPR.CATG=="CALIB" and DPR.TYPE=="STD" and INS.MODE=="MOS" then { RAW.TYPE = "STD_MOS"; REFLEX.CATG = "STANDARD_MOS"; } if DPR.CATG=="SCIENCE" and DPR.TYPE=="SKY" and INS.MODE=="LSS" then { RAW.TYPE = "SCI_LSS"; REFLEX.CATG = "SCIENCE_LSS"; REFLEX.TARGET = "T"; ///Needed for Reflex } if DPR.CATG=="SCIENCE" and DPR.TYPE=="SKY" and INS.MODE=="MOS" then { RAW.TYPE = "SCI_MOS"; REFLEX.CATG = "SCIENCE_MOS"; REFLEX.TARGET = "T"; ///Needed for Reflex } if DPR.CATG=="SCIENCE" and DPR.TYPE=="SKY" and INS.MODE=="MXU" then { RAW.TYPE = "SCI_MXU"; REFLEX.CATG = "SCIENCE_MXU"; REFLEX.TARGET = "T"; ///Needed for Reflex } select execute(ACTION_BIAS) from inputFiles where RAW.TYPE=="BIAS" group by DET.READ.CLOCK,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,TPL.START as (TPL_A,tpl); select execute(ACTION_DARK) from inputFiles where RAW.TYPE=="DARK" group by DET.READ.CLOCK,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,TPL.START as (TPL_A,tpl); select execute(ACTION_CAL_STDS) from inputFiles where RAW.TYPE=="LAMP_STD" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,SEQ.SPEC.TARG,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,TPL.START as (TPL_A,tpl); select execute(ACTION_CAL_LSS) from inputFiles where RAW.TYPE=="LAMP_LSS" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,INS.SLIT.NAME,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,TPL.START as (TPL_A,tpl); select execute(ACTION_CAL_MOS) from inputFiles where RAW.TYPE=="LAMP_MOS" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,INS.MOS.CHECKSUM,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,TPL.START as (TPL_A,tpl); select execute(ACTION_CAL_MXU) from inputFiles where RAW.TYPE=="LAMP_MXU" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,INS.MASK.ID,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,TPL.START as (TPL_A,tpl); select execute(ACTION_STD_LSS) from inputFiles where RAW.TYPE=="STD_LSS" group by DET.READ.CLOCK,INS.COLL.NAME,INS.SLIT.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,ARCFILE; select execute(ACTION_STD_MOS) from inputFiles where RAW.TYPE=="STD_MOS" group by DET.READ.CLOCK,INS.COLL.NAME,SEQ.SPEC.TARG,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,ARCFILE; select execute(ACTION_SCI_LSS) from inputFiles where RAW.TYPE=="SCI_LSS" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,INS.SLIT.NAME,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,ARCFILE; select execute(ACTION_SCI_MXU) from inputFiles where RAW.TYPE=="SCI_MXU" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,INS.MASK.ID,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,ARCFILE; select execute(ACTION_SCI_MOS) from inputFiles where RAW.TYPE=="SCI_MOS" group by DET.READ.CLOCK,INS.COLL.NAME,INS.OPTI7.NAME,INS.OPTI5.NAME,INS.OPTI6.NAME,INS.OPTI9.NAME,INS.OPTI10.NAME,INS.MOS.CHECKSUM,DET.CHIP1.ID,DET.WIN1.BINX,DET.WIN1.BINY,ARCFILE; action ACTION_BIAS { recipe fors_bias; product MASTER_BIAS { REFLEX.CATG="MASTER_BIAS"; PRO.EXT="tpl_0000.fits";} } action ACTION_DARK { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; recipe fors_dark; product MASTER_DARK { REFLEX.CATG="MASTER_DARK"; PRO.EXT="tpl_0000.fits";} } action ACTION_CAL_LSS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_LINECAT from calibFiles where PRO.CATG=="MASTER_LINECAT" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; recipe fors_calib; product SLIT_LOCATION_LSS { REFLEX.CATG="SLIT_LOCATION_LSS"; PRO.EXT="tpl_0008.fits";} product MASTER_NORM_FLAT_LSS { REFLEX.CATG="MASTER_NORM_FLAT_LSS"; PRO.EXT="tpl_0001.fits";} product DISP_COEFF_LSS { REFLEX.CATG="DISP_COEFF_LSS"; PRO.EXT="tpl_0006.fits";} } action ACTION_CAL_MOS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_LINECAT from calibFiles where PRO.CATG=="MASTER_LINECAT" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; recipe fors_calib; product SLIT_LOCATION_MOS { REFLEX.CATG="SLIT_LOCATION_MOS"; PRO.EXT="tpl_0008.fits";} product CURV_COEFF_MOS { REFLEX.CATG="CURV_COEFF_MOS"; PRO.EXT="tpl_0010.fits";} product MASTER_NORM_FLAT_MOS { REFLEX.CATG="MASTER_NORM_FLAT_MOS"; PRO.EXT="tpl_0001.fits";} product DISP_COEFF_MOS { REFLEX.CATG="DISP_COEFF_MOS"; PRO.EXT="tpl_0006.fits";} } action ACTION_CAL_MXU { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_LINECAT from calibFiles where PRO.CATG=="MASTER_LINECAT" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; recipe fors_calib; product SLIT_LOCATION_MXU { REFLEX.CATG="SLIT_LOCATION_MXU"; PRO.EXT="tpl_0008.fits";} product CURV_COEFF_MXU { REFLEX.CATG="CURV_COEFF_MXU"; PRO.EXT="tpl_0010.fits";} product MASTER_NORM_FLAT_MXU { REFLEX.CATG="MASTER_NORM_FLAT_MXU"; PRO.EXT="tpl_0001.fits";} product DISP_COEFF_MXU { REFLEX.CATG="DISP_COEFF_MXU"; PRO.EXT="tpl_0006.fits";} } action ACTION_CAL_STDS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_LINECAT from calibFiles where PRO.CATG=="MASTER_LINECAT" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; recipe fors_calib; product SLIT_LOCATION_LONG_MOS { REFLEX.CATG="SLIT_LOCATION_LONG_MOS"; PRO.EXT="tpl_0008.fits";} product MASTER_NORM_FLAT_LONG_MOS { REFLEX.CATG="MASTER_NORM_FLAT_LONG_MOS"; PRO.EXT="tpl_0001.fits";} product DISP_COEFF_LONG_MOS { REFLEX.CATG="DISP_COEFF_LONG_MOS"; PRO.EXT="tpl_0006.fits";} } action ACTION_STD_LSS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_NORM_FLAT_LSS from calibFiles where REFLEX.CATG=="MASTER_NORM_FLAT_LSS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.SLIT.NAME==INS.SLIT.NAME and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as DISP_COEFF_LSS from calibFiles where REFLEX.CATG=="DISP_COEFF_LSS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.SLIT.NAME==INS.SLIT.NAME and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as SLIT_LOCATION_LSS from calibFiles where REFLEX.CATG=="SLIT_LOCATION_LSS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.SLIT.NAME==INS.SLIT.NAME and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 0; maxRet = 1; select file as STD_FLUX_TABLE from calibFiles where PRO.CATG=="STD_FLUX_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.OBS.TARG.NAME==OBS.TARG.NAME ; /// Added because the standard needs an extinction table associated directly to it. minRet = 1; maxRet = 1; select file as EXTINCT_TABLE from calibFiles where PRO.CATG=="EXTINCT_TABLE" ; recipe fors_science; product SPECPHOT_TABLE { REFLEX.CATG="SPECPHOT_TABLE" ; PRO.EXT="0005.fits";} } action ACTION_STD_MOS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_NORM_FLAT_LONG_MOS from calibFiles where REFLEX.CATG=="MASTER_NORM_FLAT_LONG_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as DISP_COEFF_LONG_MOS from calibFiles where REFLEX.CATG=="DISP_COEFF_LONG_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as SLIT_LOCATION_LONG_MOS from calibFiles where REFLEX.CATG=="SLIT_LOCATION_LONG_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 0; maxRet = 1; select file as STD_FLUX_TABLE from calibFiles where PRO.CATG=="STD_FLUX_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.OBS.TARG.NAME==OBS.TARG.NAME ; /// Added because the standard needs an extinction table associated directly to it. minRet = 1; maxRet = 1; select file as EXTINCT_TABLE from calibFiles where PRO.CATG=="EXTINCT_TABLE" ; recipe fors_science; product SPECPHOT_TABLE { REFLEX.CATG="SPECPHOT_TABLE"; PRO.EXT="0005.fits";} } action ACTION_SCI_LSS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_NORM_FLAT_LSS from calibFiles where REFLEX.CATG=="MASTER_NORM_FLAT_LSS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.SLIT.NAME==INS.SLIT.NAME and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as DISP_COEFF_LSS from calibFiles where REFLEX.CATG=="DISP_COEFF_LSS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.SLIT.NAME==INS.SLIT.NAME and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as SLIT_LOCATION_LSS from calibFiles where REFLEX.CATG=="SLIT_LOCATION_LSS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.SLIT.NAME==INS.SLIT.NAME and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 0; maxRet = 1; select file as SPECPHOT_TABLE from calibFiles where REFLEX.CATG=="SPECPHOT_TABLE" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.DET.CHIP1.NAME==DET.CHIP1.NAME and (DET.CHIP1.ID=="CCID20-14-5-3" or DET.CHIP1.ID=="Norma III") and ((SEQ.SPEC.TARG=="LSS_0.3_arcsec" and inputFile.INS.SLIT.NAME=="lSlit0_3arcsec") or (SEQ.SPEC.TARG=="LSS_0.4_arcsec" and inputFile.INS.SLIT.NAME=="lSlit0_4arcsec") or (SEQ.SPEC.TARG=="LSS_0.5_arcsec" and inputFile.INS.SLIT.NAME=="lSlit0_5arcsec") or (SEQ.SPEC.TARG=="LSS_0.7_arcsec" and inputFile.INS.SLIT.NAME=="lSlit0_7arcsec") or (SEQ.SPEC.TARG=="LSS_1.0_arcsec" and inputFile.INS.SLIT.NAME=="lSlit1_0arcsec") or (SEQ.SPEC.TARG=="LSS_1.3_arcsec" and inputFile.INS.SLIT.NAME=="lSlit1_3arcsec") or (SEQ.SPEC.TARG=="LSS_1.6_arcsec" and inputFile.INS.SLIT.NAME=="lSlit1_6arcsec") or (SEQ.SPEC.TARG=="LSS_2.0_arcsec" and inputFile.INS.SLIT.NAME=="lSlit2_0arcsec") or (SEQ.SPEC.TARG=="LSS_2.5_arcsec" and inputFile.INS.SLIT.NAME=="lSlit2_5arcsec")) ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as EXTINCT_TABLE from calibFiles where PRO.CATG=="EXTINCT_TABLE" ; recipe fors_science; } action ACTION_SCI_MOS { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_NORM_FLAT_MOS from calibFiles where REFLEX.CATG=="MASTER_NORM_FLAT_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as DISP_COEFF_MOS from calibFiles where REFLEX.CATG=="DISP_COEFF_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as SLIT_LOCATION_MOS from calibFiles where REFLEX.CATG=="SLIT_LOCATION_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as CURV_COEFF_MOS from calibFiles where REFLEX.CATG=="CURV_COEFF_MOS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MOS.CHECKSUM <= INS.MOS.CHECKSUM + 1 and inputFile.INS.MOS.CHECKSUM >= INS.MOS.CHECKSUM - 1 and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 0; maxRet = 1; select file as SPECPHOT_TABLE from calibFiles where REFLEX.CATG=="SPECPHOT_TABLE" and SEQ.SPEC.TARG=="MOS_center" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.DET.CHIP1.NAME==DET.CHIP1.NAME and (DET.CHIP1.ID=="CCID20-14-5-3" or DET.CHIP1.ID=="Norma III") ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as EXTINCT_TABLE from calibFiles where PRO.CATG=="EXTINCT_TABLE" ; recipe fors_science; } action ACTION_SCI_MXU { minRet = 1; maxRet = 1; select file as MASTER_BIAS from calibFiles where REFLEX.CATG=="MASTER_BIAS" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as MASTER_NORM_FLAT_MXU from calibFiles where REFLEX.CATG=="MASTER_NORM_FLAT_MXU" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MASK.ID==INS.MASK.ID and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as DISP_COEFF_MXU from calibFiles where REFLEX.CATG=="DISP_COEFF_MXU" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MASK.ID==INS.MASK.ID and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as SLIT_LOCATION_MXU from calibFiles where REFLEX.CATG=="SLIT_LOCATION_MXU" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.READ.CLOCK==DET.READ.CLOCK and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MASK.ID==INS.MASK.ID and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 1; maxRet = 1; select file as CURV_COEFF_MXU from calibFiles where REFLEX.CATG=="CURV_COEFF_MXU" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.MASK.ID==INS.MASK.ID and inputFile.DET.CHIP1.ID==DET.CHIP1.ID ; minRet = 0; maxRet = 1; select file as SPECPHOT_TABLE from calibFiles where REFLEX.CATG=="SPECPHOT_TABLE" and SEQ.SPEC.TARG=="MOS_center" and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.COLL.NAME==INS.COLL.NAME and inputFile.INS.OPTI5.NAME==INS.OPTI5.NAME and inputFile.INS.OPTI6.NAME==INS.OPTI6.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME and inputFile.INS.OPTI9.NAME==INS.OPTI9.NAME and inputFile.INS.OPTI10.NAME==INS.OPTI10.NAME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.DET.CHIP1.NAME==DET.CHIP1.NAME and (DET.CHIP1.ID=="CCID20-14-5-3" or DET.CHIP1.ID=="Norma III") ; minRet = 1; maxRet = 1; select file as GRISM_TABLE from calibFiles where PRO.CATG=="GRISM_TABLE" and inputFile.INSTRUME==INSTRUME and inputFile.INS.GRIS1.ID==INS.GRIS1.ID and inputFile.INS.GRIS1.NAME==INS.GRIS1.NAME and inputFile.INS.OPTI7.NAME==INS.OPTI7.NAME ; minRet = 1; maxRet = 1; select file as EXTINCT_TABLE from calibFiles where PRO.CATG=="EXTINCT_TABLE" ; recipe fors_science; }Espectroscopia