astronomy-commons / hipscat-import

HiPSCat import - generate HiPSCat-partitioned catalogs
https://hipscat-import.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Raise a warning if ra/dec column is not float64 #339

Open hombit opened 3 weeks ago

hombit commented 3 weeks ago

Feature request

For most types of spatial analysis, users would need double-precision floating-point numbers for coordinates, even if the input catalog has only single-precision. It would be helpful to raise a warning to recommend that users pre-process the data (or write their own file reader) to cast their data to float64.

We could also provide a (non-default?) option to make this conversion. I'm not sure if defaulting this option would be a good idea, as it would change the data and could produce inconsistent dtypes, for example when RA/Dec errors are presented in the catalog.

Before submitting Please check the following: