Chaste  Release::2017.1
S1S2Stimulus Class Reference

#include <S1S2Stimulus.hpp>

+ Inheritance diagram for S1S2Stimulus:
+ Collaboration diagram for S1S2Stimulus:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

S1S2Stimulus::S1S2Stimulus ( )
inlineprivate

Private constructor - for archiving's eyes only.

Definition at line 92 of file S1S2Stimulus.hpp.

References CHASTE_CLASS_EXPORT, GetNumS2FrequencyValues(), GetStimulus(), and SetS2ExperimentPeriodIndex().

S1S2Stimulus::S1S2Stimulus ( double  magnitude,
double  stimulusDuration,
double  s1Duration,
double  s1Period,
double  startTime,
std::vector< double s2Periods 
)

Constructor

Parameters
magnitudeThe magnitude of the stimulus 'square wave'.
stimulusDurationThe duration of the stimulus 'square wave'.
s1DurationThe duration of the S1 phase of the experiment, should be a multiple of the s1Period.
s1PeriodThe period of the S1 phase (typically ~1000ms for example).
startTimeThe time at which to begin the S1 stimulus (this delay is automatically added to give smooth transition to S2).
s2PeriodsA 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.

Member Function Documentation

unsigned S1S2Stimulus::GetNumS2FrequencyValues ( )
Returns
The number of different frequencies this stimulus can perform.

Definition at line 78 of file S1S2Stimulus.cpp.

References CHASTE_CLASS_EXPORT, and mNumS2FrequencyValues.

Referenced by S1S2Stimulus().

double S1S2Stimulus::GetStimulus ( double  time)
virtual

Get the magnitude of the multiple stimuli at time 'time'

Parameters
timetime at which to return the stimulus
Returns
Magnitude of stimulus at time 'time'.

Reimplemented from MultiStimulus.

Definition at line 61 of file S1S2Stimulus.cpp.

References mS2Index, and MultiStimulus::mStimuli.

Referenced by S1S2Stimulus().

template<class Archive >
void S1S2Stimulus::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the simple stimulus, never used directly - boost uses this.

Parameters
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.

Parameters
indexWhich S2 frequency to use next.

Definition at line 66 of file S1S2Stimulus.cpp.

References EXCEPTION, mNumS2FrequencyValues, and mS2Index.

Referenced by S1S2Stimulus().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 64 of file S1S2Stimulus.hpp.

Member Data Documentation

unsigned S1S2Stimulus::mNumS2FrequencyValues
private

The Number of S2 Frequencies that have been set up

Definition at line 87 of file S1S2Stimulus.hpp.

Referenced by GetNumS2FrequencyValues(), S1S2Stimulus(), serialize(), and SetS2ExperimentPeriodIndex().

unsigned S1S2Stimulus::mS2Index
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 GetStimulus(), S1S2Stimulus(), serialize(), and SetS2ExperimentPeriodIndex().


The documentation for this class was generated from the following files: