diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-09-14 20:07:46 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-09-14 20:07:46 -0400 |
commit | fe56b83a7ab9ca84dc6c1c6a8babb6e78bae9b3a (patch) | |
tree | 20cf2679225fecba8218f48c2704ccbbd73d67d8 | |
parent | 594364e4f94f0b4d57d4e5dc14d69c9d1fb00d4c (diff) | |
download | beam_profiler-fe56b83a7ab9ca84dc6c1c6a8babb6e78bae9b3a.tar.gz beam_profiler-fe56b83a7ab9ca84dc6c1c6a8babb6e78bae9b3a.zip |
simplify logic of the program with only on if
-rw-r--r-- | stripeeraser.m | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/stripeeraser.m b/stripeeraser.m index 417f333..cd34d50 100644 --- a/stripeeraser.m +++ b/stripeeraser.m @@ -13,15 +13,12 @@ max1=max(abs(img_fourier(:))); for x=1:Nx for y=1:Ny d=sqrt((x-Nx/2)^2+(y-Ny/2)^2); - if d>radius - % for high enough frequency components - %The filter works like a neutral density filter. - if abs(img_fourier(y,x))>max1*(10^(-threshold_power)); - % Suppress this frequency components which are mostly stripes - % but leave untouched small sharp features of the beam - % since they are spectrally weak - img_fourier(y,x)=img_fourier(y,x)*exp(-(d/radius)^2); - end; + if d>radius && abs(img_fourier(y,x))>max1*(10^(-threshold_power)) + % For high enough frequency components + % suppress this frequency components which are mostly stripes. + % But leave untouched small sharp features of the beam + % since they are spectrally weak + img_fourier(y,x)=img_fourier(y,x)*exp(-(d/radius)^2); end; end; end; |