views:

141

answers:

4

I need to change a few values in a couple of FITs image headers to fit with some test data I have. Therefore I'm trying to hack a FITs image header at the minute to run with the application.

However at the minute - I can't even see the header, never mind hack it. I run Ubuntu.

Can anyone advise some software to view the FITs - perhaps even hack it?

A: 

Is this the Flexible Image Transport System format used by Astronomers?

This site has some background information and further links, but explains that

Users must develop or obtain separate software to read and display the data from the FITS file. There are a number of different packages for particular applications and hardware, but there is no single standard package for all applications.

Still, you can use it for your own purposes.

pavium
Yes, it is used by Astronomers.
day_trader
A: 

The Sloan Digital Sky Survey developer web site has some libraries that should meet your needs.

FitsLib - A library for reading and manipulating FITS files on the Microsoft's .Net platform. FITS stands for flexible image transport system. FitsLib aims to provide an interface to the FITS file on the Dot Net Platform. It is built as an object oriented wrapper around the CFITSIO library's interface to the FITS files.

While FitsLib itself is designed for C# and the .NET Framework, you might be able to use it under Mono on your Ubuntu system. Or, perhaps you can use the CFITSIO library directly, which is written in C.

Tim Long
+1  A: 

edhead seems to do the job very well. Only piece of software I have found that allows you to edit the header at the command line.

day_trader
A: 

As only 1/2 of the question was answered (editing the FITS headers), to view the images, I commonly use DS9 (aka SAOImage).

Also, if you're going to be editing a lot of FITS headers, I tend to go with either CFITSIO or Astro::FITS::Header

... and it's possible to edit FITS headers with any text editor, so long as you follow a few simple rules -- cards (key/value/comment sets) are always 80 characters long, and the FITS header is always a multiple of 2880 bytes. Depending on the file, there might be multiple headers, as the first header could declare the file to contain multiple images or tables.

Joe