Author: Austin Duncan Purpose: give a discription of the readheader function that can read fits data files Date: 10/17/03 Requirements: The cfitsio library is included. The routine is called readheader, which should be changed when a final version of the routine is completed. I took the code that was in cookbook.f, which was an example program that came with the cfitsio library, and I modified it. The modified routine is called in the following way: readheader(infile,mode,ic,id,jd,quat,frame) The routine is meant to mimic Aaron Smith's read_frame_new routine, so that his star-mapping program could be easily modified to read fits files. The parameters do the following: infile => the fits data file to be read mode, ic, id, jd => integer *4 that will be filled with data quat => real *8, will be an array of length four to hold quaternin values frame => integer, holds the image's data readheader's flow is the following: 1) Open a file handle 2) Search the fits header for the number of pixels, the camera number, the mode, and the quaternines. 3) The image is then read into an array 4) Close the file handle readheader calls the following routines from the cfitsio library: # File handle routines call ftgiou(unit,status) call ftopen(unit,infile,readwrite,blocksize,status) call ftclos(unit, status) call ftfiou(unit, status) # Header routines (searches fits header for a name, variable set to value call ftgknj(unit,'NAXIS',1,2,naxes,nfound,status) call ftgkyj(unit,'CAMERA',ic,comment,status) call ftgkyj(unit,'MODE',mode,comment,status) call ftgknd(unit,'QUAT_',1,4,quat,nfound,status) # Reads the data image call ftgpvj(unit,group,firstpix,nbuffer,nullval, & frame(firstpix),anynull,status) # NOTES 1) The routine compiles with f77 and ifc. 2) A typical compiling call would be: icf -o test austinTest.f test.f -lm -L$CFISTIO_LOCATION -lcfitsio