# Update PhosimEimgParseTask to use LsstCam

XMLWordPrintable

#### Details

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

#### Description

To allow ingest of phosim-simulated e-images, obs_lsst/config/phosim/ingestEimg.py was used as config for ingestImages.py , but with an update to the phosim repackager to emulate LsstCam headers,  a change is needed to use LsstCamMapper for header translation  (PhosimParseTask to LsstCamParseTask in  https://github.com/lsst/obs_lsst/blob/61239df17fc0cad6f2250682df420affea96f534/python/lsst/obs/lsst/phosim.py#L62  )

Otherwise an incorrect set of header translators is used :

 ingestImages.py /project/scichris/repackagerTest/input_w48/ /project/scichris/repackagerTest/intraRpkgd/*.fits --configfile /project/scichris/dev/obs_lsst/config/phosim/ingestEimg.py

yields

#### Activity

Hide
Tim Jenness added a comment -

Looks fine although I'm worried about old data now being broken and that there is no test that new data header parsing works.

Show
Tim Jenness added a comment - Looks fine although I'm worried about old data now being broken and that there is no test that new data header parsing works.
Hide
Krzysztof Suberlak added a comment - - edited

I replied in the github thread: as long as we keep the name of the ingestEimg.py config file  https://github.com/lsst/obs_lsst/blob/master/config/phosim/ingestEimg.py for ingest of e-images, then no changes are needed in ts_wep ( in https://github.com/lsst-ts/ts_wep/blob/08d0c2c4c0f6ed37fcc86af9ac09386469ae8824/python/lsst/ts/wep/CamDataCollector.py#L105 ) .

Updated ingestEimg.py could contain eg.

Would the preferred location of LsstCamEImgParseTask be in obs/lsst/ingest.py

https://github.com/lsst/obs_lsst/blob/master/python/lsst/obs/lsst/ingest.py (so it's in the same place as LsstCamParseTask, and we are importing above

from lsst.obs.lsst.ingest import LsstCamEimgParseTask) , or in obs/lsst/phosim.py

https://github.com/lsst/obs_lsst/blob/master/python/lsst/obs/lsst/phosim.py (since it pertains to data created by phosim)?

I think the former (since in the updated repackager we are making phosim data look like lsstCam data), but I am open for other suggestions. It is understood to be temporary, while the ts_aos still uses Gen2 Butler in  ts_wep,  as the next major move will be to update to Gen3.

Show
Hide
Krzysztof Suberlak added a comment -

Considering that we will need to simulate phosim-LsstComCam-like images that also make e-images, there will be a place for LsstComCamEimgParseTask. Thus I made LsstCamEimgParseTask, adding the testfile in config, and a test for header translation.

Show
Krzysztof Suberlak added a comment - Considering that we will need to simulate phosim-LsstComCam-like images that also make e-images, there will be a place for LsstComCamEimgParseTask . Thus I made LsstCamEimgParseTask , adding the testfile in config, and a test for header translation.
Hide
Krzysztof Suberlak added a comment -

I close it since the PR277 got merged

Show
Krzysztof Suberlak added a comment - I close it since the PR277 got merged

#### People

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