-
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 #54 from lsst-camera-dh/u/jchiang/BOT_nonlinearity…
…_job add BOT nonlinearity job
- Loading branch information
Showing
6 changed files
with
124 additions
and
13 deletions.
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
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_nonlinearity_BOT.py validator_nonlinearity_BOT.py |
29 changes: 29 additions & 0 deletions
29
harnessed_jobs/nonlinearity_BOT/v0/nonlinearity_jh_task.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,29 @@ | ||
#!/usr/bin/env ipython | ||
""" | ||
Script for BOT nonlinearity analysis. | ||
""" | ||
def nonlinearity_jh_task(det_name): | ||
"""JH version of single sensor execution of the non-linearity task.""" | ||
import glob | ||
import siteUtils | ||
from bot_eo_analyses import make_file_prefix, nonlinearity_task | ||
|
||
run = siteUtils.getRunNumber() | ||
file_prefix = make_file_prefix(run, det_name) | ||
|
||
try: | ||
detresp_file \ | ||
= siteUtils.dependency_glob(f'{det_name}*_det_response.fits', | ||
jobname='flat_pairs_BOT')[0] | ||
except IndexError: | ||
print("nonlinearity_task: detector response file not found for", | ||
det_name) | ||
return None | ||
|
||
outfile = f'{file_prefix}_nlc.fits' | ||
return nonlinearity_task(run, det_name, detresp_file, outfile) | ||
|
||
if __name__ == '__main__': | ||
import sys | ||
det_name = sys.argv[1] | ||
nonlinearity_jh_task(det_name) |
13 changes: 13 additions & 0 deletions
13
harnessed_jobs/nonlinearity_BOT/v0/producer_nonlinearity_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,13 @@ | ||
#!/usr/bin/env ipython | ||
""" | ||
Producer script for BOT nonlinearity analysis. | ||
""" | ||
import os | ||
from nonlinearity_jh_task import nonlinearity_jh_task | ||
from bot_eo_analyses import get_analysis_types, run_python_task_or_cl_script | ||
|
||
if 'nonlinearity' in get_analysis_types(): | ||
nonlinearity_script \ | ||
= os.path.join(os.environ['EOANALYSISJOBSDIR'], 'harnessed_jobs', | ||
'nonlinearity_BOT', 'v0', 'nonlinearity_jh_task.py') | ||
run_python_task_or_cl_script(nonlinearity_jh_task, nonlinearity_script) |
6 changes: 6 additions & 0 deletions
6
harnessed_jobs/nonlinearity_BOT/v0/validator_nonlinearity_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,6 @@ | ||
#!/usr/bin/env ipython | ||
""" | ||
Validator script for BOT flat pairs (linearity and full-well) analysis. | ||
""" | ||
from bot_eo_validators import run_validator | ||
run_validator('nonlinearity') |
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