38 #define STFINV_STFINV_C_VERSION \ 39 "STFINV_STFINV_C V1.3" 80 std::string cxxparameters(parameters);
85 aff::LinearShape shape(0, cxxstf.
sampling.
n-1, 0);
88 aff::SharedHeap<Tvalue>(stf.
series,
97 for (
int i=0; i<triples.
n; ++i)
101 const int& n=cxxtriples[i].header.
sampling.
n;
102 shape=aff::LinearShape(0, n-1, 0);
104 =stfinv::Tseries::Tcoc(shape,
105 aff::SharedHeap<Tvalue>::Tcoc(ctriple.
data, n));
106 cxxtriples[i].synthetics
107 =stfinv::Tseries::Tcoc(shape,
108 aff::SharedHeap<Tvalue>::Tcoc(ctriple.
synthetics, n));
109 cxxtriples[i].convolvedsynthetics
119 for (
int i=0; i<pairs.
n; ++i)
123 const int& n=cxxpairs[i].sampling.
n;
124 shape=aff::LinearShape(0, n-1, 0);
125 cxxpairs[i].synthetics
126 =stfinv::Tseries::Tcoc(shape,
127 aff::SharedHeap<Tvalue>::Tcoc(cpair.
synthetics, n));
128 cxxpairs[i].convolvedsynthetics
155 "runstfinvengine(): engine is not initialized!");
184 std::string selectid(
id);
C API to library (prototypes)
std::vector< stfinv::WaveformPair > Tvectorofpairs
Vector of pairs.
stfinv::Waveform run()
Start engine and return source correction filter.
int n
Number of triples (i.e. receivers) in the array.
Root namespace of library.
void printengines()
List procedures (engines) on stdout.
stfinv::STFEngine * Pengine
Pointer to engine to work with.
void freestfinvengine()
Free the engine.
handle error conditions in libstfinv (prototypes)
Array of waveform triples.This is used to pass data for a complete profile. A profile consists of CTr...
#define STFINV_assert(C, M)
Check an assertion and report by throwing an exception.
void runstfinvengine()
Run the engine.
void printhelp()
Print usage summary to stdout.
int n
Number of pairs in the array.
void engines(std::ostream &os)
void printusage(char *id)
Print detailed description for engine "id" to stdout.
struct CWaveformPair * pairs
Pointer to array of waveform pairs. This actually is a C array for elements of type struct CWaveformP...
void help(std::ostream &os)
Array of waveform pairs.This is used to pass data for a set of synthetic time series, which should be convolved with the new source correction filter on the fly. A collection of time series consists of CPairs::n waveform pairs. For each waveform pair this struct holds a reference to a struct CWaveformPair which itself provides a reference to the users workspace for time series.
std::vector< stfinv::WaveformTriple > Tvectoroftriples
Vector of triples.
void initstfinvengine(struct CTriples triples, struct CWaveform stf, char *parameters)
Initialize the engine.
void initstfinvenginewithpairs(struct CTriples triples, struct CWaveform stf, struct CPairs pairs, char *parameters)
Initialize the engine and pass additional time series to be convolved on the fly. ...
a wrapper to any STF engine in the library (prototypes)
Class to access any engine in the library.
aff::Series< Tvalue > Tseries
Type of sample values.
void usage(const std::string &id, std::ostream &os)
struct CWaveformTriple * triples
Pointer to array of waveform triples. This actually is a C array for elements of type struct CWavefor...