Staircase Class Reference

A staircase procedure to measure psychophysical thresholds. More...

#include <Psycho/Staircase.H>

Inheritance diagram for Staircase:
Inheritance graph
[legend]
Collaboration diagram for Staircase:
Collaboration graph
[legend]

List of all members.

Classes

struct  StaircaseEvent

Public Member Functions

 Staircase (OptionManager &mgr, const std::string &descrName="Staircase", const std::string &tagName="Staircase")
 Constructor.
 ~Staircase ()
 Destructor.
virtual void reset1 ()
 Reset to initial conditions.
void getValues (double &value1, double &value2)
 Get parameter values to use for next trial.
void setResponse (const bool response)
 Set the response of the current trial.
void pushEvent (const std::string &msg, const int trial=-1, const double val=0.0, const bool response=false)
 Log an event.

Protected Member Functions

void start2 ()
 get started
void stop1 ()
 get stopped

Protected Attributes

NModelParam< double > itsInitial
 initial value
NModelParam< double > itsDelta
 delta in values
NModelParam< double > itsMini
 minimum possible value
NModelParam< double > itsMaxi
 maximum possible value
NModelParam< int > itsNright
 nb of right responses to subtract a delta
NModelParam< int > itsNwrong
 nb of wrong responses to add a delta
NModelParam< std::stringitsFileName
 name of file to save the logs

Detailed Description

A staircase procedure to measure psychophysical thresholds.

This class facilitates the evaluation of a threshold in a psychophysical task.

Definition at line 54 of file Staircase.H.


Constructor & Destructor Documentation

Staircase::Staircase ( OptionManager mgr,
const std::string descrName = "Staircase",
const std::string tagName = "Staircase" 
)

Constructor.

Definition at line 47 of file Staircase.C.

Staircase::~Staircase (  ) 

Destructor.

Definition at line 63 of file Staircase.C.


Member Function Documentation

void Staircase::getValues ( double &  value1,
double &  value2 
)

Get parameter values to use for next trial.

This will give you two values, one to use for the first period of the following trial, and one for the second period. The Staircase class will keep in memory what the expected answer should be, which you will give using setResponse().

Definition at line 125 of file Staircase.C.

References pushEvent(), and randomDouble().

void Staircase::pushEvent ( const std::string msg,
const int  trial = -1,
const double  val = 0.0,
const bool  response = false 
)

Log an event.

This is in the public section just in case someone wants to push external events, but should not be called by the user in normal situations, as it is called internally when getNextValue() is called.

Definition at line 168 of file Staircase.C.

References Timer::get().

Referenced by getValues(), reset1(), setResponse(), and start2().

void Staircase::reset1 (  )  [virtual]

Reset to initial conditions.

Reimplemented from ModelComponent.

Definition at line 77 of file Staircase.C.

References NModelParam< T >::getVal(), itsInitial, pushEvent(), Timer::reset(), and sformat().

void Staircase::setResponse ( const bool  response  ) 

Set the response of the current trial.

The response should be true is the user said nothing-then-something, false otherwise.

Definition at line 144 of file Staircase.C.

References NModelParam< T >::getVal(), itsDelta, itsMaxi, itsMini, itsNright, itsNwrong, and pushEvent().

void Staircase::start2 (  )  [protected, virtual]

get started

Reimplemented from ModelComponent.

Definition at line 67 of file Staircase.C.

References NModelParam< T >::getVal(), initRandomNumbers(), itsInitial, pushEvent(), Timer::reset(), and sformat().

void Staircase::stop1 (  )  [protected, virtual]

get stopped

Reimplemented from ModelComponent.

Definition at line 88 of file Staircase.C.

References NModelParam< T >::getVal(), itsFileName, and sec().


Member Data Documentation

NModelParam<double> Staircase::itsDelta [protected]

delta in values

Definition at line 90 of file Staircase.H.

Referenced by setResponse().

name of file to save the logs

Definition at line 95 of file Staircase.H.

Referenced by stop1().

NModelParam<double> Staircase::itsInitial [protected]

initial value

Definition at line 89 of file Staircase.H.

Referenced by reset1(), and start2().

NModelParam<double> Staircase::itsMaxi [protected]

maximum possible value

Definition at line 92 of file Staircase.H.

Referenced by setResponse().

NModelParam<double> Staircase::itsMini [protected]

minimum possible value

Definition at line 91 of file Staircase.H.

Referenced by setResponse().

nb of right responses to subtract a delta

Definition at line 93 of file Staircase.H.

Referenced by setResponse().

nb of wrong responses to add a delta

Definition at line 94 of file Staircase.H.

Referenced by setResponse().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3