Skip to content

Commit

Permalink
Merge pull request #46 from lsst-ts/tickets/DM-45552
Browse files Browse the repository at this point in the history
Send sensor_ids instead of sensor_names to ts_ofc
  • Loading branch information
gmegh authored Aug 2, 2024
2 parents 63735ab + e283c23 commit a97c479
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 6 additions & 0 deletions doc/versionHistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
##################
Version History
##################
-------------
1.6.1
-------------

* Update to send sensor_ids instead of sensor_names to ts_ofc

-------------
1.6.0
-------------
Expand Down
12 changes: 5 additions & 7 deletions python/lsst/ts/imsim/closed_loop_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,24 +529,22 @@ def _run_sim(
[sensor_wfe.annular_zernike_poly for sensor_wfe in list_of_wf_err]
)

sensor_names = np.array(
[sensor_wfe.sensor_name for sensor_wfe in list_of_wf_err]
sensor_ids = np.array(
[sensor_wfe.sensor_id for sensor_wfe in list_of_wf_err]
)

# Only include the fwhm data from sensor we are simulating
# (e.g. only raft centers instead of full FAM).
if self.use_ccd_img:
fwhm_idx = [
ref_sensor_name_list.index(sens_name) for sens_name in sensor_names
]
fwhm_idx = [ref_sensor_id_list.index(sens_id) for sens_id in sensor_ids]
fwhm = fwhm[fwhm_idx]

# Pass data to OFC
self.ofc_calc.set_fwhm_data(fwhm, sensor_names)
self.ofc_calc.set_fwhm_data(fwhm, sensor_ids)

self.ofc_calc.calculate_corrections(
wfe=wfe,
sensor_names=sensor_names,
sensor_ids=sensor_ids,
filter_name=obs_metadata.band.upper(),
rotation_angle=obs_metadata.rotator_angle,
)
Expand Down

0 comments on commit a97c479

Please sign in to comment.