# Make meas_mosaic backwards compatible with *_flux --> *_instFlux rename

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
2
• Sprint:
DRP F18-4, DRP F18-5
• Team:
Data Release Production

#### Description

The implementation of RFC-322 in DM-10302 saw the renaming of the flux fields in the catalogs from *_flux to *_instFlux along with an increment in the afw table VERSION to 3.  Aliases are added on read of catalogs that have VERSION < 3 for backwards compatibility.  However, the getFluxKeys() function in meas_mosaic cannot take advantage of these aliases as written, so meas_mosaic is currently broken for VERSION < 3 catalogs.  This needs to be fixed.

#### Activity

Hide
John Parejko added a comment -

Why does the meas_mosaic method have to be so complicated? Just have it return all keys that end in instFlux and instFluxErr and be done with it.

Show
John Parejko added a comment - Why does the meas_mosaic method have to be so complicated? Just have it return all keys that end in instFlux and instFluxErr and be done with it.
Hide
Lauren MacArthur added a comment -

That's the plan...but it's currently slightly complicated by the alias issues of DM-15891 in that I end up picking up the likes of:

 base_SdssShape_flux_xxinstFlux base_SdssShape_flux_yyinstFlux base_SdssShape_flux_xyinstFlux 

if I search on "instFlux".  These go away if I search on "_instFlux", but when I try tagging the "Err" on the end to get the flux error keys, I end up picking up two keys per aperture flux:

 base_CircularApertureFlux_3_0_instFluxErr base_CircularApertureFlux_3_instFluxErr base_CircularApertureFlux_4_5_instFluxErr base_CircularApertureFlux_4_instFluxErr ... 

Show
Lauren MacArthur added a comment - That's the plan...but it's currently slightly complicated by the alias issues of DM-15891 in that I end up picking up the likes of: base_SdssShape_flux_xxinstFlux base_SdssShape_flux_yyinstFlux base_SdssShape_flux_xyinstFlux if I search on "instFlux".  These go away if I search on "_instFlux", but when I try tagging the "Err" on the end to get the flux error keys, I end up picking up two keys per aperture flux: base_CircularApertureFlux_3_0_instFluxErr base_CircularApertureFlux_3_instFluxErr base_CircularApertureFlux_4_5_instFluxErr base_CircularApertureFlux_4_instFluxErr ...
Hide
Lauren MacArthur added a comment -

For now I plan to just search on "_instFlux" to get the flux keys and then manually tag the Err on the end to look up the associated error key (which I can update once DM-15891 gets resolved).

Show
Lauren MacArthur added a comment - For now I plan to just search on "_instFlux" to get the flux keys and then manually tag the Err on the end to look up the associated error key (which I can update once DM-15891 gets resolved).
Hide
Lauren MacArthur added a comment -

I can confirm that this runs on both old (RC/w_2018_32/DM-15184/, which is pre both calib_psfUsed->calib_psf_used & flux->instFlux) latest (RC/w_2018_41/DM-16011) reruns.

Specifically, I ran the following:

 mosaic.py /datasets/hsc/repo/ --rerun RC/w_2018_41/DM-16011/:private/lauren/mosaic --numCoresForRead=4 --id tract=9813 ccd=0..8^10..103 filter=HSC-I visit=1228..1232:2 mosaic.py /datasets/hsc/repo/ --rerun RC/w_2018_32/DM-15184/:private/lauren/mosaicBack --numCoresForRead=4 --id tract=9813 ccd=0..8^10..103 filter=HSC-I visit=1228..1232:2 

Show
Lauren MacArthur added a comment - I can confirm that this runs on both old ( RC/w_2018_32/ DM-15184 / , which is pre both calib_psfUsed -> calib_psf_used & flux -> instFlux ) latest ( RC/w_2018_41/ DM-16011 ) reruns. Specifically, I ran the following: mosaic.py / datasets / hsc / repo / - - rerun RC / w_2018_41 / DM - 16011 / :private / lauren / mosaic - - numCoresForRead = 4 - - id tract = 9813 ccd = 0. . 8 ^ 10. . 103 filter = HSC - I visit = 1228. . 1232 : 2 mosaic.py / datasets / hsc / repo / - - rerun RC / w_2018_32 / DM - 15184 / :private / lauren / mosaicBack - - numCoresForRead = 4 - - id tract = 9813 ccd = 0. . 8 ^ 10. . 103 filter = HSC - I visit = 1228. . 1232 : 2
Hide
Lauren MacArthur added a comment - - edited

Show
Lauren MacArthur added a comment - - edited See comments on DM-15569 . PR: https://github.com/lsst/meas_mosaic/pull/47

#### People

Assignee:
Lauren MacArthur
Reporter:
Lauren MacArthur
Reviewers:
Hsin-Fang Chiang
Watchers:
Hsin-Fang Chiang, Jim Bosch, John Parejko, John Swinbank, Lauren MacArthur, Yusra AlSayyad