This programs can be used to reduce the noise of fringe patterns. (the method is explained in PASP 109, 338) ifrmap.f: It create a frame with information about the inclination of fringes. ifrmod.f: It can be used to filter the inclination map. ifrfil.f: It uss the inclination map to filter the fringe frame. sort.f, rwiraf.f and rwiraf.inc: files needed to compile the programs. Another version of this fortran code, that can read fits images, is available from http://www.fcaglp.unlp.edu.ar/~ostrov/ The method is discussed in PASP 109, 338. If you have any problem, contact me at ostrov@fcaglp.edu.ar Pablo G. Ostrov ------------------------------------------------------------------------------ FILTERING FRINGE FRAMES Installation: Copy the following files: ifrmap.f ifrmod.f ifrfil.f sort.f rwiraf.f rwiraf.inc The maximum size of the images that the program is capable to manage is defined in the include rwiraf.inc. The size is set to 1200*1200 pixels. If you need to process a larger image, or if you do not have enough memory to run the program, modify the sizes of the matrix IMA and IMAOUT in rwiraf.inc. To compile the programs, just type: fc ifrmap.f sort.f rwiraf.f -ofrmap.e fc ifrmod.f sort.f rwiraf.f -ofrmod.e fc ifrfil.f sort.f rwiraf.f -ofrfil.e How to filter fringe patterns: Let's suppose that you have made a fringe pattern following an usual procedure. 1) run frmap.e This program will make an image with the inclination of the fringes. The program will ask you the name of the fits file with your fringe pattern, and the name for the output inclination map image. Then the program will ask you "Window, Maxinc ...?". You must choose the window size and the number of inclination that the program will use in order to adjust the fringes. The window size does not have to be too larger (i.e., bigger than the curvature radius of the fringes). On the other hand, an exceedingly small window in a noisy fringe pattern will produce the program failure in the determination of the correct inclination of fringes in each point. The number of inclinations, Maxinc, must be chosen according with the window size. Use Maxinc ~ 1.5 * Window. I have rounded Maxinc to powers of two in all my tries. You must try different values for Window and Maxinc for your image, but remember that, with very big windows, the program will run very slowly and will not follow properly the curvature of fringes. I.e., if your fringe pattern is named frm.imh, you will have the following chat: Name of the fringe pattern ...? you enter: frm Leyendo la imagen a memoria ... Name for the inclination map ...? you enter: map Window, Maxinc ...? you enter: 11,16 The program will type the line of the image that is being processed, and finally it will write the inclination map to the disk. 2) Use the inclination map to filter the fringe pattern: run frfil.e This program will ask you the name of the previously made fringe map, and the name of your fringe pattern. Then, the program will ask you the size of the window and the number of inclinations. You can choose a window size different than that used in frmap, but MAXINC MUST BE THE SAME USED TO BUILD THE MAP. Following the example: Name of the map ...? you enter: map Leyendo la imagen a memoria ... Name of the fringe pattern ...? you enter: frm Leyendo la imagen a memoria ... Window and maxinc ...? you enter: 11,16 Name for the filtered fringe pattern ...? filtered Display the image filtered.fts. This would be a "reproduction" of your fringe pattern with the noise lowered. Try different values of Window and Maxinc in frmap.e until you are happy with the result. 3) frmod.e I wrote this program to filter the inclination map before using it to filter the fringe frame. As with frfil, you can change the size of the window but Maxinc must be the same used to build the inclination map. I have found that this optative intermediate step do not change meaningly the results. OTHER USES: If you do not have a fringe frame, you can attempt to use your own program frames to make one. You can subtract the stars (using DAOPHOT or similar codes) and then you can filter the subtracted image to obtain a fringe frame. This procedure can be repeated until you are happy. This program are is rudimentary because this was sufficient to my purposses. The inclination map contain information about the thickness gradient direction of the layer producing the fringes. Theoretically, it could be used (together with data about the fringes wide in each region of the frame) to model that layer and then to artificially generate fringe frames for any wavelength, but I did not do it.