36 #include "S1S2Stimulus.hpp" 39 S1S2Stimulus::S1S2Stimulus(
double magnitude,
double stimulusDuration,
double s1Duration,
double s1Period,
double startTime, std::vector<double> s2Periods)
45 boost::shared_ptr<MultiStimulus> p_experiment_stimulus(
new MultiStimulus());
48 boost::shared_ptr<RegularStimulus> p_s1(
new RegularStimulus(magnitude, stimulusDuration, s1Period, startTime, s1Duration+startTime-0.5*(s1Period-stimulusDuration)));
49 boost::shared_ptr<RegularStimulus> p_s2(
new RegularStimulus(magnitude, stimulusDuration, s2Periods[i], s1Duration+startTime, s1Duration + 2*s2Periods[i]+startTime));
51 p_experiment_stimulus->AddStimulus(p_s1);
52 p_experiment_stimulus->AddStimulus(p_s2);
74 EXCEPTION(
"There are fewer S2 frequency values than the one you have requested.");
unsigned mNumS2FrequencyValues
#define EXCEPTION(message)
std::vector< boost::shared_ptr< AbstractStimulusFunction > > mStimuli
double GetStimulus(double time)
unsigned GetNumS2FrequencyValues()
void AddStimulus(boost::shared_ptr< AbstractStimulusFunction > pStimulus)
#define CHASTE_CLASS_EXPORT(T)
void SetS2ExperimentPeriodIndex(unsigned index)