Commit 133ef6b8 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

sine, first half-period

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: 546
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 2063ee57
c this is <siggen.f>
c------------------------------------------------------------------------------
c ($Id: siggen.f,v 1.8 2001-11-20 12:44:18 forbrig Exp $)
c ($Id: siggen.f,v 1.9 2001-11-26 11:09:53 forbrig Exp $)
c
c 24/10/2001 by Thomas Forbriger (IMGF Frankfurt)
c
......@@ -10,15 +10,16 @@ c REVISIONS and CHANGES
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
c==============================================================================
c
program siggen
c
character*(*) version
parameter(version='SIGGEN V1.2 SIGnal GENerator')
parameter(version='SIGGEN V1.3 SIGnal GENerator')
character*(*) SIGGEN_CVS_ID
parameter(SIGGEN_CVS_ID='$Id: siggen.f,v 1.8 2001-11-20 12:44:18 forbrig Exp $')
parameter(SIGGEN_CVS_ID='$Id: siggen.f,v 1.9 2001-11-26 11:09:53 forbrig Exp $')
c
c parameters
integer nsig,ncyc
......@@ -184,7 +185,7 @@ c
print *,' All samples are zero. Only ''n'' samples after'
print *,' ''Ta'' seconds will be ''a''.'
print *,' '
print *,'9 Gerhards weight drop'
print *,'9 Gerhard''s weight drop'
print *,' '
print *,' f(t)=0 t < Ta'
print *,' f(t)=-a Ta <= t <= Tm'
......@@ -192,13 +193,21 @@ c
print *,' sqrt((t-Tm)/(Te-Tm))*'
print *,' exp(-(t-Tm)/(Te-Tm)) Tm < t'
print *,' '
print *,'10 Gerhards weight drop (spike version)'
print *,'10 Gerhard''s weight drop (spike version)'
print *,' '
print *,' f(t)=0 t < Ta'
print *,' f(t)=-a Ta <= t < Tm'
print *,' f(t)=a*(Tm-Ta)/d t = Tm'
print *,' f(t)=0 t > Tm'
print *,' '
print *,'11 sine, first half-period'
print *,' f(t)=0 t <= Ta'
print *,' f(t)=a*sin(pi*(t-Ta)/(Te-Ta)) Ta < t < Te'
print *,' f(t)=0 t >= Te'
print *,' '
print *,' It is a one-sided impulse starting at Ta'
print *,' and ending at Te.'
print *,' '
print *,SIGGEN_CVS_ID
stop
endif
......@@ -512,6 +521,31 @@ c
data(i)=0
endif
enddo
elseif (nsig.eq.3) then
if (verbose) then
print *,'sine, first half-period'
print *,'parameters:'
print 50,'amplitude','a',a,' '
print 50,'sampling interval','d',d,'s'
print 50,'time series lentgh','T',t,'s'
print 50,'onset of wavelet','Ta',ta,'s'
print 50,'end of wavelet','Te',te,'s'
endif
nsamples=int(t/d)
if (verbose) then
print *,'derived parameters:'
print 52,'number of samples',nsamples,' '
endif
do i=1,nsamples
ti=d*(i-1)
if (ti.lt.ta) then
data(i)=0.
elseif(ti.le.te) then
data(i)=a*sin(pi*(ti-ta)/(te-ta))
else
data(i)=0.
endif
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