Chaste Release::3.1
S1S2Stimulus Class Reference

#include <S1S2Stimulus.hpp>

Inheritance diagram for S1S2Stimulus:
Collaboration diagram for S1S2Stimulus:

List of all members.

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 ()

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

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 ( ) [inline, private]

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

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 37 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 75 of file S1S2Stimulus.cpp.

References mNumS2FrequencyValues.

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 58 of file S1S2Stimulus.cpp.

References mS2Index, and MultiStimulus::mStimuli.

template<class Archive >
void S1S2Stimulus::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

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

Parameters:
archive
version

Reimplemented from MultiStimulus.

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 63 of file S1S2Stimulus.cpp.

References EXCEPTION, mNumS2FrequencyValues, and mS2Index.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from MultiStimulus.

Definition at line 64 of file S1S2Stimulus.hpp.


Member Data Documentation

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().

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: