コード例 #1
0
def run_trap_task(sensor_id):
    """Run the traps analysis for a single sensor."""
    import lsst.eotest.sensor as sensorTest
    import siteUtils
    import eotestUtils

    trap_file = siteUtils.dependency_glob(
        'S*/%s_trap_ppump_*.fits' % sensor_id,
        jobname=siteUtils.getProcessName('ppump_raft_acq'),
        description='Trap file:')[0]
    mask_files = \
        eotestUtils.glob_mask_files(pattern='%s_*mask.fits' % sensor_id)
    # Omit rolloff defects mask since a trap in the rolloff edge region can
    # affect the entire column.
    bias_frame = siteUtils.dependency_glob('%s_sflat*median_bias.fits' %
                                           sensor_id,
                                           description='Super bias frame:')[0]
    mask_files = [
        item for item in mask_files if item.find('rolloff_defects') == -1
    ]
    print("Using mask files:")
    for mask_file in mask_files:
        print("  " + mask_file)

    gains = eotestUtils.getSensorGains(jobname='fe55_raft_analysis',
                                       sensor_id=sensor_id)

    task = sensorTest.TrapTask()
    task.run(sensor_id, trap_file, mask_files, gains, bias_frame=bias_frame)
コード例 #2
0
def traps_task(run, det_name, trap_file, gains, mask_files=(), bias_frame=None):
    """Single sensor execution of the traps analysis task."""
    file_prefix = make_file_prefix(run, det_name)
    task = sensorTest.TrapTask()
    task.run(file_prefix, trap_file, mask_files, gains, bias_frame=bias_frame,
             linearity_correction=get_nlc_func(det_name))
コード例 #3
0
#!/usr/bin/env python
import lsst.eotest.sensor as sensorTest
import siteUtils
import eotestUtils

siteUtils.aggregate_job_ids()
sensor_id = siteUtils.getUnitId()
trap_file = siteUtils.dependency_glob(
    '*_trap_ppump_*.fits',
    jobname=siteUtils.getProcessName('ppump_acq'),
    description='Trap file:')[0]
mask_files = eotestUtils.glob_mask_files()
# Omit rolloff defects mask since a trap in the rolloff edge region can
# affect the entire column.
mask_files = [
    item for item in mask_files if item.find('rolloff_defects') == -1
]
print("Using mask files:")
for mask_file in mask_files:
    print("  " + mask_file)

gains = eotestUtils.getSensorGains()

task = sensorTest.TrapTask()
task.run(sensor_id, trap_file, mask_files, gains)