[fitsbits] conversion to fits

William Pence pence at tetra.gsfc.nasa.gov
Wed Aug 2 10:51:26 EDT 2000


Habib, here are some general suggestions regarding your FITS data conversion
program:

- look at the cookbook.c program that is distributed with CFITSIO for some
simple examples of reading and writing FITS images and tables using CFITSIO.

- when using CFITSIO, you are correct that "fitsio.h" must be included in
your source code.  You must then link the compiled C code with the CFITSIO
library itself.  The pre-compiled CFITSIO .dll libraries for Visual C++ or
Borland C++ are available from the CFITSIO download page at 
http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio_release.html
Basic instructions for using these dll libraries are included in the .zip
download files.

- CFITISO will automatically perform the byteswapping if it is needed on a
particular platform, so application programs generally do not need to do any
byte swapping.

- for more information about the FITS format, refer to the the FITS Standard
at http://archive.stsci.edu/fits/fits_standard/

- finally, for your simple type of binary file, it is possible that someone
has already written a FITS format converter.  You may want to look at 
 http://www.wizards.dupont.com/cristy/ImageMagick.html
 http://www.gimp.org/
 http://www.acme.com/software/pbmplus/ 
I have not personally used any of these, so do not know if they are suitable
for your application.

good luck,
Bill Pence


"Motallebi, Habib" wrote:
> 
> I am trying to write a C program that for  windows 95 visual C++.
> This little converison program is going ot be used on windows 95
> environment. I have several ways of doing this in unix env. My main
> concern is windows 95 env. and that is where i am a beginner. I never
> wrote anything in windows env. Never worked visual c++ or Borland which
> we do not have....
> So, if i write a C program, all i have to do is in to put the inlcude file
> "fitsio.h" on the top of my program, right?.  Then i have to use the visual
> c++ to link all the source codes that are in the "fitsio.h" in my source
> code.
> Again are just a standard binary with two byte two integer in the beginning
> for the width and height. I think i have to do byte swapping.

____________________________________________________________________
Dr. William Pence                          pence at tetra.gsfc.nasa.gov
NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
Greenbelt MD 20771                         +1-301-286-1684 (fax)



More information about the fitsbits mailing list