[AstroPy] Pyfits nan issue

Perry Greenfield perry@stsci....
Fri Sep 11 14:08:18 CDT 2009


Can you make the file available to see what is going on?

Thanks, Perry

On Sep 11, 2009, at 2:48 PM, Tommy Grav wrote:

> I am trying to read in images using the pyfits svn trunk
> (2.1.1dev494). These images
> display correctly in ds9, but when reading in pyfits the nan values
> are converted to
> very large values (well not that large, for example 53662.75, but with
> different values
> for each image).
>
>>>> hdu.info()
> Filename: o5014g0242o.84241.wrp.7117.skycell.077.fits
> No.    Name         Type      Cards   Dimensions   Format
> 0    PRIMARY     PrimaryHDU       6  ()            int16
> 1                CompImageHDU    98  (6000, 6000)  float32
>>>> hdu[1].header["BITPIX"]
> -32
>>>> np.isnan(hdu[1].data).sum()
> 0
>>>> hdu[1].data.max()
> 53662.75
>>>>
>
> Does anyone know what might be going on such that ds9 correctly reads
> the files and
> displays the nan values, while pyfits (or np) fails to do so?
>
> Cheers
> Tommy Grav
> +
> ----------------------------------------------------------------------------+
> Associate Researcher @ Dept. of Physics and Astronomy
> Johns Hopkins University
> +
> ----------------------------------------------------------------------------+
> tgrav@pha.jhu.edu
> (410) 516-7683
> http://web.mac.com/tgrav/Astronomy/Welcome.html
> +
> ----------------------------------------------------------------------------+
>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy@scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy



More information about the AstroPy mailing list