dirac-institute / kbmod

KBMOD (Kernel-Based Moving Object Detection)
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Force MaskedColumns to regular Columns #696

Open DinoBektesevic opened 2 months ago

DinoBektesevic commented 2 months ago

See https://github.com/dirac-institute/kbmod/pull/695.

We should return the test for falsy values, otherwise we risk Astropy autocasting the column into a MaskedColumn without asking us. This is a symptom of the fact that the ButlerStandardizer is version dependent and we have data in our datastore that was processed, exported and then re-ingested, from different stack versions.

When the stack processing the data is of a later version than the one we use with ButlerStandardizer, and has removed one or more properties from objects like visit_info or summary_stats (which we use to extract metadata in the Butler), the returned value is sometimes ambiguous and is interpreted as a MaskedConstant (by either pybind or astropy). This auto-casts the entire column into a masked column which causes unexpected behavior.

The solution is either: