On Wed, Jan 11, 2006 at 11:55:28PM +0200, Teemu Ikonen wrote:
> I could not reproduce this bug with the image at
> http://justinpryzby.com/astro/m27.00000001.Dumbbell_Nebula.FIT
> 
> This FITS file loads fine, but is shown as all zeros. Thus, the
> support for FITS is broken, but don't see any crashes, string
> corruption or such. Could you check if you can repeat the behaviour
> mentioned in the original bug report with the latest version of
> imview, 1.1.8-3?
I can't, but I suspect that the original bug still exists.

When I select the .FIT file to open, versions 1.1.8-1 and 1.1.8-2 both
pop up a box about "select the offsets, pixel type, endianness, etc.".
But 1.1.8-3 has no such thing.  FITS support is certainly broken,
since it seems to think that pixels are 1 byte each, but they are not.

Can you explain why the debian revisions act differently?

Image/Information/Path_to_Image seems corrupted in 1.1.8-3, anyway.

And valgrind still indicates some invalid read, after selecting
File/Open, but before selecting any file, among other warnings.

> If there's a GPL compatible C or C++ library for reading FITS-files,
> please let me know, I might add support for them at some point.
Reading 1,2, or 3-D FITS files should be pretty easy.  Though there
are some variants, I have never seen them.  You can google for the
fits definition document; the header is n 80-character ascii "cards",
which must begin with SIMPLE, BITPIX, NAXIS, NAXIS[n]... in that
order.  There are no newlines; use spaces as header filler, and NULL
as data filler.  All fits sections are multiples of 2880 bytes.  The
header is terminated by a line matching m/END {77}/.

Dimensions are given by NAXIS1,2, or 3; pixel size in bits is given by
BITPIX=8,16,32,-32,-64 and ("experimental") 64.  Data is MSB and
signed (except for BITPIX=8 I think which can be unsigned, but always
has the high bit clear..).  You'll also want to read the BZERO and
BSCALE values, as well as possibly other reserved keywords, such as
BLANK.

The canonical library to access fits files is cfitsio, which is
already packaged (though I don't have any experience using it).

It is a GPL-compatible public domain work of the US Gov't, with a bit
of GPL gzip included.

-- 
Clear skies,
Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to