fil_ter - file filter, allows for operations on the phase or intensity arbitrarily.
The files include phase and intensity distributions may be produced with a SAO function itself. File_int , file_pha and file_pgm provide such a possibility. The dimensions of the exported and imported distributions must be the same (this can be fixed with interpol ), otherwise the behavior is not defined. Any (square) file (gif,tiff, bmp) containing graphics, can be converted into pgm format - for example using xv , and imported by fil_ter as the intensity or the phase distribution.
some examples(we suppose field_in=f):
fil_ter (f,"int","mult","aa"): filter through intensity mask from file aa.
fil_ter (f,"pha","subst","aa"): substitute the phase with phase taken from file aa
fil_ter (f,"pha","mult","aa"): filter the field through phase filter aa
fil_ter (f,"int","subst","aa"): substitute intensity with one taken from file aa
fil_ter (f,"int","subst","aa",1): substitute intensity with a normalized one taken from file aa
f1=begin(0.01,1e-6); f2=gauss(f1,0.004); file_int(f2,"file",-1,0,1); file_pgm(f2,"file",-1,2,0); f3=fil_ter(f1,"int","mult","file.txt"); f4=fil_ter(f3,"pha","subst","file.pgm"); field_plot(f4);
Chen jingyuan, Gan guangyong (IAPCM, Beijing,China.)
pip_fft ,