read_noise_data = data['READ_NOISE']
system_noise_data = data['SYSTEM_NOISE']
total_noise_data = data['TOTAL_NOISE']
for amp, read_noise, system_noise, total_noise in zip(amps, read_noise_data,
                                                      system_noise_data,
                                                      total_noise_data):
    results.append(lcatr.schema.valid(lcatr.schema.get('read_noise'),
                                      amp=amp, read_noise=read_noise,
                                      system_noise=system_noise,
                                      total_noise=total_noise))

results.extend(siteUtils.jobInfo())

results.append(eotestUtils.eotestCalibrations())

fe55_acq_job_id = siteUtils.get_prerequisite_job_id('*_fe55_fe55_*.fits',
                                                    jobname=siteUtils.getProcessName('fe55_acq'))
md = dict(system_noise_file=dict(JOB_ID=fe55_acq_job_id))
results.extend(eotestUtils.eotestCalibsPersist('system_noise_file',
                                               metadata=md))

files = glob.glob('*read_noise?*.fits')
for fitsfile in files:
    eotestUtils.addHeaderData(fitsfile, LSST_NUM=sensor_id, TESTTYPE='FE55',
                              DATE=eotestUtils.utc_now_isoformat(),
                              CCD_MANU=siteUtils.getCcdVendor().upper())

data_products = [lcatr.schema.fileref.make(item) for item in files]
results.extend(data_products)

lcatr.schema.write_file(results)
lcatr.schema.validate_file()
results = siteUtils.jobInfo()
results.append(eotestUtils.eotestCalibrations())

sensor_id = siteUtils.getUnitId()
qe_data = pyfits.open('%s_QE.fits' % sensor_id)['QE_BANDS'].data
QE = OrderedDict((band, []) for band in qe_data.field('BAND'))
for amp in range(1, 17):
    values = qe_data.field('AMP%02i' % amp)
    for band, value in zip(QE, values):
        QE[band].append(value)

for band in QE:
    results.append(lcatr.schema.valid(lcatr.schema.get('qe_analysis'),
                                      band=band, QE=np.mean(QE[band])))

qe_acq_job_id = siteUtils.get_prerequisite_job_id('*_lambda_flat_*.fits',
                                                  jobname=siteUtils.getProcessName('qe_acq'))
md = dict(photodiode_ratio_file=dict(JOB_ID=qe_acq_job_id),
          illumination_non_uniformity_file=dict(JOB_ID=qe_acq_job_id))
results.extend(eotestUtils.eotestCalibsPersist('photodiode_ratio_file',
                                               'illumination_non_uniformity_file',
                                               metadata=md))
qe_files = glob.glob('*QE*.*')
for item in qe_files:
    if item.endswith('.fits'):
        eotestUtils.addHeaderData(item, LSST_NUM=sensor_id, TESTTYPE='LAMBDA',
                                  DATE=eotestUtils.utc_now_isoformat(),
                                  CCD_MANU=siteUtils.getCcdVendor().upper())
results.extend([lcatr.schema.fileref.make(item) for item in qe_files])

lcatr.schema.write_file(results)
lcatr.schema.validate_file()
                                      TESTTYPE='LAMBDA',
                                      DATE=eotestUtils.utc_now_isoformat(),
                                      CCD_MANU=ccd_vendor)
    results.extend(
        [siteUtils.make_fileref(item, folder=slot) for item in qe_files])
    # Persist the png files.
    metadata = dict(CCD_MANU=ccd_vendor,
                    LSST_NUM=sensor_id,
                    TESTTYPE='LAMBDA',
                    TEST_CATEGORY='EO')
    results.extend(
        siteUtils.persist_png_files('%s*.png' % sensor_id,
                                    sensor_id,
                                    folder=slot,
                                    metadata=metadata))

sensor_id = raft.sensor_names[0]
qe_acq_job_id = siteUtils.get_prerequisite_job_id(
    ('S*/%s_lambda_flat_*.fits' % sensor_id),
    jobname=siteUtils.getProcessName('qe_raft_acq'))
md = dict(photodiode_ratio_file=dict(JOB_ID=qe_acq_job_id),
          illumination_non_uniformity_file=dict(JOB_ID=qe_acq_job_id))

results.extend(
    eotestUtils.eotestCalibsPersist('photodiode_ratio_file',
                                    'illumination_non_uniformity_file',
                                    metadata=md))
results.extend(siteUtils.jobInfo())
lcatr.schema.write_file(results)
lcatr.schema.validate_file()
Ejemplo n.º 4
0
total_noise_data = data['TOTAL_NOISE']
for amp, read_noise, system_noise, total_noise in zip(amps, read_noise_data,
                                                      system_noise_data,
                                                      total_noise_data):
    results.append(
        lcatr.schema.valid(lcatr.schema.get('read_noise'),
                           amp=amp,
                           read_noise=read_noise,
                           system_noise=system_noise,
                           total_noise=total_noise))

results.extend(siteUtils.jobInfo())

results.append(eotestUtils.eotestCalibrations())

fe55_acq_job_id = siteUtils.get_prerequisite_job_id(
    '*_fe55_fe55_*.fits', jobname=siteUtils.getProcessName('fe55_acq'))
