Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <S1S2Stimulus.hpp>
Public Member Functions | |
S1S2Stimulus (double magnitude, double stimulusDuration, double s1Duration, double s1Period, double startTime, std::vector< double > s2Periods) | |
double | GetStimulus (double time) |
void | SetS2ExperimentPeriodIndex (unsigned index) |
unsigned | GetNumS2FrequencyValues () |
Public Member Functions inherited from MultiStimulus | |
~MultiStimulus () | |
void | AddStimulus (boost::shared_ptr< AbstractStimulusFunction > pStimulus) |
void | Clear () |
Public Member Functions inherited from AbstractStimulusFunction | |
virtual | ~AbstractStimulusFunction () |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
S1S2Stimulus () | |
Private Attributes | |
unsigned | mS2Index |
unsigned | mNumS2FrequencyValues |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Attributes inherited from MultiStimulus | |
std::vector< boost::shared_ptr< AbstractStimulusFunction > > | mStimuli |
This class provides a stimulus function which follows an S1-S2 protocol. i.e.
Run a RegularStimulus at a certain (S1) frequency Then run two pulses of a second RegularStimulus at another (S2) frequency. These are combined into a MultiStimulus.
We have a number of these MultiStimulus objects, created for a given vector s2Periods in the constructor. As a user you set which of these S2 frequencies to run with the method SetS2ExperimentPeriodIndex().
Definition at line 60 of file S1S2Stimulus.hpp.
|
inlineprivate |
Private constructor - for archiving's eyes only.
Definition at line 92 of file S1S2Stimulus.hpp.
S1S2Stimulus::S1S2Stimulus | ( | double | magnitude, |
double | stimulusDuration, | ||
double | s1Duration, | ||
double | s1Period, | ||
double | startTime, | ||
std::vector< double > | s2Periods | ||
) |
Constructor
magnitude | The magnitude of the stimulus 'square wave'. |
stimulusDuration | The duration of the stimulus 'square wave'. |
s1Duration | The duration of the S1 phase of the experiment, should be a multiple of the s1Period. |
s1Period | The period of the S1 phase (typically ~1000ms for example). |
startTime | The time at which to begin the S1 stimulus (this delay is automatically added to give smooth transition to S2). |
s2Periods | A std::vector of the different S2 frequencies that should be run (for example {1000, 900, 800} (ms)). |
Definition at line 39 of file S1S2Stimulus.cpp.
References MultiStimulus::AddStimulus(), mNumS2FrequencyValues, and mS2Index.
unsigned S1S2Stimulus::GetNumS2FrequencyValues | ( | ) |
Definition at line 78 of file S1S2Stimulus.cpp.
References mNumS2FrequencyValues.
Get the magnitude of the multiple stimuli at time 'time'
time | time at which to return the stimulus |
Reimplemented from MultiStimulus.
Definition at line 61 of file S1S2Stimulus.cpp.
References mS2Index, and MultiStimulus::mStimuli.
|
inlineprivate |
Archive the simple stimulus, never used directly - boost uses this.
archive | |
version |
Definition at line 72 of file S1S2Stimulus.hpp.
References mNumS2FrequencyValues, and mS2Index.
void S1S2Stimulus::SetS2ExperimentPeriodIndex | ( | unsigned | index | ) |
Allows us to move to the 'next' S2 frequency.
index | Which S2 frequency to use next. |
Definition at line 66 of file S1S2Stimulus.cpp.
References EXCEPTION, mNumS2FrequencyValues, and mS2Index.
|
friend |
Needed for serialization.
Definition at line 64 of file S1S2Stimulus.hpp.
|
private |
The Number of S2 Frequencies that have been set up
Definition at line 87 of file S1S2Stimulus.hpp.
Referenced by S1S2Stimulus(), GetNumS2FrequencyValues(), serialize(), and SetS2ExperimentPeriodIndex().
|
private |
The Index of the S2 Frequency that we wish to run (as specified in the vector in the constructor).
Definition at line 83 of file S1S2Stimulus.hpp.
Referenced by S1S2Stimulus(), GetStimulus(), serialize(), and SetS2ExperimentPeriodIndex().