#!/usr/bin/env python import lcatr.schema import siteUtils import eotestUtils sensor_id = siteUtils.getUnitId() xtalk_file = '%s_xtalk_matrix.fits' % sensor_id results = [lcatr.schema.fileref.make(xtalk_file), eotestUtils.eotestCalibrations()] results.extend(siteUtils.jobInfo()) results.extend(eotestUtils.eotestCalibsPersist('system_crosstalk_file')) lcatr.schema.write_file(results) lcatr.schema.validate_file()
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())
#!/usr/bin/env python import glob from collections import OrderedDict import numpy as np import pyfits import lcatr.schema import siteUtils import eotestUtils 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))
#!/usr/bin/env python import lcatr.schema import siteUtils import eotestUtils sensor_id = siteUtils.getUnitId() xtalk_file = '%s_xtalk_matrix.fits' % sensor_id results = [ lcatr.schema.fileref.make(xtalk_file), eotestUtils.eotestCalibrations() ] results.extend(siteUtils.jobInfo()) results.extend(eotestUtils.eotestCalibsPersist('system_crosstalk_file')) lcatr.schema.write_file(results) lcatr.schema.validate_file()