[AstroPy] Changing table column from float64 to float32

Jeffrey Brent McBeth mcbeth at broggs.org
Tue Jul 12 20:36:03 EDT 2022


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/astropy/attachments/20220712/58d21be3/attachment-0001.sig>


More information about the AstroPy mailing list