The S-Lang CFITSIO Module Page
The CFITSIO library consists of a set of functions for reading and writing FITS files. The S-Lang CFITSIO module wraps many of the functions of the CFITSIO library and permits one to easily manipulate FITS files from the S-Lang interpreter.
The module consists of a high-level interface and a low-level one.
The high-level interface makes use of the low-level functions to
perform common tasks. For example, consider the job of binning the
infile = "evt2.fits[EVENTS]"; outfile = "img.fits"; (y,x) = fits_read_col (infile, "Y", "X"); wcs = fitswcs_get_column_wcs (infile, ["Y","X"]); xgrid = [0:8192:8]; ygrid = [0:8192:8]; img = hist2d (y,x,ygrid,xgrid); fits_write_image_hdu (outfile, NULL, img); wcs = fitswcs_rebin_wcs (wcs, ygrid, xgrid); fitswcs_write_img_wcs (outfile, wcs);
This page was last updated Apr 26, 2007 by John E. Davis. To comment on it or the material presented here, send email to davis at space mit edu.