LISOUSI: Line Source Simulation
padseries.cc
Go to the documentation of this file.
1 
35 #define TF_PADSERIES_CC_VERSION \
36  "TF_PADSERIES_CC V1.0"
37 
38 #include "lisousi.h"
39 #include "functions.h"
40 
42  const Options& opt)
43 {
44  if (opt.verbose)
45  {
46  cout << " frequency domain processing; "
47  "padding factor: " << opt.npad << endl;
48  }
49  // convolve by numerical transform
50  TFXX_assert(opt.npad>0,
51  "padding factor must be 1 or larger");
52  int newnsamples=series.size()*opt.npad;
53 
54  if (static_cast<int>(workseries.size())<newnsamples)
55  {
56  cout << " allocate new memory for "
57  << newnsamples << " samples"
58  << endl;
59  workseries=Tseries(0,newnsamples-1);
60  }
61 
62  TFourier::Tseries newseries(workseries);
63  newseries.setlastindex(newnsamples-1);
64  newseries=0.;
65  newseries.copyin(series);
66  return(newseries);
67 }
68 
69 /* ----- END OF padseries.cc ----- */
Ttimeseries::Tseries Tseries
Definition: lisousi.h:71
prototypes and structs for lisousi (prototypes)
Tseries workseries
Definition: globaldata.cc:47
int npad
Definition: lisousi.h:123
bool verbose
Definition: lisousi.h:117
lisousi functions (prototypes)
TFourier::Tseries padseries(const TFourier::Tseries &series, const Options &opt)
Definition: padseries.cc:41