SCOMBINE: combining multispec spectra with bands
Frank Valdes wrote on Feb 18, 1998
Q: I would like to combine multiple exposures of an object that I have extracted and are in multispec format. I have perused the various combining scripts (scombine, imcombine, gcombine, imarith, imcalc, etc) and haven't sorted out which will perform the task I would like for it too. That is, combining two or more 1-D spectra in multispec format where the output is in multispec format. The catch is I want the flux arrays (1 and 2) to be averaged weighted by the exposure time, the exptime parameter should be updated appropriately, and finally, the sigma arrays should be propogated appropriately. I would appreciate it if you could point me in the right direction. A: The proper combining task to use is SCOMBINE. You can set "scale=exposure" to scale by the exposure time. The final exposure time will be set consistently for the final combined image. However SCOMBINE will only work on the first "band" of data. You can combine the second band using image sections. For example: cl> scombine spec1.ms,spec2.ms band1 scale=exposure cl> scombine spec1.ms[*,*,2],spec2.ms[*,*,2] band2 scale=exposure The spectroscopy software currently doesn't really know about uncertainties. So SCOMBINE does not combine the uncertainties in quadrature. So if you want to combine the uncertainties you will have to do all the arithmetic by hand using image sections. SARITH can do this. If after combining things you want to stack everything back as a single multispec file you need to do this with IMSTACK. If the individual bands are 2D (that is they have more than one spectrum) then you can stack the bands directly. If they are 1D then you have to do a dummy stack to make the 2D before stacking them to make a 3D image. An example of this is: cl> imstack band1 band1a # band1[N] -> band1a[N,1] cl> imstack band2 band2a cl> imstack band3 band3a cl> imstack band1a,band2a,band3a final.ms # -> final.ms[N,1,3] I'm sorry things are not easier. The question of combining these multiband data with SCOMBINE and doing the uncertainty error propagation correctly needs to be worked on in the future.
Last post on Feb 18, 1998