18 #ifndef SEQGRADTRAPEZ_H
19 #define SEQGRADTRAPEZ_H
21 #include <odinseq/seqgradchanlist.h>
22 #include <odinseq/seqgradchanparallel.h>
23 #include <odinseq/seqgradramp.h>
24 #include <odinseq/seqdriver.h>
51 virtual bool update_driver(
direction channel,
double onrampdur,
double constdur,
double offrampdur,
float strength,
double timestep,
rampType type,
bool exclude_offramp_from_timing) = 0;
53 virtual float get_onramp_integral (
double tmin,
double tmax)
const = 0;
54 virtual float get_offramp_integral(
double tmin,
double tmax)
const = 0;
56 virtual const fvector& get_onramp()
const = 0;
57 virtual const fvector& get_offramp()
const = 0;
61 virtual bool check_ramptype(
rampType type)
const = 0;
84 bool update_driver(
direction channel,
double onrampdur,
double constdur,
double offrampdur,
float strength,
double timestep,
rampType type,
bool exclude_offramp_from_timing);
85 float get_onramp_integral (
double tmin,
double tmax)
const {
return onramp_cache. get_integral(tmin,tmax);}
86 float get_offramp_integral(
double tmin,
double tmax)
const {
return offramp_cache.
get_integral(tmin,tmax);}
90 bool check_ramptype(
rampType type)
const {
return true;}
94 odinPlatform get_driverplatform()
const {
return standalone;}
101 STD_string get_properties()
const;
106 float get_strength()
const {
return onramp_cache.
get_strength();}
107 double get_gradduration()
const;
112 STD_string get_grdpart(
float matrixfactor)
const {
return graddriver->get_trapez_program(get_strength(),matrixfactor);}
113 SeqGradChan& get_subchan(
double starttime,
double endtime)
const;
115 float get_integral()
const;
121 bool exclude_offramp;
158 float gradstrength,
double constgradduration,
double timestep=0.01,
159 rampType type = linear,
double minrampduration=0.0,
float steepness=1.0);
174 direction gradchannel,
double constgradduration,
175 double timestep=0.01,
rampType type = linear,
double minrampduration=0.0,
float steepness=1.0);
191 float gradstrength,
direction gradchannel,
192 double timestep=0.01,
rampType type = linear,
double minrampduration=0.0,
float steepness=1.0);
237 float get_onramp_integral(
double tmin,
double tmax)
const {
return trapezdriver->get_onramp_integral(tmin,tmax);}
252 float get_offramp_integral(
double tmin,
double tmax)
const {
return trapezdriver->get_offramp_integral(tmin,tmax);}
329 void check_platform();
330 void update_driver();
333 static void get_ramps(
const STD_string& label,
float& rampintegral,
double& rampondur,
double& rampoffdur,
float strength,
double dwelltime,
rampType ramptype,
float steepness,
double mindur);
340 float steepnessfactor;
341 bool exclude_offramp_timing;
347 float trapezstrength;
374 float gradintegral_read,
float gradintegral_phase,
float gradintegral_slice,
375 float maxgradstrength,
double timestep=0.01,
376 rampType type = linear,
double minrampduration=0.0);
virtual direction get_channel() const
float get_strength() const
bool update_driver(direction channel, double onrampdur, double constdur, double offrampdur, float strength, double timestep, rampType type, bool exclude_offramp_from_timing)
virtual bool update_driver(direction channel, double onrampdur, double constdur, double offrampdur, float strength, double timestep, rampType type, bool exclude_offramp_from_timing)=0
3 simultaneous trapezoids
SeqGradTrapezParallel(const STD_string &object_label, float gradintegral_read, float gradintegral_phase, float gradintegral_slice, float maxgradstrength, double timestep=0.01, rampType type=linear, double minrampduration=0.0)
SeqGradTrapezParallel(const SeqGradTrapezParallel &sgtp)
SeqGradTrapezParallel & operator=(const SeqGradTrapezParallel &sgtp)
SeqGradTrapezParallel(const STD_string &object_label="unnamedSeqGradTrapezParallel")
SeqGradTrapez(const STD_string &object_label, direction gradchannel, float gradstrength, double constgradduration, double timestep=0.01, rampType type=linear, double minrampduration=0.0, float steepness=1.0)
fvector get_onramp() const
unsigned int get_npts() const
double get_offramp_duration() const
SeqGradTrapez(const STD_string &object_label, float gradintegral, direction gradchannel, double constgradduration, double timestep=0.01, rampType type=linear, double minrampduration=0.0, float steepness=1.0)
unsigned int get_onramp_npts() const
float get_integral() const
double get_constgrad_duration() const
rampType get_ramptype() const
SeqGradTrapez & set_integral(float gradintegral)
float get_onramp_integral(double tmin, double tmax) const
double get_onramp_duration() const
unsigned int get_offramp_npts() const
float get_strength() const
fvector get_offramp() const
SeqGradTrapez & set_constgrad_duration(double duration)
fvector get_trapezshape() const
unsigned int get_const_npts() const
double get_timestep() const
double get_gradduration() const
float get_offramp_integral() const
SeqGradTrapez & operator=(const SeqGradTrapez &sgt)
float get_offramp_integral(double tmin, double tmax) const
SeqGradTrapez(const STD_string &object_label="unnamedSeqGradTrapez")
SeqGradTrapez(const STD_string &object_label, float gradintegral, float gradstrength, direction gradchannel, double timestep=0.01, rampType type=linear, double minrampduration=0.0, float steepness=1.0)
SeqGradTrapez & exclude_offramp_from_timing(bool flag)
SeqGradTrapez(const SeqGradTrapez &sgt)
float get_constgrad_integral() const
float get_onramp_integral() const
const fvector & get_wave() const
float get_integral(double tmin, double tmax) const