Welcome to iraf.net Friday, May 10 2024 @ 11:46 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 apflatten problems
   
tsergori
 08/14/2007 05:52AM (Read 3383 times)  
+----
Newbie

Status: offline


Registered: 08/13/2007
Posts: 3
Hi IRAF gurusI am trying to use apflatten (imred.ccdred.echelle) to produce a normalised flat field for echelle spectra. The CCD has 20 or so "glitches". Two are shown in the image below. These glitches have fewer counts than the surrounding pixels. They are not strictly dead pixels, so I have no masked them out and hope that flatfielding can "fix" them.[img:4833e0ffc2]http://www.mso.anu.edu.au/~yong/IRAF/ds9.jpg[/img:4833e0ffc2]In apflatten, having defined and traced the orders, I then "Flatten spectra" and "Fit normalization spectra interactively". When I get to an order that contains a "glitch", I would expect to find something resembling an absorption feature (since the glitch consists of pixels with fewer counts relative to their neighbours) as shown below (near pixel 1100). The image below was generated by extracting the relevant order using apall. [img:4833e0ffc2]http://www.mso.anu.edu.au/~yong/IRAF/sgi14200.jpg[/img:4833e0ffc2]Instead, apflatten shows me the image below where the pixels adjacent to the "absorption feature" appear artificially raised.[img:4833e0ffc2]http://www.mso.anu.edu.au/~yong/IRAF/sgi31301.jpg[/img:4833e0ffc2]When I divide the above flat field into a science frame, the resulting image obviously also contains the "now magnified glitch", see image below of a hot rapidly rotating star. (The feature near 3100 pixels is a genuine absorption line.)[img:4833e0ffc2]http://www.mso.anu.edu.au/~yong/IRAF/sgi14404.jpg[/img:4833e0ffc2]It seems to me that apflatten is introducing extra counts that don't really exist. In doing so, it has taken a small problem (~10 pixels) and made it into a much larger one (~200 pixels). And there are around 20 such glitches on the CCD.Is there anything obvious I need to change in the apflatten parameter file? (My parameter file is appended at the end of this post.) I have played around with various parameters without success. I have also re-made IRAF with the default parameters, again without success.Thanks in advance for any tips and/or suggestions.CheersDaveechelle> lpar apflatten
input = "Flat" List of images to flatten
output = "Flatnorm" List of output flatten images
(apertures = "") Apertures
(references = " ") List of reference images\n
(interactive = yes) Run task interactively?
(find = yes) Find apertures?
(recenter = yes) Recenter apertures?
(resize = yes) Resize apertures?
(edit = yes) Edit apertures?
(trace = yes) Trace apertures?
(fittrace = yes) Fit traced points interactively?
(flatten = yes) Flatten spectra?
(fitspec = yes) Fit normalization spectra interactively?\n
(line = INDEF) Dispersion line
(nsum = -10) Number of dispersion lines to sum or median
(threshold = 10.) Threshold for flattening spectra\n
(pfit = "fit1d") Profile fitting type (fit1d|fit2d)
(clean = no) Detect and replace bad pixels?
(saturation = INDEF) Saturation level
(readnoise = "ENOISE") Read out noise sigma (photons)
(gain = "EGAIN") Photon gain (photons/data number)
(lsigma = 5.) Lower rejection threshold
(usigma = 5.) Upper rejection threshold\n
(function = "spline3") Fitting function for normalization spectra
(order = 4) Fitting function order
(sample = "*") Sample regions
(naverage = -1) Average or median
(niterate = 5) Number of rejection iterations
(low_reject = 2.) Lower rejection sigma
(high_reject = 3.) High upper rejection sigma
(grow = 0.) Rejection growing radius
(mode = "ql")

 
Profile Email
 Quote
valdes
 08/14/2007 05:52AM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Hello Dave,Thank you for the clear information and example. I'm afraid the way apflatten works it is not possible to "model" the low spots away. Apflatten is trying to divide by a model of the orders. The model assumes the profile shape is constant or slowly varying. The model is generated by dividing each column by the sum across the column, which equivalently means that it is dividing by the same simple extracted spectrum at all points across the profile. This produces a normalized profile spectrum. Then the profile spectrum is smoothed by fitting low order functions parallel to the orders. This low order smoothing is to minimize the effects of noise and to allow "slow" variations in the shape.What you have is, effectively, a change in the profile over a small number of pixels. The "ringing" behavior you see is due to the low order smoothing which does not follow the teardrop shapes well.What you may have to do is use the flat field data directly, that is divide pixel by pixel. Because the orders are relatively broad this should work fairly well though there may be some problems at the edges. Sometimes the flat field slit is wider than the science slit in which case directly dividing should be perfectly fine. If you really need to worry about flat fielding at the edges of the slit where the flat field (and science data) signal level drops and you have problems of dividing small numbers by small numbers then you will have to work hard and come up with a creative solution. What you do will depend on the science being done and the nature of the object profiles.You might wonder about apnormalize. This could be used to remove the shape of the flat field spectrum along the orders so that when you divide you don't introduce the inverse of the flat field shape. It should not have the problem of apflatten because it does not attempt to fit and remove the slit profile.I hope this helps and I'm sorry your problem will be a challenge.Yours,
Frank ValdesBTW, the smoothing order along the profile is set by the order of the tracing. A low order trace uses a low order smoothing function. So you could use a higher order tracing function for the apertures. However, I think you would still have undersirable artifacts. You could also try using the "pfit2d" setting for the "pfit" parameter to try a different profile modeling method. This is a more finicky algorithm and I don't know how well it would work.

 
Profile Email
 Quote
   
Content generated in: 0.07 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login