md = dict(system_noise_file=dict(JOB_ID=fe55_acq_job_id))
results.extend(
    eotestUtils.eotestCalibsPersist('system_noise_file', metadata=md))

files = glob.glob('*read_noise?*.fits')
for fitsfile in files:
    eotestUtils.addHeaderData(fitsfile,
                              LSST_NUM=sensor_id,
                              TESTTYPE='FE55',
                              DATE=eotestUtils.utc_now_isoformat(),
                              CCD_MANU=siteUtils.getCcdVendor().upper())

data_products = [lcatr.schema.fileref.make(item) for item in files]
results.extend(data_products)
    total_noise_data = data['TOTAL_NOISE']
    for amp, read_noise, system_noise, total_noise in zip(
            amps, read_noise_data, system_noise_data, total_noise_data):
        print "sensor = %s amp = %d read_noise = %f" % (sensor_id, amp,
                                                        read_noise)
        #        results.append(lcatr.schema.valid(lcatr.schema.get('read_noise'),
        #                                          amp=amp, read_noise=read_noise,
        #                                          system_noise=system_noise,
        #                                          total_noise=total_noise))

        results.extend(siteUtils.jobInfo())

    results.append(eotestUtils.eotestCalibrations())

    fe55_acq_job_id = siteUtils.get_prerequisite_job_id(
        '*/%s_fe55_fe55_*.fits' % sensor_id,
        jobname=siteUtils.getProcessName('fe55_acq'))
    md = dict(system_noise_file=dict(JOB_ID=fe55_acq_job_id))
    results.extend(
        eotestUtils.eotestCalibsPersist('system_noise_file', metadata=md))

    files = glob.glob('*read_noise?*.fits')
    for fitsfile in files:
        eotestUtils.addHeaderData(fitsfile,
                                  LSST_NUM=sensor_id,
                                  TESTTYPE='FE55',
                                  DATE=eotestUtils.utc_now_isoformat(),
                                  CCD_MANU=siteUtils.getCcdVendor().upper())

data_products = [lcatr.schema.fileref.make(item) for item in files]
results.extend(data_products)
sensor_id = siteUtils.getUnitId()
qe_data = pyfits.open('%s_QE.fits' % sensor_id)['QE_BANDS'].data
QE = OrderedDict((band, []) for band in qe_data.field('BAND'))
for amp in range(1, 17):
    values = qe_data.field('AMP%02i' % amp)
    for band, value in zip(QE, values):
        QE[band].append(value)

for band in QE:
    results.append(
        lcatr.schema.valid(lcatr.schema.get('qe_analysis'),
                           band=band,
                           QE=np.mean(QE[band])))

qe_acq_job_id = siteUtils.get_prerequisite_job_id(
    '*_lambda_flat_*.fits', jobname=siteUtils.getProcessName('qe_acq'))
md = dict(photodiode_ratio_file=dict(JOB_ID=qe_acq_job_id),
          illumination_non_uniformity_file=dict(JOB_ID=qe_acq_job_id))
results.extend(
    eotestUtils.eotestCalibsPersist('photodiode_ratio_file',
                                    'illumination_non_uniformity_file',
                                    metadata=md))
qe_files = glob.glob('*QE*.*')
for item in qe_files:
    if item.endswith('.fits'):
        eotestUtils.addHeaderData(item,
                                  LSST_NUM=sensor_id,
                                  TESTTYPE='LAMBDA',
                                  DATE=eotestUtils.utc_now_isoformat(),
                                  CCD_MANU=siteUtils.getCcdVendor().upper())
results.extend([lcatr.schema.fileref.make(item) for item in qe_files])
Ejemplo n.º 7
0
    read_noise_data = data['READ_NOISE']
    system_noise_data = data['SYSTEM_NOISE']
    total_noise_data = data['TOTAL_NOISE']
    for amp, read_noise, system_noise, total_noise in zip(amps, read_noise_data,
                                                          system_noise_data,
                                                          total_noise_data):
        results.append(lcatr.schema.valid(lcatr.schema.get('read_noise_raft'),
                                          amp=amp, read_noise=read_noise,
                                          system_noise=system_noise,
                                          total_noise=total_noise,
                                          slot=slot,
                                          sensor_id=wgSlotName))
#                                          sensor_id=sensor_id))

#    fe55_acq_job_id = siteUtils.get_prerequisite_job_id('S*/%s_fe55_fe55_*.fits' % sensor_id,
    fe55_acq_job_id = siteUtils.get_prerequisite_job_id('S*/%s_fe55_fe55_*.fits' % wgSlotName,
                                                        jobname=siteUtils.getProcessName('fe55_raft_acq'))

#    files = glob.glob('%s_read_noise?*.fits' % sensor_id)
    files = glob.glob('%s_read_noise?*.fits' % wgSlotName)
    for fitsfile in files:
        eotestUtils.addHeaderData(fitsfile, LSST_NUM=sensor_id, TESTTYPE='FE55',
                                  DATE=eotestUtils.utc_now_isoformat(),
                                  CCD_MANU=ccd_vendor)

    data_products = [siteUtils.make_fileref(item, folder=slot)
                     for item in files]
    results.extend(data_products)

    # Persist the png files.
    metadata = dict(CCD_MANU=ccd_vendor, LSST_NUM=sensor_id,
                    TESTTYPE='FE55', TEST_CATEGORY='EO')