S1S2Stimulus Class Reference

#include <S1S2Stimulus.hpp>

Inheritance diagram for S1S2Stimulus:

Inheritance graph
[legend]
Collaboration diagram for S1S2Stimulus:

Collaboration graph
[legend]

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 53 of file S1S2Stimulus.hpp.


Constructor & Destructor Documentation

S1S2Stimulus::S1S2Stimulus (  )  [inline, private]

Private constructor - for archiving's eyes only.

Definition at line 85 of file S1S2Stimulus.hpp.

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

Constructor

Parameters:
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 30 of file S1S2Stimulus.cpp.

References MultiStimulus::AddStimulus(), mNumS2FrequencyValues, and mS2Index.


Member Function Documentation

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 65 of file S1S2Stimulus.hpp.

References mNumS2FrequencyValues, and mS2Index.

double S1S2Stimulus::GetStimulus ( double  time  )  [virtual]

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

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

Reimplemented from MultiStimulus.

Definition at line 51 of file S1S2Stimulus.cpp.

References mS2Index, and MultiStimulus::mStimuli.

void S1S2Stimulus::SetS2ExperimentPeriodIndex ( unsigned  index  ) 

Allows us to move to the 'next' S2 frequency.

Parameters:
index Which S2 frequency to use next.

Definition at line 56 of file S1S2Stimulus.cpp.

References EXCEPTION, mNumS2FrequencyValues, and mS2Index.

unsigned S1S2Stimulus::GetNumS2FrequencyValues (  ) 

Returns:
The number of different frequencies this stimulus can perform.

Definition at line 68 of file S1S2Stimulus.cpp.

References mNumS2FrequencyValues.


Friends And Related Function Documentation

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

Needed for serialization.

Reimplemented from MultiStimulus.

Definition at line 57 of file S1S2Stimulus.hpp.


Member Data Documentation

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 76 of file S1S2Stimulus.hpp.

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

The Number of S2 Frequencies that have been set up

Definition at line 80 of file S1S2Stimulus.hpp.

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


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

Generated on Tue May 31 14:34:09 2011 for Chaste by  doxygen 1.5.5