diff options
| author | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
| commit | 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (patch) | |
| tree | fbfdfe6bcb0a8a114be2480dac53d88c977e4869 /lib/blanker.f90 | |
| parent | 4320ce238aae1fe87fc9f379cdd816e9317885fa (diff) | |
New upstream version 2.7.0~rc8+repackupstream/2.7.0_rc8+repack
Diffstat (limited to 'lib/blanker.f90')
| -rwxr-xr-x | lib/blanker.f90 | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/lib/blanker.f90 b/lib/blanker.f90 index 8e4527ce..fe43931b 100755 --- a/lib/blanker.f90 +++ b/lib/blanker.f90 @@ -1,52 +1,52 @@ -subroutine blanker(iwave,nz,ndropmax,npct,c_bigfft)
-
- integer*2 iwave(nz)
- complex c_bigfft(0:nz/2)
- integer hist(0:32768)
- real fblank !Fraction of points to be blanked
-
- fblank=0.01*npct
- hist=0
- do i=1,nz
-! ### NB: if iwave(i)=-32768, abs(iwave(i))=-32768 ###
- if(iwave(i).eq.-32768) iwave(i)=-32767
- n=abs(iwave(i))
- hist(n)=hist(n)+1
- enddo
- n=0
- do i=32768,0,-1
- n=n+hist(i)
- if(n.ge.nint(nz*fblank/ndropmax)) exit
- enddo
- nthresh=i
- ndrop=0
- ndropped=0
-
- xx=0.
- do i=1,nz
- i0=iwave(i)
- if(ndrop.gt.0) then
- i0=0
- ndropped=ndropped+1
- ndrop=ndrop-1
- endif
-
-! Start to apply blanking
- if(abs(i0).gt.nthresh) then
- i0=0
- ndropped=ndropped+1
- ndrop=ndropmax
- endif
-
-! Now copy the data into c_bigfft
- if(iand(i,1).eq.1) then
- xx=i0
- else
- yy=i0
- j=i/2 - 1
- c_bigfft(j)=cmplx(xx,yy)
- endif
- enddo
-
- return
-end subroutine blanker
+subroutine blanker(iwave,nz,ndropmax,npct,c_bigfft) + + integer*2 iwave(nz) + complex c_bigfft(0:nz/2) + integer hist(0:32768) + real fblank !Fraction of points to be blanked + + fblank=0.01*npct + hist=0 + do i=1,nz +! ### NB: if iwave(i)=-32768, abs(iwave(i))=-32768 ### + if(iwave(i).eq.-32768) iwave(i)=-32767 + n=abs(iwave(i)) + hist(n)=hist(n)+1 + enddo + n=0 + do i=32768,0,-1 + n=n+hist(i) + if(n.ge.nint(nz*fblank/ndropmax)) exit + enddo + nthresh=i + ndrop=0 + ndropped=0 + + xx=0. + do i=1,nz + i0=iwave(i) + if(ndrop.gt.0) then + i0=0 + ndropped=ndropped+1 + ndrop=ndrop-1 + endif + +! Start to apply blanking + if(abs(i0).gt.nthresh) then + i0=0 + ndropped=ndropped+1 + ndrop=ndropmax + endif + +! Now copy the data into c_bigfft + if(iand(i,1).eq.1) then + xx=i0 + else + yy=i0 + j=i/2 - 1 + c_bigfft(j)=cmplx(xx,yy) + endif + enddo + + return +end subroutine blanker |
