Commit 98d43329 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

provide logarithmic sweep

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3845
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent dcb4b21a
......@@ -31,13 +31,14 @@ c 21/11/2001 V1.3 added first sine half-period
c 28/08/2002 V1.4 added noise
c 01/07/2002 V1.5 added test triangle
c 12/09/2007 V1.6 provide GSL random numbers
c 05/04/2011 V1.7 provide logarithmic sweep
c
c==============================================================================
c
program siggen
c
character*(*) version
parameter(version='SIGGEN V1.6 SIGnal GENerator')
parameter(version='SIGGEN V1.7 SIGnal GENerator')
character*(*) SIGGEN_CVS_ID
parameter(SIGGEN_CVS_ID=
& '$Id$')
......@@ -254,6 +255,10 @@ c
print *,' gaussian noise from GSL generator'
print *,' a: specifies the rms value.'
print *,' '
print *,'15 logarithmic sweep'
print *,' a: amplitude'
print *,' n: number of cycles per frequency decade'
print *,' '
print *,SIGGEN_CVS_ID
stop
endif
......@@ -668,6 +673,25 @@ c slope
do i=1,nsamples
data(i)=a*ddata(i)
enddo
elseif (nsig.eq.15) then
if (verbose) then
print *,'sweep with constant number of cycles per ',
& 'frequency decade'
print *,'parameters:'
print 50,'amplitude','a',a,' '
print 50,'sampling interval','d',d,'s'
print 50,'time series lentgh','T',t,'s'
print 51,'number of cycle pre decade','n',ncyc,' '
endif
nsamples=int(t/d)
if (verbose) then
print *,'derived parameters:'
print 52,'number of samples',nsamples,' '
endif
if (nsamples .gt. maxsamples) stop 'too many samples'
do i=1,nsamples
data(i)=a*sin(log10(d*i)*2*pi*ncyc)
enddo
else
stop 'ERROR: unknown signal'
endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment