astro-otter / otterdb

Backend database code and data for OTTER
MIT License
0 stars 0 forks source link

Issue with distance property #3

Closed noahfranz13 closed 2 months ago

noahfranz13 commented 2 months ago

It seems like the same value for the distance can be listed twice in the property. For example, see the redshifts in the AT2018zr.json file. This is clearly a bug since they should just be listed once with multiple references.

noahfranz13 commented 2 months ago

It's occuring because of this code block: https://github.com/astro-otter/otter/blob/0ff2ef2df51173fc66e2410b82234ec7e8135cbe/src/otter/io/transient.py#L935-L953

This doesn't "ignore" the references column of the dataframe when looking for duplicates and therefore misses some duplications. I think we want to ignore the reference column and then uniquely merge the lists of references to make sure we keep all of the correct ones around.