-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from lsst-camera-dh/LSSTTD-1470_add_overscan_task
Lssttd 1470 add overscan task
- Loading branch information
Showing
7 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#%Module1.0 #-*-tcl-*-# | ||
source "$::env(LCATR_MODULES)/lcatr.tcl" | ||
lcatr_package producer_overscan_BOT.py validator_overscan_BOT.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env ipython | ||
""" | ||
Harnessed job script for BOT overscan analysis. | ||
""" | ||
def overscan_jh_task(det_name): | ||
"""JH version of single sensor execution of the overscan task.""" | ||
import siteUtils | ||
from bot_eo_analyses import make_file_prefix, glob_pattern,\ | ||
get_amplifier_gains, bias_filename, overscan_task | ||
|
||
run = siteUtils.getRunNumber() | ||
file_prefix = make_file_prefix(run, det_name) | ||
acq_jobname = siteUtils.getProcessName('BOT_acq') | ||
|
||
flat_files = siteUtils.dependency_glob(glob_pattern('overscan', det_name), | ||
acq_jobname=acq_jobname) | ||
if not flat_files: | ||
print("overscan_task: Flat pairs files not found for detector", | ||
det_name) | ||
return None | ||
|
||
eotest_results_file = '{}_eotest_results.fits'.format(file_prefix) | ||
gains = get_amplifier_gains(eotest_results_file) | ||
bias_frame = bias_filename(run, det_name) | ||
|
||
return overscan_task(run, det_name, flat_files, gains, | ||
bias_frame=bias_frame) | ||
|
||
if __name__ == '__main__': | ||
import sys | ||
det_name = sys.argv[1] | ||
overscan_jh_task(det_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ipython | ||
""" | ||
Producer script for BOT overscan analysis. | ||
""" | ||
import os | ||
from overscan_jh_task import overscan_jh_task | ||
from bot_eo_analyses import get_analysis_types, run_python_task_or_cl_script | ||
|
||
if 'overscan' in get_analysis_types(): | ||
overscan_task_script \ | ||
= os.path.join(os.environ['EOANALYSISJOBSDIR'], 'harnessed_jobs', | ||
'overscan_BOT', 'v0', 'overscan_jh_task.py') | ||
|
||
run_python_task_or_cl_script(overscan_jh_task, overscan_task_script) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env ipython | ||
""" | ||
Validator script for BOT overscan analysis. | ||
""" | ||
from bot_eo_validators import run_validator | ||
run_validator('overscan') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters