Skip to content

Commit

Permalink
Merge pull request #8 from lsst-camera-dh/LSSTTD-1055
Browse files Browse the repository at this point in the history
Have single sensor plots display LCA-57 specs
  • Loading branch information
jchiang87 authored May 31, 2017
2 parents 16524a3 + e20c350 commit 0ae44ff
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from multiprocessor_execution import sensor_analyses

def run_bright_pixels_task(sensor_id):
"Single sensor execution of the bright pixels task."
file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber())
dark_files = siteUtils.dependency_glob('S*/%s_dark_dark_*.fits' % sensor_id,
jobname=siteUtils.getProcessName('dark_raft_acq'),
Expand All @@ -25,7 +26,8 @@ def run_bright_pixels_task(sensor_id):
siteUtils.make_png_file(sensorTest.plot_flat,
'%s_medianed_dark.png' % file_prefix,
'%s_median_dark_bp.fits' % sensor_id,
title='%s, medianed dark for bright defects analysis' % sensor_id)
title='%s, medianed dark for bright defects analysis' % sensor_id,
annotation='e-/pixel, gain-corrected, bias-subtracted')

if __name__ == '__main__':
sensor_analyses(run_bright_pixels_task)
4 changes: 3 additions & 1 deletion harnessed_jobs/cte_raft/v0/producer_cte_raft.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from multiprocessor_execution import sensor_analyses

def run_cte_task(sensor_id):
"Single sensor execution of the cte task."
file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber())
mask_files = \
eotestUtils.glob_mask_files(pattern='%s_*mask.fits' % sensor_id)
Expand Down Expand Up @@ -53,7 +54,8 @@ def run_cte_task(sensor_id):
sflat_file.replace('.fits', '.png').replace(sensor_id, file_prefix),
sflat_file,
title=('%s, CTE supeflat, %s flux '
% (sensor_id, flux_level)))
% (sensor_id, flux_level)),
annotation='ADU/pixel')
siteUtils.make_png_file(plots.cte_profiles,
('%s_serial_oscan_%s.png' %
(file_prefix, flux_level)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from multiprocessor_execution import sensor_analyses

def run_dark_current_task(sensor_id):
"Single sensor execution of dark current analyses."
file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber())
dark_files = siteUtils.dependency_glob('S*/%s_dark_dark_*.fits' % sensor_id,
jobname=siteUtils.getProcessName('dark_raft_acq'),
Expand All @@ -35,5 +36,9 @@ def run_dark_current_task(sensor_id):
dark_curr_pixels, read_noise, dark95s,
exptime=16, title=sensor_id)

plots = sensorTest.EOTestPlots(sensor_id, results_file=results_file)
siteUtils.make_png_file(plots.total_noise, '%s_noise.png' % file_prefix,
dark95s=dark95s)

if __name__ == '__main__':
sensor_analyses(run_dark_current_task)
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from multiprocessor_execution import sensor_analyses

def run_dark_pixels_task(sensor_id):
"Single sensor execution of the dark pixels task."
file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber())
sflat_files = siteUtils.dependency_glob('S*/%s_sflat_500_flat_H*.fits' % sensor_id,
jobname=siteUtils.getProcessName('sflat_raft_acq'),
Expand All @@ -22,7 +23,8 @@ def run_dark_pixels_task(sensor_id):
siteUtils.make_png_file(sensorTest.plot_flat,
'%s_superflat_dark_defects.png' % file_prefix,
'%s_median_sflat.fits' % sensor_id,
title='%s, superflat for dark defects analysis' % sensor_id)
title='%s, superflat for dark defects analysis' % sensor_id,
annotation='ADU/pixel')

if __name__ == '__main__':
sensor_analyses(run_dark_pixels_task)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from multiprocessor_execution import sensor_analyses

def run_fe55_task(sensor_id):
"Single sensor execution of the Fe55 analysis task."
file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber())
fe55_files = siteUtils.dependency_glob('S*/%s_fe55_fe55_*.fits' % sensor_id,
jobname=siteUtils.getProcessName('fe55_raft_acq'),
Expand All @@ -28,7 +29,8 @@ def run_fe55_task(sensor_id):
print("processing fe55_zoom:", fe55_files[0])
siteUtils.make_png_file(sensorTest.fe55_zoom,
'%(file_prefix)s_fe55_zoom.png' % locals(),
fe55_files[0], size=250, amp=1)
fe55_files[0], size=250, amp=1,
annotation='ADU/pixel')

#
# Perform analysis of 9-pixel statistics for Fe55 charge clusters.
Expand All @@ -51,7 +53,7 @@ def run_fe55_task(sensor_id):
'%s_fe55_apflux_parallel.png' % file_prefix,
pixel_coord='y')

except Exception as eobj:
except StandardError as eobj:
print("Exception raised while creating pixel statistics plots:")
print(str(eobj))
print("Skipping these plots.")
Expand All @@ -75,7 +77,8 @@ def run_fe55_task(sensor_id):
siteUtils.make_png_file(sensorTest.plot_flat,
'%s_mean_bias.png' % file_prefix,
mean_bias_file,
title='%s, mean bias frame' % sensor_id)
title='%s, mean bias frame' % sensor_id,
annotation='ADU/pixel, overscan-subtracted')

fe55_file = glob.glob('%s_psf_results*.fits' % sensor_id)[0]
siteUtils.make_png_file(plots.fe55_dists,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from multiprocessor_execution import sensor_analyses

def run_qe_task(sensor_id):
"Single sensor execution of the QE task."
file_prefix = '%s_%s' % (sensor_id, siteUtils.getRunNumber())
lambda_files = siteUtils.dependency_glob('S*/%s_lambda_flat_*.fits' % sensor_id,
jobname=siteUtils.getProcessName('qe_raft_acq'),
Expand Down Expand Up @@ -53,8 +54,9 @@ def run_qe_task(sensor_id):
qe_file='%s_QE.fits' % sensor_id)

try:
plots.flat_fields(os.path.dirname(lambda_files[0]))
except Exception as eobj:
plots.flat_fields(os.path.dirname(lambda_files[0]),
annotation='e-/pixel, gain-corrected, bias-subtracted')
except StandardError as eobj:
print("Exception raised while creating flat fields:")
print(str(eobj))

Expand Down
5 changes: 0 additions & 5 deletions harnessed_jobs/read_noise_raft/v0/producer_read_noise_raft.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,5 @@ def run_read_noise_task(sensor_id):
task.run(sensor_id, bias_files, gains, system_noise=system_noise,
mask_files=mask_files, use_overscan=True)

results_file = '%s_eotest_results.fits' % sensor_id
plots = sensorTest.EOTestPlots(sensor_id, results_file=results_file)

siteUtils.make_png_file(plots.noise, '%s_noise.png' % file_prefix)

if __name__ == '__main__':
sensor_analyses(run_read_noise_task)

0 comments on commit 0ae44ff

Please sign in to comment.