reading slices of FITS files [message #63708] |
Tue, 18 November 2008 07:30 |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
Maybe someone with better knowledge of the miriad of FITS-related
routines has some experience in this...
I have an extremely large FITS data cube, and I only want to read in a
single slice in the first or second dimension. I.e. I want something
that is functionally equivalent to:
dataslice = (readfits(filename))[xslice,*,*]
but faster. READFITS does have a handy NSLICE keyword, but as far as I
can tell it will only give a slice in the final dimension. I imagine
that it's implemented that way because only slices in the final
dimension are stored contiguously in the file, but it should certainly
be possible to extract slices in other dimensions more efficiently
than reading in the entire file. Maybe one of the 15 other FITS
reading procedures does what I want? ;-)
-Jeremy.
|
|
|