[AstroPy] Changing table column from float64 to float32

Ivan Valtchanov ivvv68 at gmail.com
Wed Jul 13 03:42:36 EDT 2022


Hi all,

Don't get me wrong. I am not advocating to use float32 in all cases of
coordinates, times etc. I am working with a particular catalogue where I
don't really see the need to use float64 for some of the columns. Of course
it's up to the catalogue builders to decide.

I've suffered some extreme cases of teams deciding to use double precision
for everything float and as a result processing that data needed at least
64 GB RAM, no way to process it on a normal laptop.

Cheers,
Ivan



On Wed, 13 Jul 2022 at 02:36, Jeffrey Brent McBeth <mcbeth at broggs.org>
wrote:

> On Tue, Jul 12, 2022 at 09:52:34AM -0700, Benjamin Weiner wrote:
> >    For quantities that have a large value but where small differences
> may be
> >    important, using double precision is often warranted.  Single
> precision
> >    has a precision of 1 in 2^23 or about 6.9 dex in log. This translates
> to
> >    of order 0.1 arcsecond in RA/Dec, or 9 minutes of time on an MJD of
> 50000.
> >    Propagating truncation errors through further code or processing can
> >    magnify these effects, which is one reason that catalog makers carry
> >    around the extra digits and internal routines/constants are often
> written
> >    in double where explicit typing is needed.
>
> Time was going to be my point out.  Unless I'm mistaken, astropy keeps
> time as two float64 and tries to keep the units in the first and fraction
> in
> the second.  When we have to export to file, for our needs, even with MJD
> we store in float128, as float64 leavs us around 0.5μs, which is too
> much jitter for some activities involving fine propagation.  The space
> and computational slowdown is worth it for our needs (even if we don't get
> the full
> 113 bits (or whatever)
>
> Jeffrey McBeth
>
>
> --
> "The man who does not read good books has no advantage over
>  the man who cannot read them."
>  -- not Mark Twain, maybe a southen librarian in 1910
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20220713/6ba3c5e5/attachment.html>


More information about the AstroPy mailing list