Skip to content

Commit

Permalink
add divisidero tearing analysis to tearing_BOT job
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Sep 29, 2019
1 parent 8a5bff2 commit db25a12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions harnessed_jobs/tearing_BOT/v0/producer_tearing_BOT.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@
Producer script for BOT tearing analysis.
"""
import os
from camera_components import camera_info
from tearing_jh_task import tearing_jh_task
from raft_divisidero_tearing import raft_divisidero_tearing
from bot_eo_analyses import get_analysis_types, run_python_task_or_cl_script

if 'tearing' in get_analysis_types():
tearing_jh_task_script \
= os.path.join(os.environ['EOANALYSISJOBSDIR'], 'harnessed_jobs',
'tearing_BOT', 'v0', 'tearing_jh_task.py')
run_python_task_or_cl_script(tearing_jh_task, tearing_jh_task_script)

divisidero_jh_task_script \
= os.path.join(os.environ['EOANALYSISJOBSDIR'], 'harnessed_jobs',
'tearing_BOT', 'v0', 'raft_divisidero_tearing.py')
installed_rafts = camera_info.get_installed_raft_names()
run_python_task_or_cl_script(raft_divisidero_tearing,
divisidero_jh_task_script,
device_names=installed_rafts)
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run_tearing_detection(sensor_id):
import matplotlib.pyplot as plt
import siteUtils
import camera_components
import lsst.eotest.sensor as sensorTest
import lsst.eotest.raft as raftTest
from multiprocessor_execution import sensor_analyses

processes = 9 # Reserve 1 process per CCD.
Expand All @@ -68,10 +68,10 @@ def run_tearing_detection(sensor_id):
sflat_files = dict()
for item in files:
slot = det_map[os.path.basename(item).split('_')[0]]
sflat_files[slot] = [item]
sflat_files[slot] = item

max_divisidero_tearing \
= sensorTest.ana_divisidero_tearing(sflat_files, raft_unit_id, run)
= raftTest.ana_divisidero_tearing(sflat_files, raft_unit_id, run)
plt.savefig(f'{raft_unit_id}_{run}_divisidero.png')

with open(f'{raft_unit_id}_{run}_max_divisidero.json', 'w') as fd:
Expand Down

0 comments on commit db25a12

Please sign in to comment.