Commit 8c7c4283 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

added noise

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: 918
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent cdf7f6f5
c this is <siggen.f>
c------------------------------------------------------------------------------
c ($Id: siggen.f,v 1.10 2001-11-26 11:11:41 forbrig Exp $)
c ($Id: siggen.f,v 1.11 2002-08-28 15:36:07 forbrig Exp $)
c
c 24/10/2001 by Thomas Forbriger (IMGF Frankfurt)
c
......@@ -11,21 +11,25 @@ c 24/10/2001 V1.0 Thomas Forbriger
c 02/11/2001 V1.1 boxcar
c 20/11/2001 V1.2 Gerhards weight-drop source signal
c 21/11/2001 V1.3 added first sine half-period
c 28/08/2002 V1.4 added noise
c
c==============================================================================
c
program siggen
c
character*(*) version
parameter(version='SIGGEN V1.3 SIGnal GENerator')
parameter(version='SIGGEN V1.4 SIGnal GENerator')
character*(*) SIGGEN_CVS_ID
parameter(SIGGEN_CVS_ID='$Id: siggen.f,v 1.10 2001-11-26 11:11:41 forbrig Exp $')
parameter(SIGGEN_CVS_ID=
& '$Id: siggen.f,v 1.11 2002-08-28 15:36:07 forbrig Exp $')
c
c parameters
integer nsig,ncyc
double precision f,t,a,d,ta,te,td,tm,f1,f2,expo
logical overwrite
character*80 filename
c functions
real tf_rand
c internal parameters
integer nsamples,i
double precision ti,tend,b
......@@ -208,6 +212,8 @@ c
print *,' It is a one-sided impulse starting at Ta'
print *,' and ending at Te.'
print *,' '
print *,'12 white noise'
print *,' '
print *,SIGGEN_CVS_ID
stop
endif
......@@ -546,6 +552,23 @@ c
data(i)=0.
endif
enddo
elseif (nsig.eq.12) then
if (verbose) then
print *,'white noise'
print *,'parameters:'
print 50,'amplitude','a',a,' '
print 50,'sampling interval','d',d,'s'
print 50,'time series lentgh','T',t,'s'
endif
call tf_tsrand
nsamples=int(t/d)
if (verbose) then
print *,'derived parameters:'
print 52,'number of samples',nsamples,' '
endif
do i=1,nsamples
data(i)=a*(2.*tf_rand()-1.)
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