mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 13:10:19 -04:00 
			
		
		
		
	This merge brings the WSPR feature development into the main line ready for release in a future v1.6 release. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5424 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
		
			
				
	
	
		
			24 lines
		
	
	
		
			421 B
		
	
	
	
		
			Fortran
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			421 B
		
	
	
	
		
			Fortran
		
	
	
	
	
	
| 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
 | |
| 
 |