astrorama / SourceXtractorPlusPlus

SourceXtractor++, the next generation SExtractor
https://astrorama.github.io/SourceXtractorPlusPlus/
GNU Lesser General Public License v3.0
72 stars 9 forks source link

Missing digits in property 'WorldCentroid" #450

Closed mkuemmel closed 2 years ago

mkuemmel commented 2 years ago

Looks like there are digits missing for the property 'WorldCentroid". The output is:

world_centroid_alpha world_centroid_delta

            22.926              56.9815
           22.9245              56.9805
           22.9279              56.9822
           22.9278              56.9821
           22.9256              56.9806

Both the catalog and the screen output have only 4 digits, which corresponds to 0.18" and is way too much. Maybe the ASCII output is limited to float precision?

Could be that this issue is out since long time. In FITS everything is okay.

ayllon commented 2 years ago

I think Alexandria just uses whatever default std::stringstream has, which is 6 (so 4 decimal in this case). I suppose it should use the highest precision possible for the type, something like std::setprecision(std::numeric_limits<double>::digits10)

marcschefer commented 2 years ago

It has always been like that: the ASCII output has limited precision. I'm quite sure we discussed that a long time ago and we were all fine with that. ASCII is good for visual inspection but for anything where we care about precision we use the FITS output.

mkuemmel commented 2 years ago

I don't remember having discussed that.

If we leave it at that we must print a huge warning whenever users want an ASCII output. Some users select that format and they should be discouraged.

Unfortunately the given ASCII precision is sufficient for almost all quantities, but of course RA/Dec is quite an important one.

ebertin commented 2 years ago

I think that every output quantity needs to have a display format associated to it (along with units and storage precision). This has always been the case in the original SExtractor. It should be consistent with the TDISP format from FITS binary tables.