desihub / specter

A toolkit for simulating multi-object spectrographs
Other
8 stars 7 forks source link

possible bug in specter extraction #16

Closed julienguy closed 8 years ago

julienguy commented 8 years ago

I am getting very wrong extracted spectra with specter with the following test.

1- generate a set of spectra to simulate

import numpy
import astropy.io.fits
flux=10000.*numpy.ones((2,(4400-4200)/0.05))
hdulist= astropy.io.fits.HDUList([astropy.io.fits.PrimaryHDU(flux)])
hdulist[0].header["CRVAL1"]=4200.
hdulist[0].header["CDELT1"]=0.05
hdulist[0].header["FLUXUNIT"]="photon" 
hdulist.writeto("simspec.fits",clobber=True)

2- simulate the image

specter --input simspec.fits --throughput $DESIMODEL/data/throughput/thru-b.fits --psf $DESIMODEL/data/specpsf/psf-b.fits --wavelength 4200,4400 --specrange 0,2 --noise --output image.fits

3- extract the spectra

exspec --input image.fits --psf $DESIMODEL/data/specpsf/psf-b.fits --wavelength 4200,4400,1. --bundlesize 2 --specrange 0,2 --regularize 0.0  --output outspec.fits
rncahn commented 8 years ago

Julien,

Where are you?? Is everyone ok at home?

Bob

On Sat, Nov 14, 2015 at 10:20 AM, julienguy notifications@github.com wrote:

Closed #16 https://github.com/desihub/specter/issues/16.

— Reply to this email directly or view it on GitHub https://github.com/desihub/specter/issues/16#event-464579640.