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

proceeding

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: 1614
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 2135da5e
c this is <phasedsignals.f>
c ----------------------------------------------------------------------------
c ($Id: phasedsignals.f,v 1.3 2005-01-11 15:11:57 tforb Exp $)
c ($Id: phasedsignals.f,v 1.4 2005-01-11 18:36:45 tforb Exp $)
c
c Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
c
......@@ -19,15 +19,15 @@ c
& //'compute synthetic signals with given phase')
character*(*) PHASEDSIGNALS_CVS_ID
parameter(PHASEDSIGNALS_CVS_ID=
& '$Id: phasedsignals.f,v 1.3 2005-01-11 15:11:57 tforb Exp $')
& '$Id: phasedsignals.f,v 1.4 2005-01-11 18:36:45 tforb Exp $')
c
c
logical overwrite
character arg_model
double precision arg_duration, arg_delay, arg_bandwidth
integer arg_npower
integer arg_npower, arg_nord
c
integer nsamples, maxsamples, maxfreq, nfreq
integer nsamples, maxsamples, maxfreq, nfreq, nord
parameter(maxsamples=100000,maxfreq=((maxsamples/2)+1))
double precision dt, t0, df, pi, pi2, f ,t, bw, fac, v
parameter(pi=3.141592653589793d0,pi2=2.d0*pi)
......@@ -47,14 +47,14 @@ c debugging
c commandline
integer maxopt, lastarg, iargc
character*80 argument
parameter(maxopt=8)
parameter(maxopt=9)
character*2 optid(maxopt)
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c here are the keys to our commandline options
data optid/2h-d, 2h-v, 2h-o, 2h-p, 2h-t, 2h-n, 2h-s, 2h-b/
data opthasarg/3*.FALSE.,5*.TRUE./
data optarg/3*1h-,1h0,2h1.,2h10,2h0.,2h1./
data optid/2h-d, 2h-v, 2h-o, 2h-p, 2h-t, 2h-n, 2h-s, 2h-b, 2h-O/
data opthasarg/3*.FALSE.,6*.TRUE./
data optarg/3*1h-,1h0,2h1.,2h10,2h0.,2h1.,1h2/
c
c------------------------------------------------------------------------------
c basic information
......@@ -64,7 +64,7 @@ c
if (iargc().eq.1) call getarg(1, argument)
if ((argument(1:5).eq.'-help').or.(iargc().lt.1)) then
print *,version
print *,'Usage: phasedsignals outfile [-o] [-p 0|m|r]'
print *,'Usage: phasedsignals outfile [-o] [-p 0|m|r] [-O o]'
print *,' [-t d] [-n p] [-s t] [-b bw]'
print *,' or: phasedsignals -help'
if (argument(1:5).ne.'-help')
......@@ -81,6 +81,7 @@ c
print *,'-n p number so samples = 2**p'
print *,'-s t shift data by t'
print *,'-b bw set bandwidth'
print *,'-O o use low pass repsonse of order ''o'' '
print *,' '
print *,PHASEDSIGNALS_CVS_ID
stop
......@@ -100,6 +101,7 @@ c
read(optarg(6), *) arg_npower
read(optarg(7), *) arg_delay
read(optarg(8), *) arg_bandwidth
read(optarg(9), *) arg_nord
c
c------------------------------------------------------------------------------
c go
......@@ -111,10 +113,13 @@ c go
df=1./arg_duration
nfreq=(nsamples/2)+1
bw=arg_bandwidth
nord=arg_nord
c
c
do i=1,nfreq
f=(i-1)*df
amp(i)=max(1.e8*exp(-(f/bw)**2),1.)
spectrum(i)=
enddo
c
if (arg_model.eq.'0') then
......
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