# Allow controller = 'H' for exposure_id calculation

XMLWordPrintable

#### Details

• Type: Improvement
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
4
• Team:
Telescope and Site

#### Description

To allow ingest of phosim-simulated data while using lsstCam mapper we suggest to add  controller = 'H'.  This is to guarantee unique obsid values for phosim data (Tim Jennes's comment).  If this is done, currently the translator returns (using  obs_lsst version w.2020.48-1-gf0a7a3e )

 translate_header.py -p lsst.obs.lsst.translators MC_H_20000217_000032_R00_SW0.fits    Analyzing MC_H_20000217_000032_R00_SW0.fits... ValueError("Supplied controller, 'H' is neither 'O' nor 'C'") 

An update is needed to allow for controller = 'H' . It affects the  exposure_id method in https://github.com/lsst/obs_lsst/blob/master/python/lsst/obs/lsst/translators/lsst.py

It doesn't clash with other definitions https://confluence.lsstcorp.org/display/SYSENG/Image+naming+and+visit+definition+conventions (K-T Lim's comment).

#### Activity

Hide
Kian-Tat Lim added a comment -

Generally we only assign one code reviewer. https://developer.lsst.io/work/flow.html#assign-a-reviewer

The changes in the PR look good. An additional comment would be welcomed, as suggested in the PR. Ideally there would be a test as well; it looks like there may be some "controller = C" tests that could be emulated like https://github.com/lsst/obs_lsst/blob/master/tests/test_parsetask.py#L110-L132

Also make sure you test this in CI: https://developer.lsst.io/work/flow.html#testing-with-jenkins

Show
Kian-Tat Lim added a comment - Generally we only assign one code reviewer. https://developer.lsst.io/work/flow.html#assign-a-reviewer The changes in the PR look good. An additional comment would be welcomed, as suggested in the PR. Ideally there would be a test as well; it looks like there may be some "controller = C" tests that could be emulated like https://github.com/lsst/obs_lsst/blob/master/tests/test_parsetask.py#L110-L132 Also make sure you test this in CI: https://developer.lsst.io/work/flow.html#testing-with-jenkins
Hide
Kian-Tat Lim added a comment -

And the typical process for multiple reviewers is for each reviewer to remove their name from the reviewers list when done; the last sets the Jira issue to "Review Complete" state. Accordingly, I am removing myself.

Show
Kian-Tat Lim added a comment - And the typical process for multiple reviewers is for each reviewer to remove their name from the reviewers list when done; the last sets the Jira issue to "Review Complete" state. Accordingly, I am removing myself.
Hide
Kian-Tat Lim added a comment -

Looks reasonable. Thanks for adding the test.

Show
Kian-Tat Lim added a comment - Looks reasonable. Thanks for adding the test.

#### People

Assignee:
Krzysztof Suberlak
Reporter:
Krzysztof Suberlak
Reviewers:
Kian-Tat Lim
Watchers:
Kian-Tat Lim, Krzysztof Suberlak, Robert Lupton, Tim Jenness