File: flat1.f90

package info (click to toggle)
wsjtx 2.0.0%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 192,624 kB
  • sloc: cpp: 1,071,838; ansic: 60,751; f90: 25,266; python: 20,318; sh: 10,636; xml: 8,148; cs: 2,121; fortran: 2,051; yacc: 472; asm: 353; makefile: 316; perl: 19
file content (23 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
subroutine flat1(savg,iz,nsmo,syellow)

  real savg(iz)
  real syellow(iz)
  real x(8192)

  ia=nsmo/2 + 1
  ib=iz - nsmo/2 - 1
  nstep=20
  nh=nstep/2
  do i=ia,ib,nstep
     call pctile(savg(i-nsmo/2),nsmo,50,x(i))
     x(i-nh:i+nh-1)=x(i)
  enddo
  x(1:ia-1)=x(ia)
  x(ib+1:iz)=x(ib)

  x0=0.001*maxval(x(iz/10:(9*iz)/10))
  syellow(1:iz)=savg(1:iz)/(x(1:iz)+x0)

  return
end subroutine flat1