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

correction

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: 1794
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent bcec67a1
c this is <siggen.f>
c------------------------------------------------------------------------------
c ($Id: siggen.f,v 1.13 2005-07-01 13:57:16 tforb Exp $)
c ($Id: siggen.f,v 1.14 2005-07-01 15:31:28 tforb Exp $)
c
c 24/10/2001 by Thomas Forbriger (IMGF Frankfurt)
c
......@@ -22,10 +22,10 @@ c
parameter(version='SIGGEN V1.5 SIGnal GENerator')
character*(*) SIGGEN_CVS_ID
parameter(SIGGEN_CVS_ID=
& '$Id: siggen.f,v 1.13 2005-07-01 13:57:16 tforb Exp $')
& '$Id: siggen.f,v 1.14 2005-07-01 15:31:28 tforb Exp $')
c
c parameters
integer nsig,ncyc
integer nsig,ncyc,s
double precision f,t,a,d,ta,te,td,tm,f1,f2,expo,b,c
logical overwrite
character*80 filename
......@@ -46,7 +46,7 @@ c data space
c commandline
integer maxopt, lastarg, iargc
character*80 argument
parameter(maxopt=17)
parameter(maxopt=18)
character*3 optid(maxopt)
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
......@@ -55,10 +55,10 @@ c debugging
c here are the keys to our commandline options
data optid/2h-D, 2h-v, 2h-o, 2h-f, 2h-T, 2h-a, 2h-d,
& 3h-Ta,3h-Te,2h-n,3h-Td,3h-Tm,3h-f1,3h-f2,2h-e,
& 2h-b,2h-c/
data opthasarg/3*.FALSE.,14*.TRUE./
& 2h-b,2h-c,2h-s/
data opthasarg/3*.FALSE.,15*.TRUE./
data optarg/3*1h-,3h20.,2*2h1.,4h.001,2h0.,3h.02,1h5,5h1.e20,4h.005,
& 2*3h20.,3*1h1/
& 2*3h20.,4*1h1/
c
c------------------------------------------------------------------------------
c basic information
......@@ -71,6 +71,7 @@ c
print *,'Usage: siggen type file [-v] [-o] [-f f] [-T T] [-a a] [-d d]'
print *,' [-Ta Ta] [-Te Te] [-Td Td] [-Tm Tm]'
print *,' [-n n] [-f1 f1] [-f2 f2] [-b b] [-c c]'
print *,' [-s s]'
print *,' or: siggen -help'
if (argument(1:5).ne.'-help') stop 'ERROR: wrong number of arguments'
print *,' '
......@@ -93,6 +94,7 @@ c
print *,' (default: ',optarg(6)(1:3),')'
print *,'-b b set parameter ''b'' '
print *,'-c c set parameter ''c'' '
print *,'-s s set parameter ''s'' '
print *,' '
print *,'-f f set frequency parameter to ''f''Hz'
print *,' this is the fundamental signal frequency'
......@@ -217,6 +219,8 @@ c
print *,' and ending at Te.'
print *,' '
print *,'12 white noise'
print *,' n: read n values from random stream'
print *,' s: use s to initialize random number generator'
print *,' '
print *,'13 triangle test signal'
print *,' If D(t) is a triangle signal with 2*a peak'
......@@ -257,6 +261,7 @@ c
read(optarg(15), *) expo
read(optarg(16), *) b
read(optarg(17), *) c
read(optarg(18), *) s
c
c------------------------------------------------------------------------------
......@@ -574,8 +579,13 @@ c
print 50,'amplitude','a',a,' '
print 50,'sampling interval','d',d,'s'
print 50,'time series lentgh','T',t,'s'
print 51,'random seed','s',s,' '
print 52,'drop','n',ncyc,' '
endif
call tf_tsrand
call tf_srand(s)
do i=1,ncyc
bx=tf_rand()
enddo
nsamples=int(t/d)
if (verbose) then
print *,'derived parameters:'
......
Markdown is supported
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