# Error in flux/instFlux alias setting following DM-10302

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
4
• Sprint:
AP F18-4, AP F18-5
• Team:

#### Description

In updating the pipe_analysis scripts following the changes on DM-10302, I noticed that when reading an old (I think it would be version 2) catalog, some of the aliases aren't getting set properly.  A few examples are:

 'base_SdssShape_flux_xxinstFlux'->'base_SdssShape_flux_xx_Cov' 'base_SdssShape_flux_xyinstFlux'->'base_SdssShape_flux_xy_Cov' 'base_SdssShape_flux_yyinstFlux'->'base_SdssShape_flux_yy_Cov' 'base_Blendedness_abs_flux_cinstFlux'->'base_Blendedness_abs_flux_child' 'base_Blendedness_abs_flux_painstFlux'->'base_Blendedness_abs_flux_parent' 'base_Blendedness_raw_flux_cinstFlux'->'base_Blendedness_raw_flux_child' 'base_Blendedness_raw_flux_painstFlux'->'base_Blendedness_raw_flux_parent' 

It seem that if "flux" is in the string, the characters beyond the last "" are replaced with "instFlux", regardless of what they are nor where the "_flux" occurred in the original string.

#### Activity

Hide
John Parejko added a comment -

Jim Bosch is fixing this as part of DM-15857.

Show
John Parejko added a comment - Jim Bosch is fixing this as part of DM-15857 .
Hide
Lauren MacArthur added a comment -

I've just discovered another issue related to the alias setting in regards to backwards compatibility in the context of joining reference matches to catalogs.  The matchesToCatalog function in afw (here) is a handy function that joins the matches found with the associated catalog entry into a single "match" catalog, putting a ref_ or src_ prefix on the field names for the reference and source fields, respectively. However, the aliases don't get propagated, so this function is currently not backwards compatible with old catalogs. I may be the only one who makes use of this function and I could easily hack a fix for this in the pipe_analysis scripts, but it does live in afw, so I wonder if the function itself should be updated to also include the aliases. What do you think? (Also pinging Paul Price on this one as I believe he was the original author of matchesToCatalog)

Show
Lauren MacArthur added a comment - I've just discovered another issue related to the alias setting in regards to backwards compatibility in the context of joining reference matches to catalogs.  The  matchesToCatalog function in afw ( here ) is a handy function that joins the matches found with the associated catalog entry into a single "match" catalog, putting a ref_ or src_ prefix on the field names for the reference and source fields, respectively. However, the aliases don't get propagated, so this function is currently not backwards compatible with old catalogs. I may be the only one who makes use of this function and I could easily hack a fix for this in the pipe_analysis scripts, but it does live in afw , so I wonder if the function itself should be updated to also include the aliases. What do you think? (Also pinging Paul Price on this one as I believe he was the original author of  matchesToCatalog)
Hide
Paul Price added a comment -

If you're looking at lsst.afw.table.matchesToCatalog, you should also look at last.meas.astrom.denormalizeMatches, which is incredibly similar and more widely used.

Show
Paul Price added a comment - If you're looking at lsst.afw.table.matchesToCatalog , you should also look at last.meas.astrom.denormalizeMatches , which is incredibly similar and more widely used.
Hide
John Parejko added a comment -

Lauren MacArthur: I'm marking this done, as the original bug you described should be fixed in DM-15857, which I just merged. If the bug you describe in your last comment remains, please file a new ticket (and try Paul Price's suggestion too).

Show
John Parejko added a comment - Lauren MacArthur : I'm marking this done, as the original bug you described should be fixed in DM-15857 , which I just merged. If the bug you describe in your last comment remains, please file a new ticket (and try Paul Price 's suggestion too).
Hide
Lauren MacArthur added a comment -

Thanks...doing it now: DM-16023

Show
Lauren MacArthur added a comment - Thanks...doing it now: DM-16023

#### People

Assignee:
John Parejko
Reporter:
Lauren MacArthur
Watchers:
Hsin-Fang Chiang, Jim Bosch, John Parejko, John Swinbank, Lauren MacArthur, Paul Price