helplog.19: spectra, convolution, multispec, 3D
Frank Valdes wrote on Feb 04, 2005
NUMBER: 19
KEYWORDS: spectra, convolution, multispec, 3D
DATE: Fri Feb 4 13:02:22 MST 2005
FROM: valdes
Q: I have a set of multispec FITS that I need to convolve (gauss,
boxcar, ...). Each multispec FITS has 3 spectrum with the same
dispersion and all of them need to be convolved. The gauss or
boxcar tasks complain about the higher dimensions. Is there a way
to convolve the multispec without having to extract each aperture,
convolve, and them combining them again?
A: The BOXCAR, GAUSS, ..., tasks will work on 1D and 2D data. If you
have multiple apertures in the multipec format, that is more than
one line, then you would set the convolution size in y to 1. Now
if you have the third dimension, the "extras" information from
APALL, then you do have to do something because the tasks are not
designed for 3D data. You can do things fairly easily as follows.
Let me assume you have multispec data which is [*,3,4]. There are
some number of wavelength points along the first dimension which
you want to convolve, there are 3 spectra, and each spectrum has
the primary spectrum and 3 associated spectra. Note whether it
makes sense to convolve the sigma spectrum I won't address. For
this example suppose you want to do a boxcar convolution of 5
pixels.
cl> boxcar spec.ms[*,*,1] band1 5 1
cl> boxcar spec.ms[*,*,2] band2 5 1
...
cl> imstack band1.band2,band3,band4 newspec.ms
You could also do this with a loop:
cl> for (i=1; i<=4; i+=1)
>>> boxcar ("spec.ms[*,*,"//i//"]", "band"//i, 5, 1)
cl> imstack band1.band2,band3,band4 newspec.ms
In summary, you want to use image sections to select bands of the
3D multispec file and use IMSTACK to rebuild the 3D multispec
format.
Last post on Feb 04, 2005