2016-12-15 18:42:33 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								subroutine ana64(dd,npts,c0)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  use timer_module, only: timer
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-10-22 15:56:20 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  real dd(npts)                              !Raw data at 12000 Hz
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  complex c0(0:npts-1)                       !Complex data at 6000 Hz
							 | 
						
					
						
							
								
									
										
										
										
											2016-12-15 18:42:33 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  save
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-10-22 15:56:20 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  nfft1=npts
							 | 
						
					
						
							
								
									
										
										
										
											2016-12-15 18:42:33 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  nfft2=nfft1/2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  df1=12000.0/nfft1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  fac=2.0/nfft1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  c0(0:npts-1)=fac*dd(1:npts)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  call four2a(c0,nfft1,1,-1,1)             !Forward c2c FFT
							 | 
						
					
						
							
								
									
										
										
										
											2020-10-22 15:56:20 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  c0(nfft2/2+1:nfft2-1)=0.
							 | 
						
					
						
							
								
									
										
										
										
											2016-12-15 18:42:33 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  c0(0)=0.5*c0(0)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  call four2a(c0,nfft2,1,1,1)              !Inverse c2c FFT; c0 is analytic sig
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  return
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								end subroutine ana64
							 |