A Space & astronomy forum. SpaceBanter.com

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » SpaceBanter.com forum » Astronomy and Astrophysics » CCD Imaging
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

Valid Fits File



 
 
Thread Tools Display Modes
  #1  
Old May 16th 06, 06:16 PM posted to sci.astro.ccd-imaging
external usenet poster
 
Posts: n/a
Default Valid Fits File

Hi Friends,

I am completely new to these FITS files.Its quite confusing.Can any
one please help me.

I am looking for the code which creates a valid FITS file.The FITS
file should contain a valid header with header test data. The FITS file
should contain one valid image with a test pattern. This image should
be 128 pixels wide by 64 pixels high. Each pixel should be eight bits.
Pixel values in the first row should begin with 0 and increment by 1.
Pixel values in the second row should begin with 1 and increment by 1.
Pixel values in the third row should begin with 2 and increment by 1.
Etc.

Hope someone helps me out.

Thank you very much,

Regards
Kiran

Ads
  #2  
Old May 16th 06, 07:20 PM posted to sci.astro.ccd-imaging
external usenet poster
 
Posts: n/a
Default Valid Fits File

Kiran wrote:
I am looking for the code which creates a valid FITS file.The FITS
file should contain a valid header with header test data. The FITS file
should contain one valid image with a test pattern. This image should
be 128 pixels wide by 64 pixels high. Each pixel should be eight bits.
Pixel values in the first row should begin with 0 and increment by 1.
Pixel values in the second row should begin with 1 and increment by 1.
Pixel values in the third row should begin with 2 and increment by 1.
Etc.


Are you looking for existing code which will create such a file, or do
you want to write your own code using existing code as a guide? If the
latter, what language?

The byte-by-byte format of a FITS file isn't all that difficult to
understand. The length of the entire file is a multiple of 2880 bytes.
The simplest valid files will have a header, also a multiple of 2880
bytes, immediately followed by data, filled with nulls (00 hex or '\0')
at the end to make the data section also a multiple of 2880 bytes.

The header contains a multiple of 36 text lines, each line exactly 80
bytes (yes, 36 x 80 = 2880). Each line contains either
KEYWORD = VALUE
or
COMMENT whatever you want
or just blanks. The equals sign must be in column 9. There may also
be a slash and a comment after the value. The first keyword has to be
SIMPLE = T
After that will come keywords to define the data geometry: 2 dimensions,
128 wide, 64 high, 8 bits per pixel.
NAXIS = 2
NAXIS1 = 128
NAXIS2 = 64
BITPIX = 8

See http://fits.gsfc.nasa.gov/ for more. After that,
END
followed by blank lines to pad it out to 2880 bytes, then the data.

You'll have to make the data array yourself.

-- Bill Owen
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Valid Fits File Kiran CCD Imaging 2 May 17th 06 01:47 AM
Free Commodities Are Abused Len Policy 46 December 5th 05 05:21 AM
NASA PDF documents available online for free download Rusty History 18 October 23rd 05 02:52 PM
FITS long integer support (was [fitsbits] ADASS FITS BoFon Sunday) William Pence FITS 6 October 22nd 04 08:23 PM


All times are GMT +1. The time now is 04:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 SpaceBanter.com.
The comments are property of their posters.