Skip to content

Commit

Permalink
ensure bias frames are sorted and skip first five bias frames
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Apr 5, 2021
1 parent 60499a5 commit 85b2ea2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions harnessed_jobs/read_noise_BOT/v0/read_noise_jh_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
def read_noise_jh_task(det_name):
"""JH version of the single sensor read noise task."""
import os
import glob
import logging
import siteUtils
from bot_eo_analyses import make_file_prefix, glob_pattern,\
Expand All @@ -17,11 +16,13 @@ def read_noise_jh_task(det_name):
run = siteUtils.getRunNumber()
file_prefix = make_file_prefix(run, det_name)
acq_jobname = siteUtils.getProcessName('BOT_acq')
nskip = 5
nbias = os.environ.get('LCATR_NUM_BIAS_FRAMES', 10)

bias_files \
= siteUtils.dependency_glob(glob_pattern('read_noise', det_name),
acq_jobname=acq_jobname)[:nbias]
acq_jobname=acq_jobname)
bias_files = sorted(bias_files)[nskip:nskip + nbias]
if not bias_files:
logger.info("read_noise_task: Needed data files are missing "
"for detector %s", det_name)
Expand Down

0 comments on commit 85b2ea2

Please sign in to comment.