Posted: Mon Apr 28, 2008 11:26 pm Post subject: rmfringe,irmfringe
I'm having problems removing fringes from my images. I have done all the standard procedures, including removing the background on scales larger than the fringes and masking out the objects. I made a fringe flat from a large number of images (60), and it looks decent (the mean is also about zero). When I then try to de-fringe those same images using rmfringe, it doesn't seem to work for more than a third of them. Yet if I pick a value by which to scale the fringe image and subtract it, I can manually make the fringes disappear. I don't quite understand why rmfringe is not finding this scale value. For example, sometimes I find an adequate fringe subtraction with 0.6 times the fringe template, but rmfringe finds 1.2. So it subtracts double the necessary amplitude, leaving all the fringes there (but now they're negative).
I can send output if that might help indicate what is happening. One other possible clue is that I get the best results (i.e., fringes removed from the most images) when I set ncblk and nlblk to 1 (i.e., NO smoothing). Any smoothing makes the results even less reliable. I don't know if this indicates something about the noise sources in my images.
I also tried to use irmfringe to do this interactively, but that doesn't seem to work either. When I put in the image to fringe subtract, the output, and the fringe image (FringeI2.fits), it says "ERROR: Can't access template image (FringeI2.fits)" even though the fringe image is right there in the directory. Do I have to do something special to make it recognizable as a fringe template?
There is no help file available for this..
This type of operation is often a challenge because the pattern is faint. I can't really say why it fails. In my experience the main reason it fails is that there is something in the template that significantly deviant such as a cosmic ray or bad pixel. What I found improved things for this situation was to use imreplace to replace all values above some value by that maximum and the same for the minimum so that there are no values that are out of the range of the pattern.
There is nothing used that identifies a template as such. So I don't know why you are getting the error. Actually, looking at the code it is expecting to be able to access:
This script may be out of date in that it looks like it depends on it being a multiextension file even if you are trying to use it with plain images. MSCRED was developed from MEF files and then later many tasks were generalized so they would work equally well with single images (under the model that a single image is just a special case of a mosaic).
You could make a copy of the code and modify it or turn your template into an MEF) with
imcopy FringeI2 MEFFringeI2[im1]
The explicit extension name in the output of the copy tells IRAF to create an MEF with a minimal primary header and then the extension.
Excellent, irmfringe stops gagging when I feed it MEFs. I haven't tried to make rmfringe work with the a template that's been cleaned by imreplace (don't really see anything odd that needs replacing), but this is at least better than manually scaling the fringe template and subtracting it (I have ~550 images to de-fringe)!
Which IRAF package offers commands rmfringe etc? Obsevations in NIR region with our observatory's spectrograph are also severely affected by fringes. Trial and error approach to remove fringes using rapidly rotating O-stars I have used so far is very, very time consuming process..
I'm back... and I identified another possible issue with defringing that I thought I'd share in case anyone else has trouble removing fringes from image data!
It turns out that not only must one mask out deviant regions in the science image (e.g., bad pixels, stars, saturation effects), but it is also important to have a very clean fringe image itself. Usually if you background subtract and median combine enough dark sky images, you should get a reasonable representation of the fringe pattern. But it turns out that it is also sometimes necessary to reduce background noise in the fringe image itself. Otherwise, the computation of the fringe amplitude by the rmfringe task is slightly erroneous (because it is designed to minimize the spread in flux values of the final image- regardless of where that spread comes from). Hence the amplitude comes out a bit wrong and fringes will not be subtracted out very well.
I have found that this problem is easily corrected by smoothing the fringe image prior to computation of the amplitudes and subtraction via rmfringe. Obviously one should choose a smoothing box size that is smaller than the size of the fringes themselves.
Hi, thanks very much for your post about rmfringe. I'm using this too. I encounterd the problem of scale factor too.So according your poster I should smooth the fringe map before using rmfringe.Do you know any task that can be used to smooth the fringe map. In fact I just begin to use IRAF not long before ,if I have asked a very simple question ,Please don't laugh at me:)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum