FILTERING FRINGE FRAMES

For a complete explanation of the method see A Method to filter fringe patterns in CCD images (Ostrov, P.G., 1997), Publ. of the Astronomical Soc. of the Pacific 109, 338-340.

Downlad a gzipped TAR file with FORTRAN codes to filter fringe patterns

Example frames (340K)

Installation:

Copy the following files:

frmap.f

frmod.f

frfil.f

sort.f

rwfits.f

rwfits.inc

The maximum size of the images that the program is capable to manage is defined in the include rwfits.inc. The default maximum 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 rwfits.inc.

To compile the programs, just type:

f77 frmap.f quick.f rwfits.f -ofrmap.e

f77 frmod.f quick.f rwfits.f -ofrmod.e

f77 frfil.f quick.f rwfits.f -ofrfil.e

(in Linux, g77 -fno-globals frmap.f quick.f rwfits.f -ofrmap.e, etc)

I have tested the programs at an HP 9000 workstation and at an AT 486 PC. If the fortran that you use needs to do byte swapping when reading and writing the images (as the Salford fortran does), see the routines SWAP2 and SWAP4 in the file rwfits.f.

How to filter fringe patterns:

Let's suppose that you have made a fringe pattern following the usual procedure.

Unfiltered Fringe Pattern.

1) write in fits format the fringe pattern that you like to filter.

2) 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.fts, you will have the following chat:

Name of the fringe pattern ...?
you enter: frm.fts
Leyendo la imagen a memoria ...
Name for the inclination map ...?
you enter: map.fts
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.

Inclination Map.

3) 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.fts
Leyendo la imagen a memoria ...
Name of the fringe pattern ...?
you enter: frm.fts
Leyendo la imagen a memoria ...
Window and maxinc ...?
you enter: 11,16
Name for the filtered fringe pattern ...?
you enter: filtered.fts

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.

Filtered Fringe Pattern.

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






Read my Science Popularization Articles about the Big Bang Theory , Relativity Theory , Black Holes and the Search for Extraterrestrial Intelligence


eXTReMe Tracker