24 "The \"SINUSOIDAL_TIME_DEPENDENCE\" element defines "
25 "sinusoidal coefficients for a time dependence, "
26 "frequency, phase offset, amplitude, DC offset, given by "
27 "f(t) = sigma_over_i(a[i] / 2 * sin(2 * pi * f[i] * t + p[i]) + o[i])";
30 :
OpalElement(static_cast<int>(
SIZE),
"SINUSOIDAL_TIME_DEPENDENCE", doc_string.c_str()) {
33 "Sine wave frequencies, length determines the number of sine waves included.");
35 "PHASE_OFFSETS",
"Phase offset for each sine wave. If undefined, defaults to 0.0.");
38 "Peak-to-peak amplitude for each sine wave. If undefined, defaults to 1.0.");
40 "DC_OFFSETS",
"DC offset for each sine wave. If undefined, defaults to 0.0.");
56 getOpalName(), std::make_shared<SinusoidalTimeDependence>(
static void setTimeDependence(const std::string &name, std::shared_ptr< AbstractTimeDependence > time_dep)
const std::string & getOpalName() const
Return object name.
std::vector< Attribute > itsAttr
The object attributes.
virtual void print(std::ostream &) const
Print the object.
void registerOwnership() const
static const std::string doc_string
OpalSinusoidalTimeDependence * clone(const std::string &name) override
OpalSinusoidalTimeDependence()
void print(std::ostream &) const override
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.