[fitsbits] Output array type when BZERO is an integer {External}
Maren Purves
m.purves at eaobservatory.org
Tue Mar 12 18:53:42 EDT 2024
The confusion probably comes from that those who mostly use
dynamically typed languages interpret anything that doesn't have a
decimal point as integer. As somebody who 'grew' up' with "IMPLICIT
NONE" this occasionally still catches me when using python as a
command line calculator because it doesn't convert to floating point
in the division of numbers that don't have decimal points.
Maren Purves
Head of Instrument and Telescope Software
East Asian Observatory / JCMT
On Tue, Mar 12, 2024 at 9:22 AM William Pence via fitsbits
<fitsbits at listmgr.nrao.edu> wrote:
>
> I think the confusion here comes from thinking that BZERO can have an integer value. This is incorrect because by definition BZERO always has a floating point value even if the decimal point is not explicitly present, and even if the keyword is not actually present in the header.
>
> Bill
>
> > On Mar 12, 2024, at 1:21 PM, Barrett, Paul via fitsbits <fitsbits at listmgr.nrao.edu> wrote:
> >
> >
> > I'll ask this question one more time and then I'll let it go.
> >
> > I understand that the default behaviour for BZERO and BSCALE creates a floating point array because of the typical upconversion rules. However, I'm not clear about the data type for the special case where BZERO is an integer. In this case, it appears that BZERO is added first to the integer array before converting it to a floating point array, because BSCALE = 1.0 implies upconversion. Is this correct?
> >
>
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.nrao.edu
> https://listmgr.nrao.edu/mailman/listinfo/fitsbits
More information about the fitsbits
mailing list