2012012180337-I-INFO-Running command-line mode.
2012012180337-D-DIAG-datasets=['ibjc32020']
2012012180337-D-DIAG-DEFAULT used for REF_SELECT_FILE: OPUS_DEFINITIONS_DIR:reference_file_defs.xml
2012012180337-D-DIAG-DEFAULT used for INPATH: /hstdev/project/mswam/opus/hlp
2012012180337-D-DIAG-DEFAULT used for TRLPATH: /hstdev/project/mswam/opus/hlp
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-get_restriction_keywords: adding DETECTOR
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'BIASFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_biasfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'BIASCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_biascorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DETECTOR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_detector')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'CCDAMP' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_ccdamp')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'CCDGAIN' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_ccdgain')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'BINAXIS1' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_binaxis1')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'BINAXIS2' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_binaxis2')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'APERTURE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('science', 'sci_aper_1234')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'SUBARRAY' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_science', 'w3s_subarray')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'CHINJECT' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_science', 'w3s_chinject')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DARKFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_darkfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DARKCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_darkcorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'SAMP_SEQ' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_samp_seq')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'SUBTYPE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_subtype')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'PFLTFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_pfltfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'FLATCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_flatcorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'FILTER' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_filter')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DFLTFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_dfltfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'LFLTFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_lfltfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'SHADFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_shadfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'SHADCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_shadcorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'FLSHFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_flshfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'FLSHCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_flshcorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'NLINFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_nlinfile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'GRAPHTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_graphtab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'COMPTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_comptab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'IDCTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_idctab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'ATODTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_atodtab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'ATODCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_atodcorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'BPIXTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_bpixtab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DQICORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_dqicorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'CCDTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_ccdtab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'OSCNTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_oscntab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'CRREJTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_crrejtab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'MDRIZTAB' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_mdriztab')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DRIZCORR' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_drizcorr')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'DGEOFILE' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using adjusted source ('wfc3_ref_data', 'w3r_best_dgeofile')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'TARGNAME' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('science', 'sci_targname')
2012012180337-D-DIAG-SELECT dkw_fieldname, hda_tablename FROM dads_keywords d, hda_fields h WHERE dkw_fieldname = hda_fieldname and dkw_keyword = 'EXPSTART' and dkw_real_instrument = 'WFC3' 
2012012180337-D-DIAG-using source ('wfc3_ref_data', 'w3r_expstart')
2012012180337-D-DIAG-self.dbsource={'LFLTFILE': ('wfc3_ref_data', 'w3r_best_lfltfile'), 'FLSHCORR': ('wfc3_ref_data', 'w3r_best_flshcorr'), 'DGEOFILE': ('wfc3_ref_data', 'w3r_best_dgeofile'), 'SUBTYPE': ('wfc3_ref_data', 'w3r_subtype'), 'BIASCORR': ('wfc3_ref_data', 'w3r_best_biascorr'), 'PFLTFILE': ('wfc3_ref_data', 'w3r_best_pfltfile'), 'EXPSTART': ('wfc3_ref_data', 'w3r_expstart'), 'FLATCORR': ('wfc3_ref_data', 'w3r_best_flatcorr'), 'BPIXTAB': ('wfc3_ref_data', 'w3r_best_bpixtab'), 'BIASFILE': ('wfc3_ref_data', 'w3r_best_biasfile'), 'CCDAMP': ('wfc3_ref_data', 'w3r_ccdamp'), 'APERTURE': ('science', 'sci_aper_1234'), 'SUBARRAY': ('wfc3_science', 'w3s_subarray'), 'FLSHFILE': ('wfc3_ref_data', 'w3r_best_flshfile'), 'BINAXIS1': ('wfc3_ref_data', 'w3r_binaxis1'), 'BINAXIS2': ('wfc3_ref_data', 'w3r_binaxis2'), 'IDCTAB': ('wfc3_ref_data', 'w3r_best_idctab'), 'TARGNAME': ('science', 'sci_targname'), 'COMPTAB': ('wfc3_ref_data', 'w3r_best_comptab'), 'DQICORR': ('wfc3_ref_data', 'w3r_best_dqicorr'), 'DARKCORR': ('wfc3_ref_data', 'w3r_best_darkcorr'), 'SAMP_SEQ': ('wfc3_ref_data', 'w3r_samp_seq'), 'DRIZCORR': ('wfc3_ref_data', 'w3r_best_drizcorr'), 'CHINJECT': ('wfc3_science', 'w3s_chinject'), 'CRREJTAB': ('wfc3_ref_data', 'w3r_best_crrejtab'), 'SHADCORR': ('wfc3_ref_data', 'w3r_best_shadcorr'), 'MDRIZTAB': ('wfc3_ref_data', 'w3r_best_mdriztab'), 'NLINFILE': ('wfc3_ref_data', 'w3r_best_nlinfile'), 'ATODCORR': ('wfc3_ref_data', 'w3r_best_atodcorr'), 'DARKFILE': ('wfc3_ref_data', 'w3r_best_darkfile'), 'DFLTFILE': ('wfc3_ref_data', 'w3r_best_dfltfile'), 'FILTER': ('wfc3_ref_data', 'w3r_filter'), 'ATODTAB': ('wfc3_ref_data', 'w3r_best_atodtab'), 'CCDGAIN': ('wfc3_ref_data', 'w3r_ccdgain'), 'CCDTAB': ('wfc3_ref_data', 'w3r_best_ccdtab'), 'SHADFILE': ('wfc3_ref_data', 'w3r_best_shadfile'), 'GRAPHTAB': ('wfc3_ref_data', 'w3r_best_graphtab'), 'DETECTOR': ('wfc3_ref_data', 'w3r_detector'), 'OSCNTAB': ('wfc3_ref_data', 'w3r_best_oscntab')}
2012012180337-D-DIAG-SELECT COUNT(*) FROM hda_fields WHERE hda_fieldname = 'w3r_data_set_name'
2012012180337-D-DIAG-SELECT w3r_best_lfltfile,w3r_best_flshcorr,w3r_subtype,w3r_best_biascorr,w3r_best_pfltfile, convert(char(12),w3r_expstart,102)+convert(char(12),w3r_expstart,108),w3r_best_flatcorr,w3r_best_biasfile,w3r_ccdamp,w3r_best_flshfile,w3r_binaxis1,w3r_binaxis2,w3r_best_idctab,w3r_best_nlinfile,w3r_best_dgeofile,w3r_best_comptab,w3r_best_darkcorr,w3r_samp_seq,w3r_best_drizcorr,w3r_best_dqicorr,w3r_best_shadcorr,w3r_detector,w3r_best_mdriztab,w3r_best_atodcorr,w3r_best_darkfile,w3r_best_dfltfile,w3r_best_atodtab,w3r_filter,w3r_best_bpixtab,w3r_ccdgain,w3r_best_ccdtab,w3r_best_shadfile,w3r_best_graphtab,w3r_best_crrejtab,w3r_best_oscntab FROM wfc3_ref_data WHERE w3r_data_set_name = 'IBJC32020'
2012012180337-D-DIAG-saving  = 2011.03.17  00:18:30    
2012012180337-D-DIAG-saving w3r_best_drizcorr = None
2012012180337-D-DIAG-saving w3r_best_crrejtab = N9I1435LI_CRR.FITS
2012012180337-D-DIAG-saving w3r_best_pfltfile = V8816167I_PFL.FITS
2012012180337-D-DIAG-saving w3r_ccdgain = 1.5
2012012180337-D-DIAG-saving w3r_best_darkcorr = None
2012012180337-D-DIAG-saving w3r_ccdamp = ABCD
2012012180337-D-DIAG-saving w3r_best_dgeofile = N/A               
2012012180337-D-DIAG-saving w3r_binaxis2 = 1
2012012180337-D-DIAG-saving w3r_binaxis1 = 1
2012012180337-D-DIAG-saving w3r_best_lfltfile = N/A               
2012012180337-D-DIAG-saving w3r_best_shadcorr = None
2012012180337-D-DIAG-saving w3r_best_ccdtab = T291659MI_CCD.FITS
2012012180337-D-DIAG-saving w3r_detector = UVIS
2012012180337-D-DIAG-saving w3r_best_oscntab = Q911321OI_OSC.FITS
2012012180337-D-DIAG-saving w3r_best_mdriztab = UBI1853QI_MDZ.FITS
2012012180337-D-DIAG-saving w3r_samp_seq = None
2012012180337-D-DIAG-saving w3r_filter = F438W
2012012180337-D-DIAG-saving w3r_best_biasfile = V5J1716EI_BIA.FITS
2012012180337-D-DIAG-saving w3r_best_dfltfile = N/A               
2012012180337-D-DIAG-saving w3r_best_dqicorr = None
2012012180337-D-DIAG-saving w3r_best_flatcorr = None
2012012180337-D-DIAG-saving w3r_best_atodtab = N9N16196I_A2D.FITS
2012012180337-D-DIAG-saving w3r_best_atodcorr = None
2012012180337-D-DIAG-saving w3r_best_darkfile = V9M1422TI_DRK.FITS
2012012180337-D-DIAG-saving w3r_best_graphtab = V9N1603MM_TMG.FITS
2012012180337-D-DIAG-saving w3r_best_bpixtab = U5D2012LI_BPX.FITS
2012012180337-D-DIAG-saving w3r_best_shadfile = N/A               
2012012180337-D-DIAG-saving w3r_best_idctab = V5R1512GI_IDC.FITS
2012012180337-D-DIAG-saving w3r_best_biascorr = None
2012012180337-D-DIAG-saving w3r_best_flshcorr = None
2012012180337-D-DIAG-saving w3r_best_nlinfile = N/A               
2012012180337-D-DIAG-saving w3r_best_flshfile = N/A               
2012012180337-D-DIAG-saving w3r_best_comptab = VB71653DM_TMC.FITS
2012012180337-D-DIAG-saving w3r_subtype = None
2012012180337-D-DIAG-SELECT COUNT(*) FROM hda_fields WHERE hda_fieldname = 'sci_data_set_name'
2012012180337-D-DIAG-SELECT sci_aper_1234,sci_targname FROM science WHERE sci_data_set_name = 'IBJC32020'
2012012180337-D-DIAG-saving sci_targname = SDSS-J090704.88+532656.6
2012012180337-D-DIAG-saving sci_aper_1234 = UVIS2
2012012180337-D-DIAG-SELECT COUNT(*) FROM hda_fields WHERE hda_fieldname = 'w3s_data_set_name'
2012012180337-D-DIAG-SELECT w3s_subarray,w3s_chinject FROM wfc3_science WHERE w3s_data_set_name = 'IBJC32020'
2012012180337-D-DIAG-saving w3s_subarray = F
2012012180337-D-DIAG-saving w3s_chinject = NONE
2012012180337-D-DIAG-input done,keywords=[<datasources.DBInputsource instance at 0x13b448c0>]
2012012180337-D-DIAG-Restriction OK, continue.
2012012180337-D-DIAG-reffile will be filled by: filename = cdbs_db.wfc3_biasfile( reff, aSource)
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'BIA' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.ccdgain = 1.5 and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 and wfc3_row_2.aperture = 'UVIS2' and wfc3_row_2.chinject = 'NONE' ) and wfc3_file_1.reference_file_type = 'BIA' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.ccdgain = 1.5 and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 and wfc3_row_1.aperture = 'UVIS2' and wfc3_row_1.chinject = 'NONE' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-file selection restriction NOT met: (aSource._keywords['DETECTOR'][0] == 'IR')
2012012180337-D-DIAG-file selection restriction NOT met: (aSource._keywords['DETECTOR'][0] == 'IR')
2012012180337-D-DIAG-file selection restriction NOT met: (aSource._keywords['DETECTOR'][0] == 'IR')
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-file selection restriction NOT met: (aSource._keywords['DETECTOR'][0] == 'IR')
2012012180337-D-DIAG-file selection restriction NOT met: (aSource._keywords['DETECTOR'][0] == 'IR')
2012012180337-D-DIAG-file selection restriction NOT met: (aSource._keywords['DETECTOR'][0] == 'IR')
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'DRK' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 ) and wfc3_file_1.reference_file_type = 'DRK' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'PFL' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.filter = 'F438W' and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 ) and wfc3_file_1.reference_file_type = 'PFL' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.filter = 'F438W' and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'DFL' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.filter = 'F438W' and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 ) and wfc3_file_1.reference_file_type = 'DFL' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.filter = 'F438W' and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 
2012012180337-D-DIAG-Zero matching rows found.
2012012180337-D-DIAG-required=None
2012012180337-D-DIAG-DFLTFILE NOT required
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'DFL' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.filter = 'F438W' and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 ) and wfc3_file_1.reference_file_type = 'DFL' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.filter = 'F438W' and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 
2012012180337-I-INFO-DFLTFILE value changed: N/A                => N/A
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'LFL' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.filter = 'F438W' ) and wfc3_file_1.reference_file_type = 'LFL' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.filter = 'F438W' 
2012012180337-D-DIAG-Zero matching rows found.
2012012180337-D-DIAG-required=None
2012012180337-D-DIAG-LFLTFILE NOT required
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'LFL' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.filter = 'F438W' ) and wfc3_file_1.reference_file_type = 'LFL' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.filter = 'F438W' 
2012012180337-I-INFO-LFLTFILE value changed: N/A                => N/A
2012012180337-D-DIAG-Restriction OK, continue.
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'SHD' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'SHD' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-Zero matching rows found.
2012012180337-D-DIAG-required=None
2012012180337-D-DIAG-SHADFILE NOT required
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'SHD' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'SHD' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-I-INFO-SHADFILE value changed: N/A                => N/A
2012012180337-D-DIAG-Restriction OK, continue.
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection CCDAMP
2012012180337-D-DIAG-adding file selection BINAXIS1
2012012180337-D-DIAG-adding file selection BINAXIS2
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'FLS' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 ) and wfc3_file_1.reference_file_type = 'FLS' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 
2012012180337-D-DIAG-Zero matching rows found.
2012012180337-D-DIAG-required=None
2012012180337-D-DIAG-FLSHFILE NOT required
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'FLS' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.ccdamp = 'ABCD' and wfc3_row_2.binaxis1 = 1 and wfc3_row_2.binaxis2 = 1 ) and wfc3_file_1.reference_file_type = 'FLS' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.ccdamp = 'ABCD' and wfc3_row_1.binaxis1 = 1 and wfc3_row_1.binaxis2 = 1 
2012012180337-I-INFO-FLSHFILE value changed: N/A                => N/A
2012012180337-D-DIAG-Restriction not met ((aSource._keywords['DETECTOR'][0] == 'IR')) Set file to N/A and skip.
2012012180337-I-INFO-NLINFILE value changed: N/A                => N/A
2012012180337-D-DIAG-reffile will be filled by: filename = cdbs_db.multi_tab( reff)
2012012180337-D-DIAG-SELECT max(synphot_file_1.file_name) FROM synphot_file synphot_file_1 WHERE synphot_file_1.general_availability_date = (SELECT max(synphot_file_2.general_availability_date)      from synphot_file synphot_file_2   where synphot_file_2.reference_file_type = 'GRAPHTAB'   and synphot_file_2.reject_flag = 'N'   and synphot_file_2.opus_flag = 'Y'   and synphot_file_2.archive_date is not null and synphot_file_2.opus_load_date is not null ) and synphot_file_1.reference_file_type = 'GRAPHTAB' and synphot_file_1.reject_flag = 'N' and synphot_file_1.opus_flag = 'Y' and synphot_file_1.archive_date is not null and synphot_file_1.opus_load_date is not null 
2012012180337-D-DIAG-reffile will be filled by: filename = cdbs_db.multi_tab( reff)
2012012180337-D-DIAG-SELECT max(synphot_file_1.file_name) FROM synphot_file synphot_file_1 WHERE synphot_file_1.general_availability_date = (SELECT max(synphot_file_2.general_availability_date)      from synphot_file synphot_file_2   where synphot_file_2.reference_file_type = 'COMPTAB'   and synphot_file_2.reject_flag = 'N'   and synphot_file_2.opus_flag = 'Y'   and synphot_file_2.archive_date is not null and synphot_file_2.opus_load_date is not null ) and synphot_file_1.reference_file_type = 'COMPTAB' and synphot_file_1.reject_flag = 'N' and synphot_file_1.opus_flag = 'Y' and synphot_file_1.archive_date is not null and synphot_file_1.opus_load_date is not null 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'IDC' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'IDC' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-Restriction OK, continue.
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'A2D' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'A2D' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'BPX' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'BPX' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'CCD' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'CCD' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'OSC' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'OSC' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'CRR' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'CRR' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'MDZ' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' ) and wfc3_file_1.reference_file_type = 'MDZ' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' 
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-adding file selection DETECTOR
2012012180337-D-DIAG-adding file selection FILTER
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'DXY' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.filter = 'F438W' ) and wfc3_file_1.reference_file_type = 'DXY' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.filter = 'F438W' 
2012012180337-D-DIAG-Zero matching rows found.
2012012180337-D-DIAG-required=NO
2012012180337-D-DIAG-DGEOFILE NOT required
2012012180337-D-DIAG-SELECT max(wfc3_file_1.file_name) FROM wfc3_file wfc3_file_1, wfc3_row wfc3_row_1 WHERE wfc3_file_1.useafter_date = (SELECT max(wfc3_file_2.useafter_date) FROM wfc3_file wfc3_file_2, wfc3_row wfc3_row_2 WHERE wfc3_file_2.reference_file_type = 'DXY' and wfc3_file_2.useafter_date <= '03/17/2011 00:18:30' and wfc3_file_2.reject_flag = 'N' and wfc3_file_2.opus_flag = 'Y' and wfc3_file_2.archive_date is not null and wfc3_file_2.opus_load_date is not null and wfc3_file_2.file_name =wfc3_row_2.file_name and wfc3_file_2.expansion_number = wfc3_row_2.expansion_number and wfc3_row_2.detector = 'UVIS' and wfc3_row_2.filter = 'F438W' ) and wfc3_file_1.reference_file_type = 'DXY' and wfc3_file_1.reject_flag = 'N' and wfc3_file_1.opus_flag = 'Y' and wfc3_file_1.archive_date is not null and wfc3_file_1.opus_load_date is not null and wfc3_file_1.file_name =wfc3_row_1.file_name and wfc3_file_1.expansion_number = wfc3_row_1.expansion_number and wfc3_row_1.detector = 'UVIS' and wfc3_row_1.filter = 'F438W' 
2012012180337-I-INFO-DGEOFILE value changed: N/A                => N/A
2012012180337-D-DIAG-before output,keywords={'LFLTFILE': ['N/A', 1], 'FLSHCORR': [None, 0], 'COMPTAB': ['VB71653DM_TMC.FITS', 0], 'SUBTYPE': [None, 0], 'OSCNTAB': ['Q911321OI_OSC.FITS', 0], 'PFLTFILE': ['V8816167I_PFL.FITS', 0], 'EXPSTART': ['2011.03.17  00:18:30    ', 0], 'FLATCORR': [None, 0], 'BPIXTAB': ['U5D2012LI_BPX.FITS', 0], 'CCDTAB': ['T291659MI_CCD.FITS', 0], 'CCDAMP': ['ABCD', 0], 'APERTURE': ['UVIS2', 0], 'SUBARRAY': ['F', 0], 'FLSHFILE': ['N/A', 1], 'BINAXIS1': [1, 0], 'BINAXIS2': [1, 0], 'IDCTAB': ['V5R1512GI_IDC.FITS', 0], 'TARGNAME': ['SDSS-J090704.88+532656.6', 0], 'DGEOFILE': ['N/A', 1], 'DQICORR': [None, 0], 'DARKCORR': [None, 0], 'SAMP_SEQ': [None, 0], 'DRIZCORR': [None, 0], 'CHINJECT': ['NONE', 0], 'CRREJTAB': ['N9I1435LI_CRR.FITS', 0], 'SHADCORR': [None, 0], 'MDRIZTAB': ['UBI1853QI_MDZ.FITS', 0], 'NLINFILE': ['N/A', 1], 'ATODCORR': [None, 0], 'DARKFILE': ['V9M1422TI_DRK.FITS', 0], 'DFLTFILE': ['N/A', 1], 'FILTER': ['F438W', 0], 'ATODTAB': ['N9N16196I_A2D.FITS', 0], 'CCDGAIN': [1.5, 0], 'BIASFILE': ['V5J1716EI_BIA.FITS', 0], 'SHADFILE': ['N/A', 1], 'GRAPHTAB': ['V9N1603MM_TMG.FITS', 0], 'DETECTOR': ['UVIS', 0], 'BIASCORR': [None, 0]}
UPDATE wfc3_ref_data SET
w3r_best_biasfile = 'V5J1716EI_BIA.FITS',
w3r_best_darkfile = 'V9M1422TI_DRK.FITS',
w3r_best_pfltfile = 'V8816167I_PFL.FITS',
w3r_best_dfltfile = 'N/A',
w3r_best_lfltfile = 'N/A',
w3r_best_shadfile = 'N/A',
w3r_best_flshfile = 'N/A',
w3r_best_nlinfile = 'N/A',
w3r_best_graphtab = 'V9N1603MM_TMG.FITS',
w3r_best_comptab = 'VB71653DM_TMC.FITS',
w3r_best_idctab = 'V5R1512GI_IDC.FITS',
w3r_best_atodtab = 'N9N16196I_A2D.FITS',
w3r_best_bpixtab = 'U5D2012LI_BPX.FITS',
w3r_best_ccdtab = 'T291659MI_CCD.FITS',
w3r_best_oscntab = 'Q911321OI_OSC.FITS',
w3r_best_crrejtab = 'N9I1435LI_CRR.FITS',
w3r_best_mdriztab = 'UBI1853QI_MDZ.FITS',
w3r_best_dgeofile = 'N/A'
WHERE w3r_data_set_name = 'IBJC32020'
