Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

rmfringe,irmfringe

 
Post new topic   Reply to topic    iraf.net Forum Index -> Applications
View previous topic :: View next topic  
Author Message
cody



Joined: 26 Feb 2008
Posts: 12

PostPosted: Mon Apr 28, 2008 11:26 pm    Post subject: rmfringe,irmfringe Reply with quote

Hi,
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..

thanks,
Ann Marie
Back to top
View user's profile Send private message
valdes
IRAF Guru


Joined: 11 Nov 2005
Posts: 677

PostPosted: Tue Apr 29, 2008 5:33 pm    Post subject: Reply with quote

Hi,

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:

Code:

= imaccess("FringeI2.fits[1]")


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

Code:

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.

Yours,
Frank Valdes
Back to top
View user's profile Send private message
cody



Joined: 26 Feb 2008
Posts: 12

PostPosted: Tue Apr 29, 2008 10:54 pm    Post subject: Reply with quote

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)!

--Ann Marie
Back to top
View user's profile Send private message
tonisee



Joined: 14 May 2008
Posts: 4

PostPosted: Fri Jun 06, 2008 12:35 pm    Post subject: Reply with quote

Hello!

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..

Tõnis
Back to top
View user's profile Send private message Send e-mail
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Tue Jun 10, 2008 2:50 pm    Post subject: Reply with quote

[I]RMFRINGE is in the MSCRED external package (see the downloads area if you haven't installed it yet). You can read the help page by typing the task name into the text box in the banner above.

-Mike
Back to top
View user's profile Send private message
cody



Joined: 26 Feb 2008
Posts: 12

PostPosted: Mon Jan 24, 2011 6:24 pm    Post subject: Reply with quote

Hello,
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.

Ann Marie
Back to top
View user's profile Send private message
gail



Joined: 05 Jul 2011
Posts: 1

PostPosted: Tue Jul 05, 2011 10:21 pm    Post subject: Reply with quote

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:)
Youfen Wang
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Applications All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.24 seconds