[fitsbits] extracting a 2D plane from a 3D FITS image

Douglas Alan doug at alum.mit.edu
Fri Feb 9 15:17:59 EST 2007


Hi.  Is there a way using the cfitsio "extended file name syntax" to
extract a 2D plane from a 3D FITS image?  I see how I can do other
sorts of slicing, like extracting a cube from the center of a larger
cube.  For instance, I might do something like:

   file.fits[20:50, 10:40, 15:55]

to end up with a cropping of the original cube.  I also know that I
can do something like

   file.fits[*, *, 23:23]

which will result in a one voxel thick 3D FITS cube, which is almost a
2D image.  But I realy want to get rid of that third dimension
altogether, not end up with a very thin third dimension.

Also, I want to do this using the cfitsio extended file name syntax --
not a separate program.

Thanks!
|>oug



More information about the fitsbits mailing list