quick syntax question: scopy and FITS extensions
Paula R. T. Coelho wrote on Jan 15, 2007
hello,
i have some FITS files that contain many image extensions, each of them a multispec spectrum. i want to extract, say, aperture 4 from all extensions into onedspec format. i tried things like:
scopy chab.all.coelho.ised.fits test aperture=4 format=onedspec
in an attempt to say "extract for all image extensions you find" but it doesn't work ("Warning: FXF: must specify which FITS extension"). what would be the proper syntax?
thx a lot
paula </div> --- **Mike Fitzpatrick** wrote on Jan 15, 2007
i have some FITS files that contain many image extensions, each of them a multispec spectrum. i want to extract, say, aperture 4 from all extensions into onedspec format. i tried things like:
scopy chab.all.coelho.ised.fits
in an attempt to say "extract for all image extensions you find" but it doesn't work ("Warning: FXF: must specify which FITS extension"). what would be the proper syntax?
thx a lot
paula </div> --- **Mike Fitzpatrick** wrote on Jan 15, 2007
Hi Paula,
SCOPY doesn't know about MEF files, so what you need to do is somehow just pass it the name of a single multispec image. You can do this by specifying the extension number explicitly within a loop, or if you have the FITSUTIL package installed the FXSPLIT task can break an MEF into the component single FITS files.
In the first case, something like
should loop over extensions 1-9 in the image. Note the use of the // operator in constructing the filenames. For FXSPLIT you would end up with a bunch of new images and could pass these in with a wildcard template or as an @-file. Hope this helps.
Cheers,
-Mike
---
**Paula R. T. Coelho** wrote on Jan 15, 2007
SCOPY doesn't know about MEF files, so what you need to do is somehow just pass it the name of a single multispec image. You can do this by specifying the extension number explicitly within a loop, or if you have the FITSUTIL package installed the FXSPLIT task can break an MEF into the component single FITS files.
In the first case, something like
for (i=1; i < 10; i=i+1) {
scopy ("chab.all.coelho.ised.fits[" // i // "]", "test"//i, aper=4, format="onedspec")
}
should loop over extensions 1-9 in the image. Note the use of the // operator in constructing the filenames. For FXSPLIT you would end up with a bunch of new images and could pass these in with a wildcard template or as an @-file. Hope this helps.
Cheers,
-Mike
It helped a lot Mike. Thanks a lot !
---
*Last post on Jan 15, 2007*