if DPR.CATG like "%CALIB%" and DPR.TYPE like "%BIAS%" and DET.CHIPS == 1 then
{
  DO.CATG = "BIAS_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%BIAS%" and DET.CHIPS == 2 then
{
  DO.CATG = "BIAS_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%BIAS%" and DET.CHIPS == 1 then
{
  DO.CATG = "BIAS_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%BIAS%" and DET.CHIPS == 2 then
{
  DO.CATG = "BIAS_TEST_RED";
}

if DPR.CATG like "%CALIB%" and DPR.TYPE like "%BIAS,DETCHAR%" and DET.CHIPS == 1 then
{
  RAW.TYPE = "LINEARITY_BLUE_DETCHAR";
  DO.CATG = "OFF_RAW";}

if DPR.CATG like "%CALIB%" and DPR.TYPE like "%BIAS,DETCHAR%" and DET.CHIPS == 2 then
{
  RAW.TYPE = "LINEARITY_RED_DETCHAR";
  DO.CATG = "OFF_RAW";
}

if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%CDALIGN%" and ( DPR.TECH like "%IMAGE%" or DPR.TECH like "%SPECTRUM%" ) and DET.CHIPS == 1 then
{
  DO.CATG = "CD_ALIGN_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%CDALIGN%" and ( DPR.TECH like "%IMAGE%" or DPR.TECH like "%SPECTRUM%" ) and DET.CHIPS == 2 then
{
  DO.CATG = "CD_ALIGN_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%IMAGE%" and DPR.TYPE like "%TEST%" and DET.CHIPS == 1 then
{
  DO.CATG = "TEST_IMAGE_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%IMAGE%" and DPR.TYPE like "%TEST%" and DET.CHIPS == 2 then
{
  DO.CATG = "TEST_IMAGE_RED";
}

if DPR.CATG like "%TEST%" and DPR.TYPE like "%DARK%" and DET.CHIPS == 1 then
{
  DO.CATG = "DARK_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%DARK%" and DET.CHIPS == 2 then
{
  DO.CATG = "DARK_TEST_RED";
}

if DPR.CATG like "%CALIB%" and DPR.TYPE like "%DARK%" and DET.CHIPS == 1 then
{
  DO.CATG = "DARK_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%PARASITIC%" and DET.CHIPS == 1 then
{
  DO.CATG = "PDARK_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%DARK%" and DET.CHIPS == 2 then
{
  DO.CATG = "DARK_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%PARASITIC%" and DET.CHIPS == 2 then
{
  DO.CATG = "PDARK_RED";
}

if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "FLAT_BLUE";
}
if DPR.CATG like "%test%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FLAT%" and DPR.TECH like "%IMAGE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "FLAT_IMAGE_test_BLUE";
}
if DPR.CATG like "%test%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FLAT%" and DPR.TECH like "%IMAGE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "FLAT_IMAGE_test_RED";
}
if DPR.CATG like "%test%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "FLAT_ECHELLE_test_BLUE";
}
if DPR.CATG like "%test%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "FLAT_ECHELLE_test_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "FLAT_ECHELLE_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "FLAT_ECHELLE_TEST_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%IMAGE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "FLAT_IMAGE_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%IMAGE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "FLAT_IMAGE_TEST_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,FLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "FLAT_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,DFLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "DFLAT_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,TFLAT%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "TFLAT_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,TFLAT%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "TFLAT_TEST_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,TFLAT%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "TFLAT_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,DFLAT%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "DFLAT_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,TFLAT%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "TFLAT_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,SFLAT%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SFLAT_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,IFLAT%" and DPR.TECH like "%ECHELLE%" and DPR.TECH like "%ABSORPTION-CELL%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "IFLAT_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,IFLAT%" and DPR.TECH like "%ECHELLE%" and DPR.TECH like "%ABSORPTION-CELL%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "IFLAT_RED";
}

if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FLAT%" and DPR.TECH like "%IMAGE%" and DET.CHIPS == 1 then
{
  RAW.TYPE = "SCREEN_FLAT_BLUE";
  DO.CATG = "ON_RAW";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FLAT%" and DPR.TECH like "%IMAGE%" and DET.CHIPS == 2 then
{
  RAW.TYPE = "SCREEN_FLAT_RED";
  DO.CATG = "ON_RAW";
}



if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,FLAT,DETCHAR%" and DPR.TECH like "%IMAGE%" and DET.CHIPS == 1 then
{
  RAW.TYPE = "LINEARITY_BLUE_DETCHAR";
  DO.CATG = "ON_RAW";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,FLAT,DETCHAR%" and DPR.TECH like "%IMAGE%" and DET.CHIPS == 2 then
{
  RAW.TYPE = "LINEARITY_RED_DETCHAR";
  DO.CATG = "ON_RAW";
}


if DPR.CATG like "%test%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%WAVE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ARC_LAMP_test_BLUE";
}
if DPR.CATG like "%test%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%WAVE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ARC_LAMP_test_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%ORDERDEF%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ORDER_FLAT_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%ORDERDEF%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ORDER_FLAT_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%WAVE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ARC_LAMP_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%WAVE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ARC_LAMP_RED";
}
if DPR.CATG like "%IGNOREME%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FMTCHK%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ARC_LAMP_FORM_IGNOREME_BLUE";
}
if DPR.CATG like "%IGNOREME%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FMTCHK%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ARC_LAMP_FORM_IGNOREME_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FMTCHK%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ARC_LAMP_FORM_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FMTCHK%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ARC_LAMP_FORM_TEST_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FMTCHK%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ARC_LAMP_FORM_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%FMTCHK%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ARC_LAMP_FORM_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%STD%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "STANDARD_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%STD%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "STANDARD_TEST_RED";
}
if DPR.CATG like "%ACQUISITION%" and DPR.TECH like "%IMAGE%" and DPR.TYPE like "%SLIT%" and DET.CHIPS == 1 then
{
  DO.CATG = "ACQUISITION_SLIT_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%TEST%" and DET.CHIPS == 1 then
{
  DO.CATG = "TEST_IMAGE_ECHELLE_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%TEST%" and DET.CHIPS == 2 then
{
  DO.CATG = "TEST_IMAGE_ECHELLE_RED";
}
if DPR.CATG like "%ACQUISITION%" and DPR.TECH like "%IMAGE%" and DPR.TYPE like "%SLIT%" and DET.CHIPS == 2 then
{
  DO.CATG = "ACQUISITION_SLIT_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%STD%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 1 then
{
  DO.CATG = "STANDARD_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%STD%" and DPR.TECH like "%ECHELLE%" and DET.CHIPS == 2 then
{
  DO.CATG = "STANDARD_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%OBJECT%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCIENCE_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%FLAT,SKY%" and DPR.TYPE like "%OBJECT,EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCI_EXTND_FLAT_SKY_OBJ_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%FLAT,SKY%" and DPR.TYPE like "%OBJECT,EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCI_EXTND_FLAT_SKY_OBJ_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%FLAT,SKY,EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "FLAT_SKY_EXTND_BLUE";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%FLAT,SKY,EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "FLAT_SKY_EXTND_RED";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCI_EXTND_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCI_EXTND_TEST_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCI_EXTND_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%TEST%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "TEST_POINT_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%TEST%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "TEST_POINT_TEST_RED";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%POINT%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCI_POINT_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%POINT%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCI_POINT_TEST_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%POINT%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCI_POINT_BLUE";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%OBJECT%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCIENCE_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%EXTENDED%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCI_EXTND_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and DPR.TYPE like "%POINT%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCI_POINT_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%WAVE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 1 then
{
  DO.CATG = "ARC_LAMP_TEST_BLUE";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP%" and DPR.TYPE like "%WAVE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%FREE%" and DET.CHIPS == 2 then
{
  DO.CATG = "ARC_LAMP_TEST_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%SLIC#%" and DET.CHIPS == 1 then
{
  DO.CATG = "SCI_SLICER_BLUE";
}
if DPR.CATG like "%SCIENCE%" and DPR.TECH like "%ECHELLE%" and INS.SLIT1.NAME like "%SLIC#%" and DET.CHIPS == 2 then
{
  DO.CATG = "SCI_SLICER_RED";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 and DPR.TYPE like "%LAMP,FLAT,ODD%" then
{
  DO.CATG = "FIB_FF_ODD_TEST_RED";
}
if DPR.CATG like "%TEST%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 and DPR.TYPE like "%LAMP,FLAT,EVEN%" then
{
  DO.CATG = "FIB_FF_EVEN_TEST_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 and DPR.TYPE like "%LAMP,FLAT,ODD%" then
{
  DO.CATG = "FIB_FF_ODD_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 and DPR.TYPE like "%LAMP,FLAT,NASMYTH%" then
{
  DO.CATG = "FIB_FF_NASMYTH_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 and DPR.TYPE like "%LAMP,FLAT,EVEN%" then
{
  DO.CATG = "FIB_FF_EVEN_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 and DPR.TYPE like "%LAMP,FLAT,ALL%" then
{
  DO.CATG = "FIB_FF_ALL_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,ORDERDEF%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_ORDEF_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%LAMP,FMTCHK%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_ARC_LAMP_FORM_TEST_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,FMTCHK%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_ARC_LAMP_FORM_RED";
}
if DPR.CATG like "%CALIB%" and DPR.TYPE like "%LAMP,WAVE%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_ARC_LAMP_RED";
}
if DPR.CATG like "%TEST%" and DPR.TYPE like "%OBJECT%" and DPR.TYPE like "%OzPoz%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_SCI_TEST_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TYPE like "%OBJECT%" and DPR.TYPE like "%OzPoz%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_SCI_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TYPE like "%OBJECT%" and DPR.TYPE like "%SimCal%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_SCI_SIM_RED";
}
if DPR.CATG like "%SCIENCE%" and DPR.TYPE like "%OBJECT,COMBINED%" and DPR.TECH like "%MOS%" and DET.CHIPS == 2 then
{
  DO.CATG = "FIB_SCI_COM_RED";
}

if PRO.CATG like "%FIB_DRS_REDL%" then
{
  DO.CATG = "FIB_DRS_REDL";
}
if PRO.CATG like "%FIB_DRS_REDU%" then
{
  DO.CATG = "FIB_DRS_REDU";
}
if PRO.CATG like "%ORDER_GUESS_TAB_BLUE%" then
{
  DO.CATG = "ORDER_GUESS_TAB_BLUE";
}
if PRO.CATG like "%ORDER_GUESS_TAB_REDL%" then
{
  DO.CATG = "ORDER_GUESS_TAB_REDL";
}
if PRO.CATG like "%ORDER_GUESS_TAB_REDU%" then
{
  DO.CATG = "ORDER_GUESS_TAB_REDU";
}
if PRO.CATG like "%LINE_GUESS_TAB_BLUE%" then
{
  DO.CATG = "LINE_GUESS_TAB_BLUE";
}
if PRO.CATG like "%LINE_GUESS_TAB_REDL%" then
{
  DO.CATG = "LINE_GUESS_TAB_REDL";
}
if PRO.CATG like "%LINE_GUESS_TAB_REDU%" then
{
  DO.CATG = "LINE_GUESS_TAB_REDU";
}
if PRO.CATG like "%ORDER_TABLE_BLUE%" then
{
  DO.CATG = "ORDER_TABLE_BLUE";
}
if PRO.CATG like "%ORDER_TABLE_REDL%" then
{
  DO.CATG = "ORDER_TABLE_REDL";
}
if PRO.CATG like "%ORDER_TABLE_REDU%" then
{
  DO.CATG = "ORDER_TABLE_REDU";
}
if PRO.CATG like "%FIB_ORD_GUE_REDL%" then
{
  DO.CATG = "FIB_ORD_GUE_REDL";
}
if PRO.CATG like "%FIB_ORD_GUE_REDU%" then
{
  DO.CATG = "FIB_ORD_GUE_REDU";
}
if PRO.CATG like "%FIB_ORD_TAB_REDL%" then
{
  DO.CATG = "FIB_ORD_TAB_REDL";
}
if PRO.CATG like "%FIB_ORD_TAB_REDU%" then
{
  DO.CATG = "FIB_ORD_TAB_REDU";
}
if PRO.CATG like "%LINE_GUESS_TAB_BLUE%" then
{
  DO.CATG = "LINE_GUESS_TAB_BLUE";
}
if PRO.CATG like "%LINE_TABLE_BLUE%" then
{
  DO.CATG = "LINE_TABLE_BLUE";
}
if PRO.CATG like "%LINE_GUESS_TAB_REDL%" then
{
  DO.CATG = "LINE_GUESS_TAB_REDL";
}
if PRO.CATG like "%FIB_LIN_GUE_REDL%" then
{
  DO.CATG = "FIB_LIN_GUE_REDL";
}
if PRO.CATG like "%LINE_TABLE_REDL%" then
{
  DO.CATG = "LINE_TABLE_REDL";
}
if PRO.CATG like "%LINE_GUESS_TAB_REDU%" then
{
  DO.CATG = "LINE_GUESS_TAB_REDU";
}
if PRO.CATG like "%FIB_LIN_GUE_REDU%" then
{
  DO.CATG = "FIB_LIN_GUE_REDU";
}
if PRO.CATG like "%LINE_TABLE_REDU%" then
{
  DO.CATG = "LINE_TABLE_REDU";
}
if PRO.CATG like "%LINE_REFER_TABLE%" then
{
  DO.CATG = "LINE_REFER_TABLE";
}
if PRO.CATG like "%FLUX_STD_TABLE%" then
{
  DO.CATG = "FLUX_STD_TABLE";
}
if PRO.CATG like "%CORVEL_MASK%" then
{
  DO.CATG = "CORVEL_MASK";
}
if PRO.CATG like "%EXTCOEFF_TABLE%" then
{
  DO.CATG = "EXTCOEFF_TABLE";
}
if PRO.CATG like "%CCD_TABLE_BLUE%" then
{
  DO.CATG = "CCD_TABLE_BLUE";
}
if PRO.CATG like "%CCD_TABLE_REDL%" then
{
  DO.CATG = "CCD_TABLE_REDL";
}
if PRO.CATG like "%CCD_TABLE_REDU%" then
{
  DO.CATG = "CCD_TABLE_REDU";
}
if PRO.CATG like "%MASTER_BIAS_BLUE%" then
{
  DO.CATG = "MASTER_BIAS_BLUE";
}
if PRO.CATG like "%MASTER_BIAS_REDL%" then
{
  DO.CATG = "MASTER_BIAS_REDL";
}
if PRO.CATG like "%MASTER_BIAS_REDU%" then
{
  DO.CATG = "MASTER_BIAS_REDU";
}
if PRO.CATG like "%MASTER_DARK_BLUE%" then
{
  DO.CATG = "MASTER_DARK_BLUE";
}
if PRO.CATG like "%MASTER_DARK_REDL%" then
{
  DO.CATG = "MASTER_DARK_REDL";
}
if PRO.CATG like "%MASTER_DARK_REDU%" then
{
  DO.CATG = "MASTER_DARK_REDU";
}
if PRO.CATG like "%MASTER_FLAT_BLUE%" then
{
  DO.CATG = "MASTER_FLAT_BLUE";
}
if PRO.CATG like "%MASTER_FLAT_REDL%" then
{
  DO.CATG = "MASTER_FLAT_REDL";
}
if PRO.CATG like "%MASTER_FLAT_REDU%" then
{
  DO.CATG = "MASTER_FLAT_REDU";
}
if PRO.CATG like "%MASTER_TFLAT_BLUE%" then
{
  DO.CATG = "MASTER_TFLAT_BLUE";
}
if PRO.CATG like "%MASTER_TFLAT_REDL%" then
{
  DO.CATG = "MASTER_TFLAT_REDL";
}
if PRO.CATG like "%MASTER_TFLAT_REDU%" then
{
  DO.CATG = "MASTER_TFLAT_REDU";
}
if PRO.CATG like "%REF_TFLAT_BLUE%" then
{
  DO.CATG = "REF_TFLAT_BLUE";
}
if PRO.CATG like "%REF_TFLAT_REDL%" then
{
  DO.CATG = "REF_TFLAT_REDL";
}
if PRO.CATG like "%REF_TFLAT_REDU%" then
{
  DO.CATG = "REF_TFLAT_REDU";
}
if PRO.CATG like "%MASTER_DFLAT_BLUE%" then
{
  DO.CATG = "MASTER_DFLAT_BLUE";
}
if PRO.CATG like "%MASTER_DFLAT_REDL%" then
{
  DO.CATG = "MASTER_DFLAT_REDL";
}
if PRO.CATG like "%MASTER_DFLAT_REDU%" then
{
  DO.CATG = "MASTER_DFLAT_REDU";
}
if PRO.CATG like "%MASTER_IFLAT_BLUE%" then
{
  DO.CATG = "MASTER_IFLAT_BLUE";
}
if PRO.CATG like "%MASTER_IFLAT_REDL%" then
{
  DO.CATG = "MASTER_IFLAT_REDL";
}
if PRO.CATG like "%MASTER_IFLAT_REDU%" then
{
  DO.CATG = "MASTER_IFLAT_REDU";
}
if PRO.CATG like "%MASTER_FORM_BLUE%" then
{
  DO.CATG = "MASTER_FORM_BLUE";
}
if PRO.CATG like "%MASTER_FORM_REDL%" then
{
  DO.CATG = "MASTER_FORM_REDL";
}
if PRO.CATG like "%MASTER_FORM_REDU%" then
{
  DO.CATG = "MASTER_FORM_REDU";
}
if PRO.CATG like "%MASTER_RESPONSE_BLUE%" then
{
  DO.CATG = "MASTER_RESPONSE_BLUE";
}
if PRO.CATG like "%MASTER_RESPONSE_REDL%" then
{
  DO.CATG = "MASTER_RESPONSE_REDL";
}
if PRO.CATG like "%MASTER_RESPONSE_REDU%" then
{
  DO.CATG = "MASTER_RESPONSE_REDU";
}
if PRO.CATG like "%INSTR_RESPONSE_BLUE%" then
{
  DO.CATG = "INSTR_RESPONSE_BLUE";
}
if PRO.CATG like "%INSTR_RESPONSE_REDL%" then
{
  DO.CATG = "INSTR_RESPONSE_REDL";
}
if PRO.CATG like "%INSTR_RESPONSE_REDU%" then
{
  DO.CATG = "INSTR_RESPONSE_REDU";
}
if PRO.CATG like "%EXTRACT_SCIENCE_BLUE%" then
{
  DO.CATG = "EXTRACT_SCIENCE_BLUE";
}
if PRO.CATG like "%EXTRACT_SCIENCE_REDL%" then
{
  DO.CATG = "EXTRACT_SCIENCE_REDL";
}
if PRO.CATG like "%EXTRACT_SCIENCE_REDU%" then
{
  DO.CATG = "EXTRACT_SCIENCE_REDU";
}
if PRO.CATG like "%FLUXCAL_SCIENCE_BLUE%" then
{
  DO.CATG = "FLUXCAL_SCIENCE_BLUE";
}
if PRO.CATG like "%FLUXCAL_SCIENCE_REDL%" then
{
  DO.CATG = "FLUXCAL_SCIENCE_REDL";
}
if PRO.CATG like "%FLUXCAL_SCIENCE_REDU%" then
{
  DO.CATG = "FLUXCAL_SCIENCE_REDU";
}
if PRO.CATG like "%REDUCED_SCIENCE_BLUE%" then
{
  DO.CATG = "REDUCED_SCIENCE_BLUE";
}
if PRO.CATG like "%REDUCED_SCIENCE_REDL%" then
{
  DO.CATG = "REDUCED_SCIENCE_REDL";
}
if PRO.CATG like "%REDUCED_SCIENCE_REDU%" then
{
  DO.CATG = "REDUCED_SCIENCE_REDU";
}
if PRO.CATG like "%FIB_ORDEF_REDL%" then
{
  DO.CATG = "FIB_ORDEF_REDL";
}
if PRO.CATG like "%FIB_ORDEF_REDU%" then
{
  DO.CATG = "FIB_ORDEF_REDU";
}
if PRO.CATG like "%MASTER_SFLAT_REDL%" then
{
  DO.CATG = "MASTER_SFLAT_REDL";
}
if PRO.CATG like "%MASTER_SFLAT_REDU%" then
{
  DO.CATG = "MASTER_SFLAT_REDU";
}
if PRO.CATG like "%FIB_ORDEF_TABLE_REDL%" then
{
  DO.CATG = "FIB_ORDEF_TABLE_REDL";
}
if PRO.CATG like "%FIB_ORDEF_TABLE_REDU%" then
{
  DO.CATG = "FIB_ORDEF_TABLE_REDU";
}
if PRO.CATG like "%FIB_LINE_GUESS_TAB_REDL%" then
{
  DO.CATG = "FIB_LINE_GUESS_TAB_REDL";
}
if PRO.CATG like "%FIB_LINE_GUESS_TAB_REDU%" then
{
  DO.CATG = "FIB_LINE_GUESS_TAB_REDU";
}
if PRO.CATG like "%FIB_LINE_TABLE_REDL%" then
{
  DO.CATG = "FIB_LINE_TABLE_REDL";
}
if PRO.CATG like "%FIB_LINE_TABLE_REDU%" then
{
  DO.CATG = "FIB_LINE_TABLE_REDU";
}
if PRO.CATG like "%FIB_FF_DTC_REDL%" then
{
  DO.CATG = "FIB_FF_DTC_REDL";
}
if PRO.CATG like "%FIB_FF_DTC_REDU%" then
{
  DO.CATG = "FIB_FF_DTC_REDU";
}
if PRO.CATG like "%FIB_FF_DT1_REDL%" then
{
  DO.CATG = "FIB_FF_DT1_REDL";
}
if PRO.CATG like "%FIB_FF_DT1_REDU%" then
{
  DO.CATG = "FIB_FF_DT1_REDU";
}
if PRO.CATG like "%FIB_FF_DT2_REDL%" then
{
  DO.CATG = "FIB_FF_DT2_REDL";
}
if PRO.CATG like "%FIB_FF_DT2_REDU%" then
{
  DO.CATG = "FIB_FF_DT2_REDU";
}
if PRO.CATG like "%FIB_FF_DT3_REDL%" then
{
  DO.CATG = "FIB_FF_DT3_REDL";
}
if PRO.CATG like "%FIB_FF_DT3_REDU%" then
{
  DO.CATG = "FIB_FF_DT3_REDU";
}
if PRO.CATG like "%FIB_FF_SGC_REDL%" then
{
  DO.CATG = "FIB_FF_SGC_REDL";
}
if PRO.CATG like "%FIB_FF_SGC_REDU%" then
{
  DO.CATG = "FIB_FF_SGC_REDU";
}
if PRO.CATG like "%FIB_FF_SG1_REDL%" then
{
  DO.CATG = "FIB_FF_SG1_REDL";
}
if PRO.CATG like "%FIB_FF_SG1_REDU%" then
{
  DO.CATG = "FIB_FF_SG1_REDU";
}
if PRO.CATG like "%FIB_FF_SG2_REDL%" then
{
  DO.CATG = "FIB_FF_SG2_REDL";
}
if PRO.CATG like "%FIB_FF_SG2_REDU%" then
{
  DO.CATG = "FIB_FF_SG2_REDU";
}
if PRO.CATG like "%FIB_FF_SG3_REDL%" then
{
  DO.CATG = "FIB_FF_SG3_REDL";
}
if PRO.CATG like "%FIB_FF_SG3_REDU%" then
{
  DO.CATG = "FIB_FF_SG3_REDU";
}
if PRO.CATG like "%FIB_FF_BPC_REDL%" then
{
  DO.CATG = "FIB_FF_BPC_REDL";
}
if PRO.CATG like "%FIB_FF_BP1_REDL%" then
{
  DO.CATG = "FIB_FF_BP1_REDL";
}
if PRO.CATG like "%FIB_FF_BPC_REDU%" then
{
  DO.CATG = "FIB_FF_BPC_REDU";
}
if PRO.CATG like "%FIB_FF_BP1_REDU%" then
{
  DO.CATG = "FIB_FF_BP1_REDU";
}
if PRO.CATG like "%FIB_FF_BP2_REDL%" then
{
  DO.CATG = "FIB_FF_BP2_REDL";
}
if PRO.CATG like "%FIB_FF_BP2_REDU%" then
{
  DO.CATG = "FIB_FF_BP2_REDU";
}
if PRO.CATG like "%FIB_FF_BP3_REDL%" then
{
  DO.CATG = "FIB_FF_BP3_REDL";
}
if PRO.CATG like "%FIB_FF_BP3_REDU%" then
{
  DO.CATG = "FIB_FF_BP3_REDU";
}
if PRO.CATG like "%FIB_FF_COM_REDL%" then
{
  DO.CATG = "FIB_FF_COM_REDL";
}
if PRO.CATG like "%FIB_FF_COM_REDU%" then
{
  DO.CATG = "FIB_FF_COM_REDU";
}
if PRO.CATG like "%FIB_FF_NOR_REDL%" then
{
  DO.CATG = "FIB_FF_NOR_REDL";
}
if PRO.CATG like "%FIB_FF_NOR_REDU%" then
{
  DO.CATG = "FIB_FF_NOR_REDU";
}
if PRO.CATG like "%FIB_FF_NSG_REDL%" then
{
  DO.CATG = "FIB_FF_NSG_REDL";
}
if PRO.CATG like "%FIB_FF_NSG_REDU%" then
{
  DO.CATG = "FIB_FF_NSG_REDU";
}
if PRO.CATG like "%SLIT_FF_DTC_REDL%" then
{
  DO.CATG = "SLIT_FF_DTC_REDL";
}
if PRO.CATG like "%SLIT_FF_DT1_REDL%" then
{
  DO.CATG = "SLIT_FF_DT1_REDL";
}
if PRO.CATG like "%SLIT_FF_DTC_REDU%" then
{
  DO.CATG = "SLIT_FF_DTC_REDU";
}
if PRO.CATG like "%SLIT_FF_DT1_REDU%" then
{
  DO.CATG = "SLIT_FF_DT1_REDU";
}
if PRO.CATG like "%SLIT_FF_DT2_REDL%" then
{
  DO.CATG = "SLIT_FF_DT2_REDL";
}
if PRO.CATG like "%SLIT_FF_DT2_REDU%" then
{
  DO.CATG = "SLIT_FF_DT2_REDU";
}
if PRO.CATG like "%SLIT_FF_DT3_REDL%" then
{
  DO.CATG = "SLIT_FF_DT3_REDL";
}
if PRO.CATG like "%SLIT_FF_DT3_REDU%" then
{
  DO.CATG = "SLIT_FF_DT3_REDU";
}
if PRO.CATG like "%SLIT_FF_SGC_REDL%" then
{
  DO.CATG = "SLIT_FF_SGC_REDL";
}
if PRO.CATG like "%SLIT_FF_SG1_REDL%" then
{
  DO.CATG = "SLIT_FF_SG1_REDL";
}
if PRO.CATG like "%SLIT_FF_SGC_REDU%" then
{
  DO.CATG = "SLIT_FF_SGC_REDU";
}
if PRO.CATG like "%SLIT_FF_SG1_REDU%" then
{
  DO.CATG = "SLIT_FF_SG1_REDU";
}
if PRO.CATG like "%SLIT_FF_SG2_REDL%" then
{
  DO.CATG = "SLIT_FF_SG2_REDL";
}
if PRO.CATG like "%SLIT_FF_SG2_REDU%" then
{
  DO.CATG = "SLIT_FF_SG2_REDU";
}
if PRO.CATG like "%SLIT_FF_SG3_REDL%" then
{
  DO.CATG = "SLIT_FF_SG3_REDL";
}
if PRO.CATG like "%SLIT_FF_SG3_REDU%" then
{
  DO.CATG = "SLIT_FF_SG3_REDU";
}
if PRO.CATG like "%SLIT_FF_BPC_REDL%" then
{
  DO.CATG = "SLIT_FF_BPC_REDL";
}
if PRO.CATG like "%SLIT_FF_BP1_REDL%" then
{
  DO.CATG = "SLIT_FF_BP1_REDL";
}
if PRO.CATG like "%SLIT_FF_BPC_REDU%" then
{
  DO.CATG = "SLIT_FF_BPC_REDU";
}
if PRO.CATG like "%SLIT_FF_BP1_REDU%" then
{
  DO.CATG = "SLIT_FF_BP1_REDU";
}
if PRO.CATG like "%SLIT_FF_BP2_REDL%" then
{
  DO.CATG = "SLIT_FF_BP2_REDL";
}
if PRO.CATG like "%SLIT_FF_BP2_REDU%" then
{
  DO.CATG = "SLIT_FF_BP2_REDU";
}
if PRO.CATG like "%SLIT_FF_BP3_REDL%" then
{
  DO.CATG = "SLIT_FF_BP3_REDL";
}
if PRO.CATG like "%SLIT_FF_BP3_REDU%" then
{
  DO.CATG = "SLIT_FF_BP3_REDU";
}
if PRO.CATG like "%SLIT_FF_BNC_REDL%" then
{
  DO.CATG = "SLIT_FF_BNC_REDL";
}
if PRO.CATG like "%SLIT_FF_BN1_REDL%" then
{
  DO.CATG = "SLIT_FF_BN1_REDL";
}
if PRO.CATG like "%SLIT_FF_BNC_REDU%" then
{
  DO.CATG = "SLIT_FF_BNC_REDU";
}
if PRO.CATG like "%SLIT_FF_BN1_REDU%" then
{
  DO.CATG = "SLIT_FF_BN1_REDU";
}
if PRO.CATG like "%SLIT_FF_BN2_REDL%" then
{
  DO.CATG = "SLIT_FF_BN2_REDL";
}
if PRO.CATG like "%SLIT_FF_BN2_REDU%" then
{
  DO.CATG = "SLIT_FF_BN2_REDU";
}
if PRO.CATG like "%SLIT_FF_BN3_REDL%" then
{
  DO.CATG = "SLIT_FF_BN3_REDL";
}
if PRO.CATG like "%SLIT_FF_BN3_REDU%" then
{
  DO.CATG = "SLIT_FF_BN3_REDU";
}
if PRO.CATG like "%SLIT_FF_COM_REDL%" then
{
  DO.CATG = "SLIT_FF_COM_REDL";
}
if PRO.CATG like "%SLIT_FF_COM_REDU%" then
{
  DO.CATG = "SLIT_FF_COM_REDU";
}
if PRO.CATG like "%SLIT_FF_NOR_REDL%" then
{
  DO.CATG = "SLIT_FF_NOR_REDL";
}
if PRO.CATG like "%SLIT_FF_NOR_REDU%" then
{
  DO.CATG = "SLIT_FF_NOR_REDU";
}
if PRO.CATG like "%LINE_INTMON_TABLE%" then
{
  DO.CATG = "LINE_INTMON_TABLE";
}
if PRO.CATG like "%RED_TFLAT_BLUE%" then
{
  DO.CATG = "RED_TFLAT_BLUE";
}
if PRO.CATG like "%RED_TFLAT_REDL%" then
{
  DO.CATG = "RED_TFLAT_REDL";
}
if PRO.CATG like "%RED_TFLAT_REDU%" then
{
  DO.CATG = "RED_TFLAT_REDU";
}
if PRO.CATG like "%RED_SCIENCE_BLUE%" then
{
  DO.CATG = "RED_SCIENCE_BLUE";
}
if PRO.CATG like "%RED_SCIENCE_REDL%" then
{
  DO.CATG = "RED_SCIENCE_REDL";
}
if PRO.CATG like "%RED_SCIENCE_REDU%" then
{
  DO.CATG = "RED_SCIENCE_REDU";
}
if PRO.CATG like "%RED_SCI_POINT_BLUE%" then
{
  DO.CATG = "RED_SCI_POINT_BLUE";
}
if PRO.CATG like "%RED_SCI_POINT_REDL%" then
{
  DO.CATG = "RED_SCI_POINT_REDL";
}
if PRO.CATG like "%RED_SCI_POINT_REDU%" then
{
  DO.CATG = "RED_SCI_POINT_REDU";
}
if PRO.CATG like "%RED_SCI_SLICER_REDL%" then
{
  DO.CATG = "RED_SCI_SLICER_REDL";
}
if PRO.CATG like "%RED_SCI_SLICER_REDU%" then
{
  DO.CATG = "RED_SCI_SLICER_REDU";
}
if PRO.CATG like "%RED_STD_BLUE%" then
{
  DO.CATG = "RED_STD_BLUE";
}
if PRO.CATG like "%RED_STD_REDL%" then
{
  DO.CATG = "RED_STD_REDL";
}
if PRO.CATG like "%RED_STD_REDU%" then
{
  DO.CATG = "RED_STD_REDU";
}
if PRO.CATG like "%VARIANCE_TFLAT_BLUE%" then
{
  DO.CATG = "VARIANCE_TFLAT_BLUE";
}
if PRO.CATG like "%VARIANCE_TFLAT_REDL%" then
{
  DO.CATG = "VARIANCE_TFLAT_REDL";
}
if PRO.CATG like "%VARIANCE_TFLAT_REDU%" then
{
  DO.CATG = "VARIANCE_TFLAT_REDU";
}
if PRO.CATG like "%VARIANCE_SCIENCE_BLUE%" then
{
  DO.CATG = "VARIANCE_SCIENCE_BLUE";
}
if PRO.CATG like "%VARIANCE_SCIENCE_REDL%" then
{
  DO.CATG = "VARIANCE_SCIENCE_REDL";
}
if PRO.CATG like "%VARIANCE_SCIENCE_REDU%" then
{
  DO.CATG = "VARIANCE_SCIENCE_REDU";
}
if PRO.CATG like "%VARIANCE_SCIENCE_POINT_BLUE%" then
{
  DO.CATG = "VARIANCE_SCIENCE_POINT_BLUE";
}
if PRO.CATG like "%VARIANCE_SCIENCE_POINT_REDL%" then
{
  DO.CATG = "VARIANCE_SCIENCE_POINT_REDL";
}
if PRO.CATG like "%VARIANCE_SCIENCE_POINT_REDU%" then
{
  DO.CATG = "VARIANCE_SCIENCE_POINT_REDU";
}
if PRO.CATG like "%VARIANCE_SCI_SLICER_REDL%" then
{
  DO.CATG = "VARIANCE_SCI_SLICER_REDL";
}
if PRO.CATG like "%VARIANCE_SCI_SLICER_REDU%" then
{
  DO.CATG = "VARIANCE_SCI_SLICER_REDU";
}
if PRO.CATG like "%ORDER_TRACE_BLUE%" then
{
  DO.CATG = "ORDER_TRACE_BLUE";
}
if PRO.CATG like "%ORDER_TRACE_REDL%" then
{
  DO.CATG = "ORDER_TRACE_REDL";
}
if PRO.CATG like "%ORDER_TRACE_REDU%" then
{
  DO.CATG = "ORDER_TRACE_REDU";
}
if PRO.CATG like "%BKG_FLAT_BLUE%" then
{
  DO.CATG = "BKG_FLAT_BLUE";
}
if PRO.CATG like "%BKG_FLAT_REDL%" then
{
  DO.CATG = "BKG_FLAT_REDL";
}
if PRO.CATG like "%BKG_FLAT_REDU%" then
{
  DO.CATG = "BKG_FLAT_REDU";
}
if PRO.CATG like "%BKG_SCI_BLUE%" then
{
  DO.CATG = "BKG_SCI_BLUE";
}
if PRO.CATG like "%BKG_SCI_REDL%" then
{
  DO.CATG = "BKG_SCI_REDL";
}
if PRO.CATG like "%BKG_SCI_REDU%" then
{
  DO.CATG = "BKG_SCI_REDU";
}
if PRO.CATG like "%BKG_STD_BLUE%" then
{
  DO.CATG = "BKG_STD_BLUE";
}
if PRO.CATG like "%BKG_STD_REDL%" then
{
  DO.CATG = "BKG_STD_REDL";
}
if PRO.CATG like "%BKG_STD_REDU%" then
{
  DO.CATG = "BKG_STD_REDU";
}
if PRO.CATG like "%CRMASK_BLUE%" then
{
  DO.CATG = "CRMASK_BLUE";
}
if PRO.CATG like "%CRMASK_REDL%" then
{
  DO.CATG = "CRMASK_REDL";
}
if PRO.CATG like "%CRMASK_REDU%" then
{
  DO.CATG = "CRMASK_REDU";
}
if PRO.CATG like "%EFFICIENCY_TABLE_BLUE%" then
{
  DO.CATG = "EFFICIENCY_TABLE_BLUE";
}
if PRO.CATG like "%EFFICIENCY_TABLE_REDL%" then
{
  DO.CATG = "EFFICIENCY_TABLE_REDL";
}
if PRO.CATG like "%EFFICIENCY_TABLE_REDU%" then
{
  DO.CATG = "EFFICIENCY_TABLE_REDU";
}
if PRO.CATG like "%ERRORBAR_SCI_BLUE%" then
{
  DO.CATG = "ERRORBAR_SCI_BLUE";
}
if PRO.CATG like "%ERRORBAR_SCI_REDL%" then
{
  DO.CATG = "ERRORBAR_SCI_REDL";
}
if PRO.CATG like "%ERRORBAR_SCI_REDU%" then
{
  DO.CATG = "ERRORBAR_SCI_REDU";
}
if PRO.CATG like "%ERRORBAR_SCI_POINT_BLUE%" then
{
  DO.CATG = "ERRORBAR_SCI_POINT_BLUE";
}
if PRO.CATG like "%ERRORBAR_SCI_POINT_REDL%" then
{
  DO.CATG = "ERRORBAR_SCI_POINT_REDL";
}
if PRO.CATG like "%ERRORBAR_SCI_POINT_REDU%" then
{
  DO.CATG = "ERRORBAR_SCI_POINT_REDU";
}
if PRO.CATG like "%ERRORBAR_TFLAT_BLUE%" then
{
  DO.CATG = "ERRORBAR_TFLAT_BLUE";
}
if PRO.CATG like "%ERRORBAR_TFLAT_REDL%" then
{
  DO.CATG = "ERRORBAR_TFLAT_REDL";
}
if PRO.CATG like "%ERRORBAR_TFLAT_REDU%" then
{
  DO.CATG = "ERRORBAR_TFLAT_REDU";
}
if PRO.CATG like "%ERRORBAR_STANDARD_BLUE%" then
{
  DO.CATG = "ERRORBAR_STANDARD_BLUE";
}
if PRO.CATG like "%ERRORBAR_STANDARD_REDL%" then
{
  DO.CATG = "ERRORBAR_STANDARD_REDL";
}
if PRO.CATG like "%ERRORBAR_STANDARD_REDU%" then
{
  DO.CATG = "ERRORBAR_STANDARD_REDU";
}
if PRO.CATG like "%ERRORBAR_SCI_SLICER_BLUE%" then
{
  DO.CATG = "ERRORBAR_SCI_SLICER_BLUE";
}
if PRO.CATG like "%ERRORBAR_SCI_SLICER_REDL%" then
{
  DO.CATG = "ERRORBAR_SCI_SLICER_REDL";
}
if PRO.CATG like "%ERRORBAR_SCI_SLICER_REDU%" then
{
  DO.CATG = "ERRORBAR_SCI_SLICER_REDU";
}
if PRO.CATG like "%EXT_2D_SCI_EXTND_BLUE%" then
{
  DO.CATG = "EXT_2D_SCI_EXTND_BLUE";
}
if PRO.CATG like "%EXT_2D_SCI_EXTND_REDL%" then
{
  DO.CATG = "EXT_2D_SCI_EXTND_REDL";
}
if PRO.CATG like "%EXT_2D_SCI_EXTND_REDU%" then
{
  DO.CATG = "EXT_2D_SCI_EXTND_REDU";
}
if PRO.CATG like "%FF2D_SCI_EXTND_BLUE%" then
{
  DO.CATG = "FF2D_SCI_EXTND_BLUE";
}
if PRO.CATG like "%FF2D_SCI_EXTND_REDL%" then
{
  DO.CATG = "FF2D_SCI_EXTND_REDL";
}
if PRO.CATG like "%FF2D_SCI_EXTND_REDU%" then
{
  DO.CATG = "FF2D_SCI_EXTND_REDU";
}
if PRO.CATG like "%FIB_BKG_TABLE_REDL%" then
{
  DO.CATG = "FIB_BKG_TABLE_REDL";
}
if PRO.CATG like "%FIB_BKG_TABLE_REDU%" then
{
  DO.CATG = "FIB_BKG_TABLE_REDU";
}
if PRO.CATG like "%FIB_FF_ALL_INFO_TAB%" then
{
  DO.CATG = "FIB_FF_ALL_INFO_TAB";
}
if PRO.CATG like "%FIB_FF_ODD_INFO_TAB%" then
{
  DO.CATG = "FIB_FF_ODD_INFO_TAB";
}
if PRO.CATG like "%FIB_FF_EVEN_INFO_TAB%" then
{
  DO.CATG = "FIB_FF_EVEN_INFO_TAB";
}
if PRO.CATG like "%FLUXCAL_2D_SCI_EXTND_BLUE%" then
{
  DO.CATG = "FLUXCAL_2D_SCI_EXTND_BLUE";
}
if PRO.CATG like "%FLUXCAL_2D_SCI_EXTND_REDL%" then
{
  DO.CATG = "FLUXCAL_2D_SCI_EXTND_REDL";
}
if PRO.CATG like "%FLUXCAL_2D_SCI_EXTND_REDU%" then
{
  DO.CATG = "FLUXCAL_2D_SCI_EXTND_REDU";
}
if PRO.CATG like "%RATIO_TFLAT_BLUE%" then
{
  DO.CATG = "RATIO_TFLAT_BLUE";
}
if PRO.CATG like "%RATIO_TFLAT_REDL%" then
{
  DO.CATG = "RATIO_TFLAT_REDL";
}
if PRO.CATG like "%RATIO_TFLAT_REDU%" then
{
  DO.CATG = "RATIO_TFLAT_REDU";
}
if PRO.CATG like "%MERGED_TFLAT_BLUE%" then
{
  DO.CATG = "MERGED_TFLAT_BLUE";
}
if PRO.CATG like "%MERGED_TFLAT_REDL%" then
{
  DO.CATG = "MERGED_TFLAT_REDL";
}
if PRO.CATG like "%MERGED_TFLAT_REDU%" then
{
  DO.CATG = "MERGED_TFLAT_REDU";
}
if PRO.CATG like "%MERGED_SCIENCE_BLUE%" then
{
  DO.CATG = "MERGED_SCIENCE_BLUE";
}
if PRO.CATG like "%MERGED_SCIENCE_REDL%" then
{
  DO.CATG = "MERGED_SCIENCE_REDL";
}
if PRO.CATG like "%MERGED_SCIENCE_REDU%" then
{
  DO.CATG = "MERGED_SCIENCE_REDU";
}
if PRO.CATG like "%MERGED_SCI_POINT_BLUE%" then
{
  DO.CATG = "MERGED_SCI_POINT_BLUE";
}
if PRO.CATG like "%MERGED_SCI_POINT_REDL%" then
{
  DO.CATG = "MERGED_SCI_POINT_REDL";
}
if PRO.CATG like "%MERGED_SCI_POINT_REDU%" then
{
  DO.CATG = "MERGED_SCI_POINT_REDU";
}
if PRO.CATG like "%MERGED_SCI_SLICER_REDL%" then
{
  DO.CATG = "MERGED_SCI_SLICER_REDL";
}
if PRO.CATG like "%MERGED_SCI_SLICER_REDU%" then
{
  DO.CATG = "MERGED_SCI_SLICER_REDU";
}
if PRO.CATG like "%MERGED_SKY_BLUE%" then
{
  DO.CATG = "MERGED_SKY_BLUE";
}
if PRO.CATG like "%MERGED_SKY_REDL%" then
{
  DO.CATG = "MERGED_SKY_REDL";
}
if PRO.CATG like "%MERGED_SKY_REDU%" then
{
  DO.CATG = "MERGED_SKY_REDU";
}
if PRO.CATG like "%MER2D_SCI_EXTND_BLUE%" then
{
  DO.CATG = "MER2D_SCI_EXTND_BLUE";
}
if PRO.CATG like "%MER2D_SCI_EXTND_REDL%" then
{
  DO.CATG = "MER2D_SCI_EXTND_REDL";
}
if PRO.CATG like "%MER2D_SCI_EXTND_REDU%" then
{
  DO.CATG = "MER2D_SCI_EXTND_REDU";
}
if PRO.CATG like "%WCALIB_FF_TFLAT_BLUE%" then
{
  DO.CATG = "WCALIB_FF_TFLAT_BLUE";
}
if PRO.CATG like "%WCALIB_FF_TFLAT_REDL%" then
{
  DO.CATG = "WCALIB_FF_TFLAT_REDL";
}
if PRO.CATG like "%WCALIB_FF_TFLAT_REDU%" then
{
  DO.CATG = "WCALIB_FF_TFLAT_REDU";
}
if PRO.CATG like "%WCALIB_FF_RESPONSE_BLUE%" then
{
  DO.CATG = "WCALIB_FF_RESPONSE_BLUE";
}
if PRO.CATG like "%WCALIB_FF_RESPONSE_REDL%" then
{
  DO.CATG = "WCALIB_FF_RESPONSE_REDL";
}
if PRO.CATG like "%WCALIB_FF_RESPONSE_REDU%" then
{
  DO.CATG = "WCALIB_FF_RESPONSE_REDU";
}
if PRO.CATG like "%WCALIB_TFLAT_BLUE%" then
{
  DO.CATG = "WCALIB_TFLAT_BLUE";
}
if PRO.CATG like "%WCALIB_TFLAT_REDL%" then
{
  DO.CATG = "WCALIB_TFLAT_REDL";
}
if PRO.CATG like "%WCALIB_TFLAT_REDU%" then
{
  DO.CATG = "WCALIB_TFLAT_REDU";
}
if PRO.CATG like "%WCALIB_SCI_POINT_BLUE%" then
{
  DO.CATG = "WCALIB_SCI_POINT_BLUE";
}
if PRO.CATG like "%WCALIB_SCI_POINT_REDL%" then
{
  DO.CATG = "WCALIB_SCI_POINT_REDL";
}
if PRO.CATG like "%WCALIB_SCI_POINT_REDU%" then
{
  DO.CATG = "WCALIB_SCI_POINT_REDU";
}
if PRO.CATG like "%WCALIB_SCI_SLICER_REDL%" then
{
  DO.CATG = "WCALIB_SCI_SLICER_REDL";
}
if PRO.CATG like "%WCALIB_SCI_SLICER_REDU%" then
{
  DO.CATG = "WCALIB_SCI_SLICER_REDU";
}
if PRO.CATG like "%WCALIB_SCIENCE_BLUE%" then
{
  DO.CATG = "WCALIB_SCIENCE_BLUE";
}
if PRO.CATG like "%WCALIB_SCIENCE_REDL%" then
{
  DO.CATG = "WCALIB_SCIENCE_REDL";
}
if PRO.CATG like "%WCALIB_SCIENCE_REDU%" then
{
  DO.CATG = "WCALIB_SCIENCE_REDU";
}
if PRO.CATG like "%WCALIB_FLAT_OBJ_BLUE%" then
{
  DO.CATG = "WCALIB_FLAT_OBJ_BLUE";
}
if PRO.CATG like "%WCALIB_FLAT_OBJ_REDL%" then
{
  DO.CATG = "WCALIB_FLAT_OBJ_REDL";
}
if PRO.CATG like "%WCALIB_FLAT_OBJ_REDU%" then
{
  DO.CATG = "WCALIB_FLAT_OBJ_REDU";
}
if PRO.CATG like "%WCALIB_FF_SCIENCE_BLUE%" then
{
  DO.CATG = "WCALIB_FF_SCIENCE_BLUE";
}
if PRO.CATG like "%WCALIB_FF_SCIENCE_REDL%" then
{
  DO.CATG = "WCALIB_FF_SCIENCE_REDL";
}
if PRO.CATG like "%WCALIB_FF_SCIENCE_REDU%" then
{
  DO.CATG = "WCALIB_FF_SCIENCE_REDU";
}
if PRO.CATG like "%WCALIB_FF_SCI_POINT_BLUE%" then
{
  DO.CATG = "WCALIB_FF_SCI_POINT_BLUE";
}
if PRO.CATG like "%WCALIB_FF_SCI_POINT_REDL%" then
{
  DO.CATG = "WCALIB_FF_SCI_POINT_REDL";
}
if PRO.CATG like "%WCALIB_FF_SCI_POINT_REDU%" then
{
  DO.CATG = "WCALIB_FF_SCI_POINT_REDU";
}
if PRO.CATG like "%WCALIB_FF_SCI_SLICER_REDL%" then
{
  DO.CATG = "WCALIB_FF_SCI_SLICER_REDL";
}
if PRO.CATG like "%WCALIB_FF_SCI_SLICER_REDU%" then
{
  DO.CATG = "WCALIB_FF_SCI_SLICER_REDU";
}
if PRO.CATG like "%WCAL2D_SCI_EXTND_BLUE%" then
{
  DO.CATG = "WCAL2D_SCI_EXTND_BLUE";
}
if PRO.CATG like "%WCAL2D_SCI_EXTND_REDL%" then
{
  DO.CATG = "WCAL2D_SCI_EXTND_REDL";
}
if PRO.CATG like "%WCAL2D_SCI_EXTND_REDU%" then
{
  DO.CATG = "WCAL2D_SCI_EXTND_REDU";
}
if PRO.CATG like "%FLUXCAL_ERRORBAR_BLUE%" then
{
  DO.CATG = "FLUXCAL_ERRORBAR_BLUE";
}
if PRO.CATG like "%FLUXCAL_ERRORBAR_REDL%" then
{
  DO.CATG = "FLUXCAL_ERRORBAR_REDL";
}
if PRO.CATG like "%FLUXCAL_ERRORBAR_REDU%" then
{
  DO.CATG = "FLUXCAL_ERRORBAR_REDU";
}
if PRO.CATG like "%ERRORBAR_SCIENCE_REDL%" then
{
  DO.CATG = "ERRORBAR_SCIENCE_REDL";
}
if PRO.CATG like "%ERRORBAR_SCIENCE_REDU%" then
{
  DO.CATG = "ERRORBAR_SCIENCE_REDU";
}
if PRO.CATG like "%ERRORBAR_SCIENCE_BLUE%" then
{
  DO.CATG = "ERRORBAR_SCIENCE_BLUE";
}
if PRO.CATG like "%FIB_SCI_INFO_TAB%" then
{
  DO.CATG = "FIB_SCI_INFO_TAB";
}
if PRO.CATG like "%XB_SCI_REDL%" then
{
  DO.CATG = "XB_SCI_REDL";
}
if PRO.CATG like "%XB_SCI_REDU%" then
{
  DO.CATG = "XB_SCI_REDU";
}
if PRO.CATG like "%MWXB_SCI_REDL%" then
{
  DO.CATG = "MWXB_SCI_REDL";
}
if PRO.CATG like "%MWXB_SCI_REDU%" then
{
  DO.CATG = "MWXB_SCI_REDU";
}
if PRO.CATG like "%XB_SCI_RAW_REDL%" then
{
  DO.CATG = "XB_SCI_RAW_REDL";
}
if PRO.CATG like "%XB_SCI_RAW_REDU%" then
{
  DO.CATG = "XB_SCI_RAW_REDU";
}
if PRO.CATG like "%MWXB_SCI_RAW_REDL%" then
{
  DO.CATG = "MWXB_SCI_RAW_REDL";
}
if PRO.CATG like "%MWXB_SCI_RAW_REDU%" then
{
  DO.CATG = "MWXB_SCI_RAW_REDU";
}
if PRO.CATG like "%ERR_MWXB_SCI_REDL%" then
{
  DO.CATG = "ERR_MWXB_SCI_REDL";
}
if PRO.CATG like "%ERR_MWXB_SCI_REDU%" then
{
  DO.CATG = "ERR_MWXB_SCI_REDU";
}
if PRO.CATG like "%ERR_MWXB_SCI_RAW_REDL%" then
{
  DO.CATG = "ERR_MWXB_SCI_RAW_REDL";
}
if PRO.CATG like "%ERR_MWXB_SCI_RAW_REDU%" then
{
  DO.CATG = "ERR_MWXB_SCI_RAW_REDU";
}
if PRO.CATG like "%VARIANCE_SCI_POINT_REDL%" then
{
  DO.CATG = "VARIANCE_SCI_POINT_REDL";
}
if PRO.CATG like "%VARIANCE_SCI_POINT_REDU%" then
{
  DO.CATG = "VARIANCE_SCI_POINT_REDU";
}
if PRO.CATG like "%DET_LIN_INFO_RED%" then
{
  DO.CATG = "DET_LIN_INFO_RED";
}
if PRO.CATG like "%GAIN_INFO_RED%" then
{
  DO.CATG = "GAIN_INFO_RED";
}
if PRO.CATG like "%COEFFS_CUBE_RED%" then
{
  DO.CATG = "COEFFS_CUBE_RED";
}
if PRO.CATG like "%BP_MAP_NL_RED%" then
{
  DO.CATG = "BP_MAP_NL_RED";
}

select execute(UVES_OBS_EXTENDED_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCI_EXTND_BLUE";
select execute(FLAMES_CAL_WAVECAL_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "FIB_ARC_LAMP_RED";
select execute(UVES_OBS_SLICER_SCIRED_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCI_SLICER_BLUE";
select execute(UVES_OBS_EXTENDED_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCI_EXTND_RED";
select execute(UVES_CAL_WAVECAL_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "ARC_LAMP_RED";
select execute(FLAMES_CAL_PREDICT_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "FIB_ARC_LAMP_FORM_RED";
select execute(UVES_OBS_SCIRED_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCIENCE_RED";
select execute(UVES_CAL_RESPONSE_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "STANDARD_RED";
select execute(FLAMES_OBS_SCIRED_CUBES) from inputFiles where SIG.FRAME == 1 and DO.CATG == "FIB_SCI_RED";
select execute(UVES_OBS_POINT_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCI_POINT_BLUE";
select execute(UVES_OBS_SCIRED_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCIENCE_BLUE";
select execute(UVES_CAL_ORDERPOS_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "ORDER_FLAT_BLUE";
select execute(UVES_CAL_ORDERPOS_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "ORDER_FLAT_RED";
select execute(UVES_CAL_PREDICT_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "ARC_LAMP_FORM_RED";
select execute(UVES_CAL_RESPONSE_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "STANDARD_BLUE";
select execute(UVES_CAL_WAVECAL_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "ARC_LAMP_BLUE";
select execute(FLAMES_OBS_SCIRED_CUBES) from inputFiles where SIG.FRAME == 1 and DO.CATG == "FIB_SCI_SIM_RED";
select execute(FLAMES_CAL_ORDERPOS_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "FIB_ORDEF_RED";
select execute(UVES_OBS_SLICER_SCIRED_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCI_SLICER_RED";
select execute(UVES_OBS_POINT_R) from inputFiles where SIG.FRAME == 1 and DO.CATG == "SCI_POINT_RED";
select execute(UVES_CAL_PREDICT_B) from inputFiles where SIG.FRAME == 1 and DO.CATG == "ARC_LAMP_FORM_BLUE";
select execute(FLAMES_OBS_SCIRED_CUBES) from inputFiles where SIG.FRAME == 1 and DO.CATG == "FIB_SCI_COM_RED";
select execute(UVES_MASTER_DARK_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "PDARK_RED";
select execute(UVES_MASTER_FLAT_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "DFLAT_BLUE";

select execute(DETMON_OPT_LG_BLUE) from inputFiles where SIG.TEMPLATE
== 1 and RAW.TYPE == "LINEARITY_BLUE_DETCHAR" and LF.DO.CATG == "OFF_RAW";
select execute(DETMON_OPT_LG_BLUE) from inputFiles where SIG.TEMPLATE
== 1 and RAW.TYPE == "LINEARITY_BLUE_DETCHAR" and LF.DO.CATG == "ON_RAW";


select execute(DETMON_OPT_LG_RED) from inputFiles where SIG.TEMPLATE == 1 and RAW.TYPE == "LINEARITY_RED_DETCHAR" and LF.DO.CATG == "OFF_RAW";
select execute(DETMON_OPT_LG_RED) from inputFiles where SIG.TEMPLATE == 1 and RAW.TYPE == "LINEARITY_RED_DETCHAR" and LF.DO.CATG == "ON_RAW";

select execute(DETMON_OPT_LG_BLUE) from inputFiles where SIG.TEMPLATE == 1 and RAW.TYPE == "SCREEN_FLAT_BLUE" and LF.DO.CATG == "ON_RAW";
select execute(DETMON_OPT_LG_RED) from inputFiles where SIG.TEMPLATE == 1 and RAW.TYPE == "SCREEN_FLAT_RED" and LF.DO.CATG == "ON_RAW";

select execute(UVES_LINGAIN) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "SCREEN_FLAT_DETCHAR_BLUE";
select execute(UVES_LINGAIN) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "SCREEN_FLAT_DETCHAR_RED";

select execute(UVES_MASTER_FLAT_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "FLAT_BLUE";
select execute(UVES_CD_ALIGN_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "CD_ALIGN_BLUE";
select execute(UVES_MASTER_FLAT_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "IFLAT_RED";
select execute(UVES_CAL_TFLAT_R) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "TFLAT_RED";
select execute(FLAMES_CAL_FIBORDPOS_R) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "FIB_FF_ANY_RED";
select execute(UVES_MASTER_BIAS_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "BIAS_RED";
select execute(FLAMES_MASTER_FLAT_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "SFLAT_RED";
select execute(UVES_MASTER_FLAT_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "IFLAT_BLUE";
select execute(UVES_MASTER_BIAS_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "BIAS_BLUE";
select execute(UVES_MASTER_DARK_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "DARK_RED";
select execute(UVES_CAL_TFLAT_B) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "TFLAT_BLUE";
select execute(FLAMES_CAL_FIBORDPOS_R) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "FIB_FF_ODD_RED";
select execute(UVES_MASTER_DARK_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "DARK_BLUE";
select execute(FLAMES_CAL_FIBORDPOS_R) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "FIB_FF_ALL_RED";
select execute(FLAMES_CAL_FIBORDPOS_R) from inputFiles where SIG.TEMPLATE == 1 and LF.DO.CATG == "FIB_FF_EVEN_RED";
select execute(UVES_MASTER_FLAT_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "FLAT_RED";
select execute(UVES_MASTER_DARK_B) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "PDARK_BLUE";
select execute(UVES_CD_ALIGN_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "CD_ALIGN_RED";
select execute(UVES_MASTER_FLAT_R) from inputFiles where SIG.TEMPLATE == 1 and DO.CATG == "DFLAT_RED";
action UVES_CD_ALIGN_B
{
recipe uves_cal_cd_align;
}

action UVES_CD_ALIGN_R
{
recipe uves_cal_cd_align;
}

action UVES_MASTER_BIAS_B
{
recipe uves_cal_mkmaster;
}

action UVES_MASTER_BIAS_R
{
recipe uves_cal_mkmaster;
}

action UVES_MASTER_DARK_B
{
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
recipe uves_cal_mdark;
}

action UVES_MASTER_DARK_R
{
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
recipe uves_cal_mdark;
}

action UVES_MASTER_FLAT_B
{
minRet = 0; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_DARK_BLUE from calibFiles where DO.CATG == "MASTER_DARK_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
recipe uves_cal_mkmaster;
}

action UVES_MASTER_FLAT_R
{
minRet = 0; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_DARK_REDL from calibFiles where DO.CATG == "MASTER_DARK_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_DARK_REDU from calibFiles where DO.CATG == "MASTER_DARK_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
recipe uves_cal_mkmaster;
}

action UVES_CAL_PREDICT_R
{
minRet = 1; maxRet = 1;
select file as LINE_REFER_TABLE from calibFiles where DO.CATG == "LINE_REFER_TABLE";
minRet = 0; maxRet = 1;
select file as MASTER_FORM_REDL from calibFiles where DO.CATG == "MASTER_FORM_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_FORM_REDU from calibFiles where DO.CATG == "MASTER_FORM_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
recipe uves_cal_predict;
}

action UVES_CAL_PREDICT_B
{
minRet = 1; maxRet = 1;
select file as LINE_REFER_TABLE from calibFiles where DO.CATG == "LINE_REFER_TABLE";
minRet = 0; maxRet = 1;
select file as MASTER_FORM_BLUE from calibFiles where DO.CATG == "MASTER_FORM_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
recipe uves_cal_predict;
}

action UVES_CAL_ORDERPOS_B
{
minRet = 0; maxRet = 1;
select file as ORDER_GUESS_TAB_BLUE from calibFiles where DO.CATG == "ORDER_GUESS_TAB_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
recipe uves_cal_orderpos;
}

action UVES_CAL_ORDERPOS_R
{
minRet = 0; maxRet = 1;
select file as ORDER_GUESS_TAB_REDL from calibFiles where DO.CATG == "ORDER_GUESS_TAB_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as ORDER_GUESS_TAB_REDU from calibFiles where DO.CATG == "ORDER_GUESS_TAB_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
recipe uves_cal_orderpos;
}

action UVES_CAL_WAVECAL_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as LINE_GUESS_TAB_BLUE from calibFiles where DO.CATG == "LINE_GUESS_TAB_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as LINE_REFER_TABLE from calibFiles where DO.CATG == "LINE_REFER_TABLE";
minRet = 0; maxRet = 1;
select file as LINE_INTMON_TABLE from calibFiles where DO.CATG == "LINE_INTMON_TABLE";
recipe uves_cal_wavecal;
}

action UVES_CAL_WAVECAL_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as LINE_GUESS_TAB_REDL from calibFiles where DO.CATG == "LINE_GUESS_TAB_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as LINE_GUESS_TAB_REDU from calibFiles where DO.CATG == "LINE_GUESS_TAB_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_REFER_TABLE from calibFiles where DO.CATG == "LINE_REFER_TABLE";
minRet = 0; maxRet = 1;
select file as LINE_INTMON_TABLE from calibFiles where DO.CATG == "LINE_INTMON_TABLE";
recipe uves_cal_wavecal;
}

action UVES_CAL_RESPONSE_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_BLUE from calibFiles where DO.CATG == "LINE_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_BLUE from calibFiles where DO.CATG == "MASTER_FLAT_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FLUX_STD_TABLE from calibFiles where DO.CATG == "FLUX_STD_TABLE";
minRet = 1; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_cal_response;
}

action UVES_CAL_RESPONSE_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDL from calibFiles where DO.CATG == "LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDL from calibFiles where DO.CATG == "MASTER_FLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDU from calibFiles where DO.CATG == "LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDU from calibFiles where DO.CATG == "MASTER_FLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FLUX_STD_TABLE from calibFiles where DO.CATG == "FLUX_STD_TABLE";
minRet = 1; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_cal_response;
}

action UVES_OBS_SCIRED_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_BLUE from calibFiles where DO.CATG == "LINE_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_BLUE from calibFiles where DO.CATG == "MASTER_FLAT_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_BLUE from calibFiles where DO.CATG == "MASTER_RESPONSE_BLUE"
   and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired;
}

action UVES_OBS_SCIRED_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDL from calibFiles where DO.CATG == "LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDL from calibFiles where DO.CATG == "MASTER_FLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDL from calibFiles where DO.CATG == "MASTER_RESPONSE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDU from calibFiles where DO.CATG == "LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDU from calibFiles where DO.CATG == "MASTER_FLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDU from calibFiles where DO.CATG == "MASTER_RESPONSE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired;
}

action UVES_CAL_TFLAT_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_BLUE from calibFiles where DO.CATG == "LINE_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as REF_TFLAT_BLUE from calibFiles where DO.CATG == "REF_TFLAT_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_BLUE from calibFiles where DO.CATG == "MASTER_RESPONSE_BLUE"
   and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_cal_tflat;
}

action UVES_CAL_TFLAT_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDL from calibFiles where DO.CATG == "LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as REF_TFLAT_REDL from calibFiles where DO.CATG == "REF_TFLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDL from calibFiles where DO.CATG == "MASTER_RESPONSE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDU from calibFiles where DO.CATG == "LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as REF_TFLAT_REDU from calibFiles where DO.CATG == "REF_TFLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDU from calibFiles where DO.CATG == "MASTER_RESPONSE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_cal_tflat;
}

action UVES_OBS_EXTENDED_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_BLUE from calibFiles where DO.CATG == "LINE_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_BLUE from calibFiles where DO.CATG == "MASTER_FLAT_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_BLUE from calibFiles where DO.CATG == "MASTER_RESPONSE_BLUE"
   and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired

{
"--reduce.ffmethod=extract"; 
"--reduce.extract.method=2d"; 
"--reduce.backsub.mmethod=median"; 
"--reduce.skysub=FALSE";
}

}

action UVES_OBS_EXTENDED_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDL from calibFiles where DO.CATG == "LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDL from calibFiles where DO.CATG == "MASTER_FLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDL from calibFiles where DO.CATG == "MASTER_RESPONSE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDU from calibFiles where DO.CATG == "LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDU from calibFiles where DO.CATG == "MASTER_FLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDU from calibFiles where DO.CATG == "MASTER_RESPONSE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired

{
"--reduce.ffmethod=extract"; 
"--reduce.extract.method=2d"; 
"--reduce.backsub.mmethod=median"; 
"--reduce.skysub=FALSE";
}

}

action UVES_OBS_POINT_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_BLUE from calibFiles where DO.CATG == "LINE_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_BLUE from calibFiles where DO.CATG == "MASTER_FLAT_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_BLUE from calibFiles where DO.CATG == "MASTER_RESPONSE_BLUE"
   and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired;
}

action UVES_OBS_POINT_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDL from calibFiles where DO.CATG == "LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDL from calibFiles where DO.CATG == "MASTER_FLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDL from calibFiles where DO.CATG == "MASTER_RESPONSE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDU from calibFiles where DO.CATG == "LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDU from calibFiles where DO.CATG == "MASTER_FLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDU from calibFiles where DO.CATG == "MASTER_RESPONSE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired;
}

action UVES_LINGAIN
{
recipe uves_cal_lingain;
}

action DETMON_OPT_LG_BLUE
{

recipe detmon_opt_lg
{
"--pix2pix=TRUE";
"--tolerance=0.001";
"--exts=0";
}

}

action DETMON_OPT_LG_RED
{

recipe detmon_opt_lg
{
"--pix2pix=TRUE";
"--tolerance=0.001";
"--exts=-1";
}

}

action UVES_OBS_SLICER_SCIRED_B
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_BLUE from calibFiles where DO.CATG == "ORDER_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_BLUE from calibFiles where DO.CATG == "LINE_TABLE_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_BLUE from calibFiles where DO.CATG == "MASTER_BIAS_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_BLUE from calibFiles where DO.CATG == "MASTER_FLAT_BLUE"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_BLUE from calibFiles where DO.CATG == "MASTER_RESPONSE_BLUE"
   and inputFile.INS.GRAT1.ID==INS.GRAT1.ID and inputFile.INS.GRAT1.WLEN==INS.GRAT1.WLEN;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired
{
"--reduce.ffmethod=extract"; 
"--reduce.extract.method=average"; 
"--reduce.backsub.mmethod=median";
"--reduce.skysub=FALSE";
}

}

action UVES_OBS_SLICER_SCIRED_R
{
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDL from calibFiles where DO.CATG == "ORDER_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDL from calibFiles where DO.CATG == "LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDL from calibFiles where DO.CATG == "MASTER_FLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDL from calibFiles where DO.CATG == "MASTER_RESPONSE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 1; maxRet = 1;
select file as ORDER_TABLE_REDU from calibFiles where DO.CATG == "ORDER_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as LINE_TABLE_REDU from calibFiles where DO.CATG == "LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_FLAT_REDU from calibFiles where DO.CATG == "MASTER_FLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_RESPONSE_REDU from calibFiles where DO.CATG == "MASTER_RESPONSE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as EXTCOEFF_TABLE from calibFiles where DO.CATG == "EXTCOEFF_TABLE";
recipe uves_obs_scired
{
"--reduce.ffmethod=extract"; 
"--reduce.extract.method=average"; 
"--reduce.backsub.mmethod=median"; 
"--reduce.skysub=FALSE";
}


}

action FLAMES_CAL_PREDICT_R
{
minRet = 1; maxRet = 1;
select file as LINE_REFER_TABLE from calibFiles where DO.CATG == "LINE_REFER_TABLE";
minRet = 0; maxRet = 1;
select file as MASTER_FORM_REDL from calibFiles where DO.CATG == "MASTER_FORM_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_FORM_REDU from calibFiles where DO.CATG == "MASTER_FORM_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
recipe flames_cal_predict;
}

action FLAMES_CAL_ORDERPOS_R
{
minRet = 0; maxRet = 1;
select file as FIB_DRS_REDL from calibFiles where DO.CATG == "FIB_DRS_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE;
minRet = 0; maxRet = 1;
select file as FIB_DRS_REDU from calibFiles where DO.CATG == "FIB_DRS_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE;
recipe flames_cal_orderpos;
}

action FLAMES_CAL_FIBORDPOS_R
{
minRet = 0; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as FIB_ORD_TAB_REDL from calibFiles where DO.CATG == "FIB_ORD_TAB_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORD_TAB_REDU from calibFiles where DO.CATG == "FIB_ORD_TAB_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 6;
select file as MASTER_SFLAT_REDL from calibFiles where DO.CATG == "MASTER_SFLAT_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 1; maxRet = 6;
select file as MASTER_SFLAT_REDU from calibFiles where DO.CATG == "MASTER_SFLAT_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as FIB_ORDEF_REDL from calibFiles where DO.CATG == "FIB_ORDEF_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
minRet = 0; maxRet = 1;
select file as FIB_ORDEF_REDU from calibFiles where DO.CATG == "FIB_ORDEF_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.INS.GRAT2.ID==INS.GRAT2.ID;
recipe flames_cal_prep_sff_ofpos;
}

action FLAMES_CAL_WAVECAL_R
{
minRet = 1; maxRet = 1;
select file as LINE_REFER_TABLE from calibFiles where DO.CATG == "LINE_REFER_TABLE";
minRet = 0; maxRet = 1;
select file as FIB_DRS_REDL from calibFiles where DO.CATG == "FIB_DRS_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE;
minRet = 0; maxRet = 1;
select file as FIB_DRS_REDU from calibFiles where DO.CATG == "FIB_DRS_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE;
minRet = 1; maxRet = 1;
minRet = 1; maxRet = 1;
select file as FIB_LIN_GUE_REDL from calibFiles where DO.CATG == "FIB_LIN_GUE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.MODE==INS.MODE;
select file as FIB_LIN_GUE_REDU from calibFiles where DO.CATG == "FIB_LIN_GUE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORDEF_TABLE_REDL from calibFiles where DO.CATG == "FIB_ORDEF_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORDEF_TABLE_REDU from calibFiles where DO.CATG == "FIB_ORDEF_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as LINE_INTMON_TABLE from calibFiles where DO.CATG == "LINE_INTMON_TABLE";
recipe flames_cal_wavecal;
}


action FLAMES_OBS_SCIRED_R
{
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as FIB_LINE_TABLE_REDL from calibFiles where
DO.CATG=="FIB_LINE_TABLE_REDL" and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_LINE_TABLE_REDU from calibFiles where 
DO.CATG == "FIB_LINE_TABLE_REDU"  and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_COM_REDL from calibFiles where DO.CATG == "SLIT_FF_COM_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_NOR_REDL from calibFiles where DO.CATG == "SLIT_FF_NOR_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_COM_REDU from calibFiles where DO.CATG == "SLIT_FF_COM_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_NOR_REDU from calibFiles where DO.CATG == "SLIT_FF_NOR_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORDEF_TABLE_REDL from calibFiles where DO.CATG == "FIB_ORDEF_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORDEF_TABLE_REDU from calibFiles where DO.CATG == "FIB_ORDEF_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_DT1_REDL from calibFiles where DO.CATG == "SLIT_FF_DT1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_SG1_REDL from calibFiles where DO.CATG == "SLIT_FF_SG1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BP1_REDL from calibFiles where DO.CATG == "SLIT_FF_BP1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BN1_REDL from calibFiles where DO.CATG == "SLIT_FF_BN1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_DT1_REDU from calibFiles where DO.CATG == "SLIT_FF_DT1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_SG1_REDU from calibFiles where DO.CATG == "SLIT_FF_SG1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BP1_REDU from calibFiles where DO.CATG == "SLIT_FF_BP1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BN1_REDU from calibFiles where DO.CATG == "SLIT_FF_BN1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_DT2_REDL from calibFiles where DO.CATG == "SLIT_FF_DT2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_SG2_REDL from calibFiles where DO.CATG == "SLIT_FF_SG2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BP2_REDL from calibFiles where DO.CATG == "SLIT_FF_BP2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BN2_REDL from calibFiles where DO.CATG == "SLIT_FF_BN2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_DT2_REDU from calibFiles where DO.CATG == "SLIT_FF_DT2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_SG2_REDU from calibFiles where DO.CATG == "SLIT_FF_SG2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BP2_REDU from calibFiles where DO.CATG == "SLIT_FF_BP2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BN2_REDU from calibFiles where DO.CATG == "SLIT_FF_BN2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_DT3_REDL from calibFiles where DO.CATG == "SLIT_FF_DT3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_SG3_REDL from calibFiles where DO.CATG == "SLIT_FF_SG3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BP3_REDL from calibFiles where DO.CATG == "SLIT_FF_BP3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BN3_REDL from calibFiles where DO.CATG == "SLIT_FF_BN3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_DT3_REDU from calibFiles where DO.CATG == "SLIT_FF_DT3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_SG3_REDU from calibFiles where DO.CATG == "SLIT_FF_SG3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BP3_REDU from calibFiles where DO.CATG == "SLIT_FF_BP3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as SLIT_FF_BN3_REDU from calibFiles where DO.CATG == "SLIT_FF_BN3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_COM_REDL from calibFiles where DO.CATG == "FIB_FF_COM_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NOR_REDL from calibFiles where DO.CATG == "FIB_FF_NOR_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NSG_REDL from calibFiles where DO.CATG == "FIB_FF_NSG_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_COM_REDU from calibFiles where DO.CATG == "FIB_FF_COM_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NOR_REDU from calibFiles where DO.CATG == "FIB_FF_NOR_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NSG_REDU from calibFiles where DO.CATG == "FIB_FF_NSG_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_DT1_REDL from calibFiles where DO.CATG == "FIB_FF_DT1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_SG1_REDL from calibFiles where DO.CATG == "FIB_FF_SG1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_BP1_REDL from calibFiles where DO.CATG == "FIB_FF_BP1_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_DT1_REDU from calibFiles where DO.CATG == "FIB_FF_DT1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_SG1_REDU from calibFiles where DO.CATG == "FIB_FF_SG1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_BP1_REDU from calibFiles where DO.CATG == "FIB_FF_BP1_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_DT2_REDL from calibFiles where DO.CATG == "FIB_FF_DT2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_SG2_REDL from calibFiles where DO.CATG == "FIB_FF_SG2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_BP2_REDL from calibFiles where DO.CATG == "FIB_FF_BP2_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_DT2_REDU from calibFiles where DO.CATG == "FIB_FF_DT2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_SG2_REDU from calibFiles where DO.CATG == "FIB_FF_SG2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_BP2_REDU from calibFiles where DO.CATG == "FIB_FF_BP2_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_DT3_REDL from calibFiles where DO.CATG == "FIB_FF_DT3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_SG3_REDL from calibFiles where DO.CATG == "FIB_FF_SG3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_BP3_REDL from calibFiles where DO.CATG == "FIB_FF_BP3_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_DT3_REDU from calibFiles where DO.CATG == "FIB_FF_DT3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_SG3_REDU from calibFiles where DO.CATG == "FIB_FF_SG3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as FIB_FF_BP3_REDU from calibFiles where DO.CATG == "FIB_FF_BP3_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
recipe flames_obs_scired

{
"--cubify_sw=Y"; 
"--cor_max_fnd=Y"; 
"--cor_def_rng=6"; 
"--cor_def_pnt=25";
"--cor_def_off=0";
}


}

action FLAMES_OBS_SCIRED_CUBES
{
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as FIB_LINE_TABLE_REDL from calibFiles where DO.CATG == "FIB_LINE_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_LINE_TABLE_REDU from calibFiles where DO.CATG == "FIB_LINE_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_COM_REDL from calibFiles where DO.CATG == "SLIT_FF_COM_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_NOR_REDL from calibFiles where DO.CATG == "SLIT_FF_NOR_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_COM_REDU from calibFiles where DO.CATG == "SLIT_FF_COM_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_NOR_REDU from calibFiles where DO.CATG == "SLIT_FF_NOR_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORDEF_TABLE_REDL from calibFiles where DO.CATG == "FIB_ORDEF_TABLE_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_ORDEF_TABLE_REDU from calibFiles where DO.CATG == "FIB_ORDEF_TABLE_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_DTC_REDL from calibFiles where DO.CATG == "SLIT_FF_DTC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_SGC_REDL from calibFiles where DO.CATG == "SLIT_FF_SGC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BPC_REDL from calibFiles where DO.CATG == "SLIT_FF_BPC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BNC_REDL from calibFiles where DO.CATG == "SLIT_FF_BNC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_DTC_REDU from calibFiles where DO.CATG == "SLIT_FF_DTC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_SGC_REDU from calibFiles where DO.CATG == "SLIT_FF_SGC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BPC_REDU from calibFiles where DO.CATG == "SLIT_FF_BPC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as SLIT_FF_BNC_REDU from calibFiles where DO.CATG == "SLIT_FF_BNC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_COM_REDL from calibFiles where DO.CATG == "FIB_FF_COM_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NOR_REDL from calibFiles where DO.CATG == "FIB_FF_NOR_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NSG_REDL from calibFiles where DO.CATG == "FIB_FF_NSG_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_COM_REDU from calibFiles where DO.CATG == "FIB_FF_COM_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NOR_REDU from calibFiles where DO.CATG == "FIB_FF_NOR_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_NSG_REDU from calibFiles where DO.CATG == "FIB_FF_NSG_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_DTC_REDL from calibFiles where DO.CATG == "FIB_FF_DTC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN  and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_SGC_REDL from calibFiles where DO.CATG == "FIB_FF_SGC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_BPC_REDL from calibFiles where DO.CATG == "FIB_FF_BPC_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_DTC_REDU from calibFiles where DO.CATG == "FIB_FF_DTC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_SGC_REDU from calibFiles where DO.CATG == "FIB_FF_SGC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
minRet = 1; maxRet = 1;
select file as FIB_FF_BPC_REDU from calibFiles where DO.CATG == "FIB_FF_BPC_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.INS.SLIT3.PLATE==INS.SLIT3.PLATE and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.INS.SLIT3.MODE==INS.SLIT3.MODE and inputFile.INS.MODE==INS.MODE;
recipe flames_obs_scired
{
"--cubify_sw=Y"; 
"--cor_max_fnd=Y"; 
"--cor_def_rng=6"; 
"--cor_def_pnt=25";
"--cor_def_off=0";
}


}

action FLAMES_MASTER_FLAT_R
{
minRet = 0; maxRet = 1;
select file as MASTER_BIAS_REDL from calibFiles where DO.CATG == "MASTER_BIAS_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_DARK_REDL from calibFiles where DO.CATG == "MASTER_DARK_REDL"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as FIB_DRS_REDL from calibFiles where DO.CATG == "FIB_DRS_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as FIB_ORD_TAB_REDL from calibFiles where DO.CATG == "FIB_ORD_TAB_REDL"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
minRet = 0; maxRet = 1;
select file as MASTER_BIAS_REDU from calibFiles where DO.CATG == "MASTER_BIAS_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as MASTER_DARK_REDU from calibFiles where DO.CATG == "MASTER_DARK_REDU"
   and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.DET.OUTPUTS==DET.OUTPUTS and inputFile.DET.CHIPS==DET.CHIPS and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 0; maxRet = 1;
select file as FIB_DRS_REDU from calibFiles where DO.CATG == "FIB_DRS_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY;
minRet = 1; maxRet = 1;
select file as FIB_ORD_TAB_REDU from calibFiles where DO.CATG == "FIB_ORD_TAB_REDU"
   and inputFile.INS.GRAT2.WLEN==INS.GRAT2.WLEN and inputFile.DET.WIN1.BINX==DET.WIN1.BINX and inputFile.DET.WIN1.BINY==DET.WIN1.BINY and inputFile.INS.GRAT2.ID==INS.GRAT2.ID and inputFile.DET.WIN1.NY==DET.WIN1.NY and inputFile.DET.WIN1.NX==DET.WIN1.NX and inputFile.DET.WIN1.STRX==DET.WIN1.STRX and inputFile.DET.WIN1.STRY==DET.WIN1.STRY and inputFile.INS.MODE==INS.MODE;
recipe flames_cal_mkmaster;
}
