cxcsds / ciao-contrib

Extra scripts and code to enhance the capabilities of CIAO.
GNU General Public License v3.0
8 stars 6 forks source link

chandra_repro: tweak for pre-repro3 (very early mission) data #879

Closed kglotfelty closed 1 month ago

kglotfelty commented 4 months ago

Vinay found an observation in the archive that has not been through repro3 so the *FILE keywords used to automatically locate auxillary files are missing. Ref hd tix 25280.

This PR updates the way chandra_repro calls r4_header_update to specify the pbk and asol files names. This works whether the FILE keywords are present or not. (There is other logic in chandra_repro that already checks that the FILE keywords matches what it finds when globbing through the primary and secondary dirs.)

DougBurke commented 4 months ago

Ahh. I had assumed Vinay was just using an old dataset he had lying around!

kglotfelty commented 4 months ago

Update: OK, so the problem isn't missing *FILE keywords. The problem is that the DM is fouling up the GTIs.

r4_header_update uses the ObsInfo class to locate the files, but after running a_p_e, the GTIs are even more fouled up and it ends up creating a generic GTI blocks w/o a CCD_ID keyword which throws an exception in the ObsInfo init.

The "real" fix will need to happen in the DM; however, this change, to specify the file names explicitly is a good work around, so still a useful PR.