View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

I have some problem with response task

Guest wrote on Jun 30, 2006

Hello,

I have some problem with response task.

I set parameters for response:

PACKAGE = longslit
TASK = response

calibrat= FlatS.fits Longslit calibration images
normaliz= FlatS.fits Normalization spectrum images
response= nFlatS.fits Response function images
(interac= yes) Fit normalization spectrum interactively?
(thresho= INDEF) Response threshold
(sample = *) Sample of points to use in fit
(naverag= 1) Number of points in sample averaging
(functio= spline3) Fitting function
(order = 6) Order of fitting function
(low_rej= 3.) Low rejection in sigma of fit
(high_re= 3.) High rejection in sigma of fit
(niterat= 1) Number of rejection iterations
(grow = 0.) Rejection growing radius
(graphic= stdgraph) Graphics output device
(cursor = ) Graphics cursor input
(mode = ql)

The input calibration image FlatS.fits have such statistics:

lo> imstat FlatS.fits
# IMAGE NPIX MEAN STDDEV MIN MAX
FlatS.fits 2095100 1586. 2294. 1. 9448.

It is shown that min count level is 1 for FlatS.fits and so min count
level is such as it is needed for flat field image.

Then I run response. I get the output image nFlatS.fits. The output image
nFlatS.fits have such statistics:

lo> imstat nFlatS.fits
# IMAGE NPIX MEAN STDDEV MIN MAX
nFlatS.fits 2095100 0.6434 3.051 -34.6 235.9

It is shown that min count level is -34.6 but it is not right for flat
field image.

Why it is happened ? And how can I correct this mistake ?

thanks for your attention and sorry for my bad english.

****************************************************************************

Andrey Danilenko, student of Sait-Petesburg State Politechnical University

e-mail: danila@astro.ioffe.ru

****************************************************************************

Post generated using Mail2Forum (http://www.mail2forum.com)

Francisco Valdes wrote on Jun 30, 2006

Hello,

The response task "extracts" a spectrum from the image (by collapsing across the dispersion) and fits a 1D function. This function is then divided into each column or line of the image. If the fitted function has negative values then the result will have negative values. The way the fitted function can have negative values, even if the data has only positive values, is if the function has "wiggles" that go negative because part of the input data has very low values; that is values near 1. That seems to be the case in your data. The only solution is to lower the fitting order or adjust things so the fit does not go negative or to simply use IMREPLACE to replace the negative result value by some other value such as "0.1". The "threshold" parameter is intended to help you with this. If you set the threshold to something like 1 or 10 then the result will not have negative values. Note that any place where the fitting function or the data are below the threshold value the output value will 1.

Yours,
Frank Valdes

Last post on Jun 30, 2006