Hi Charly,Thank you for the information. The extra planes are actually created by apall because you set the "weights" parameter to "variance". If you look in the header of the science extensions you should see some keywords like:[code:1:e58cc380c1]cl> imhead input.fits[SCI,1] l+
...
BANDID1 = 'spectrum - background none, weights variance, clean yes'
BANDID2 = 'raw - background none, weights none, clean no'
BANDID3 = 'sigma - background none, weights variance, clean yes'
...
[/code:1:e58cc380c1]These keywords tell you what each plane in each science extension means. So, the first plane in the first science extension [SCI,1] (i.e., 3108x1x1) contains your extracted spectrum that has been cleaned and weighted by the variance. The second plane in the first science extension (i.e., 3108x1x2) contains the raw extracted spectrum that hasn't been cleaned or weighted by the variance. The third plane in the first science extension (i.e., 3108x1x3) contains the sigma. You can view each of these spectra by using:[code:1:e58cc380c1]cl> splot input.fits[SCI,1][*,*,1]
cl> splot input.fits[SCI,1][*,*,2]
cl> splot input.fits[SCI,1][*,*,3]
[/code:1:e58cc380c1]You can read more about apall and weighted extractions by looking at the following help files:[code:1:e58cc380c1]cl> help apall
cl> help apsum
cl> help apvariance
[/code:1:e58cc380c1]If you decide that you don't want to do a weighted extraction, you will need to set the "weights" parameter to "none" and the "clean" parameter to "no" (since if the "clean" parameter is set to "yes", the "weights" parameter is set to "variance" automatically). If you do this, your output will contain a one dimensional spectrum for each slit provided to the task as expected.I hope that helps. Please let me know if you have any more questions.Many thanks,Emma