LISOUSI: Line Source Simulation

◆ filterresponse()

Tseries filterresponse ( const int &  size,
const double &  dt,
const Options opt 
)

Definition at line 42 of file filterresponse.cc.

References Options::integshift, Options::nointeg, Options::tfac, Options::tlim, Options::tshift, and Options::verbose.

Referenced by tdtapertransformation().

43 {
44  if (opt.verbose)
45  {
46  cout << " construct 1/sqrt(t); ";
47  if (opt.nointeg)
48  {
49  cout << "tshift: " << opt.tshift << "; "
50  << "tlim: " << opt.tlim << "; "
51  << "tfac: " << opt.tfac << endl;
52  }
53  else
54  {
55  cout << "integshift: " << opt.integshift << " means "
56  << opt.integshift*dt << "s time shift" << endl;
57  }
58  }
59  Tseries retval=Tseries(0,size-1);
60  aff::Iterator<Tseries> I(retval);
61  for (unsigned int i=0; i<retval.size(); ++i)
62  {
63  if (opt.nointeg)
64  {
65  double t=dt*(double(i)+opt.tshift);
66  if (t < (opt.tlim*dt)) { t=opt.tfac*dt; }
67  *I=sqrt(1./t);
68  }
69  else
70  {
71  if (i == 0)
72  {
73  double tref=1.-opt.integshift;
74  *I=2.*sqrt(tref/dt);
75  }
76  else
77  {
78  double tref=(double(i)-opt.integshift);
79  *I=2.*(sqrt(tref+1)-sqrt(tref))/sqrt(dt);
80  }
81  }
82  ++I;
83  }
84  return(retval);
85 }
Ttimeseries::Tseries Tseries
Definition: lisousi.h:71
double integshift
Definition: lisousi.h:121
double tlim
Definition: lisousi.h:121
bool nointeg
Definition: lisousi.h:119
double tshift
Definition: lisousi.h:121
bool verbose
Definition: lisousi.h:117
double tfac
Definition: lisousi.h:121
Here is the caller graph for this function: