diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /lib/blanker.f90 | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to 'lib/blanker.f90')
| -rw-r--r-- | lib/blanker.f90 | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/blanker.f90 b/lib/blanker.f90 index ec94f0df..52c14a7e 100644 --- a/lib/blanker.f90 +++ b/lib/blanker.f90 @@ -1,31 +1,31 @@ -subroutine blanker(iwave,nz,ndropmax,npct,c_bigfft) +subroutine blanker(iwave,nz,ndropmax,npct,c_bigfft,hist) - integer*2 iwave(nz) + integer*2, intent(in) :: iwave(nz) complex c_bigfft(0:nz/2) - integer hist(0:32768) + integer, intent(inout) :: hist(0:32768) real fblank !Fraction of points to be blanked - save hist - 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 + nthresh=32768 + if(npct>0) then + fblank=0.01*npct + hist=0 + do i=1,nz + n=abs(max(-32767,int(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 + endif ndrop=0 ndropped=0 xx=0. do i=1,nz - i0=iwave(i) + i0=max(-32767,int(iwave(i))) if(ndrop.gt.0) then i0=0 ndropped=ndropped+1 |
