diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
| commit | f647d78463c1250ce9c99af664615fafccf5e959 (patch) | |
| tree | 5b00428cef68aef1c9d407e2d4535687422419b6 /lib/spec_qra65.f90 | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'lib/spec_qra65.f90')
| -rw-r--r--[-rwxr-xr-x] | lib/spec_qra65.f90 | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/lib/spec_qra65.f90 b/lib/spec_qra65.f90 index 5f69ca2c..15e8fd09 100755..100644 --- a/lib/spec_qra65.f90 +++ b/lib/spec_qra65.f90 @@ -1,50 +1,50 @@ -subroutine spec_qra65(c0,nsps,s3,LL,NN)
-
-! Compute synchronized symbol spectra.
-
- complex c0(0:85*nsps-1) !Synchronized complex data at 6000 S/s
- complex, allocatable :: cs(:) !Complex symbol spectrum
- real s3(LL,NN) !Synchronized symbol spectra
- real xbase0(LL),xbase(LL) !Work arrays
- integer isync(22) !Indices of sync symbols
- data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/
-
- allocate(cs(0:nsps-1))
- fac=1.0/nsps
- j=0
- n=1
- do k=1,84
- if(k.eq.isync(n)) then
- n=n+1
- cycle
- endif
- j=j+1
- ja=(k-1)*nsps
- jb=ja+nsps-1
- cs=fac*c0(ja:jb)
- call four2a(cs,nsps,1,-1,1) !c2c FFT to frequency
- do ii=1,LL
- i=ii-65
- if(i.lt.0) i=i+nsps
- s3(ii,j)=real(cs(i))**2 + aimag(cs(i))**2
- enddo
- enddo
-
- df=6000.0/nsps
- do i=1,LL
- call pctile(s3(i,1:NN),NN,45,xbase0(i)) !Get baseline for passband shape
- enddo
-
- nh=9
- xbase(1:nh-1)=sum(xbase0(1:nh-1))/(nh-1.0)
- xbase(LL-nh+1:LL)=sum(xbase0(LL-nh+1:LL))/(nh-1.0)
- do i=nh,LL-nh
- xbase(i)=sum(xbase0(i-nh+1:i+nh))/(2*nh+1) !Smoothed passband shape
- enddo
-
- do i=1,LL
- s3(i,1:NN)=s3(i,1:NN)/(xbase(i)+0.001) !Apply frequency equalization
- enddo
-
- return
-end subroutine spec_qra65
+subroutine spec_qra65(c0,nsps,s3,LL,NN) + +! Compute synchronized symbol spectra. + + complex c0(0:85*nsps-1) !Synchronized complex data at 6000 S/s + complex, allocatable :: cs(:) !Complex symbol spectrum + real s3(LL,NN) !Synchronized symbol spectra + real xbase0(LL),xbase(LL) !Work arrays + integer isync(22) !Indices of sync symbols + data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/ + + allocate(cs(0:nsps-1)) + fac=1.0/nsps + j=0 + n=1 + do k=1,84 + if(k.eq.isync(n)) then + n=n+1 + cycle + endif + j=j+1 + ja=(k-1)*nsps + jb=ja+nsps-1 + cs=fac*c0(ja:jb) + call four2a(cs,nsps,1,-1,1) !c2c FFT to frequency + do ii=1,LL + i=ii-65 + if(i.lt.0) i=i+nsps + s3(ii,j)=real(cs(i))**2 + aimag(cs(i))**2 + enddo + enddo + + df=6000.0/nsps + do i=1,LL + call pctile(s3(i,1:NN),NN,45,xbase0(i)) !Get baseline for passband shape + enddo + + nh=9 + xbase(1:nh-1)=sum(xbase0(1:nh-1))/(nh-1.0) + xbase(LL-nh+1:LL)=sum(xbase0(LL-nh+1:LL))/(nh-1.0) + do i=nh,LL-nh + xbase(i)=sum(xbase0(i-nh+1:i+nh))/(2*nh+1) !Smoothed passband shape + enddo + + do i=1,LL + s3(i,1:NN)=s3(i,1:NN)/(xbase(i)+0.001) !Apply frequency equalization + enddo + + return +end subroutine spec_qra65 |
