Auditory-Projects Relacs Plugins 0.9.8
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
IsoResponse Class Reference

[RePro] Measures f-I-curves for a superposition of two sine waves. More...

#include <isoresponse.h>

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

List of all members.

Classes

struct  FIData
struct  IsoData

Public Member Functions

 IsoResponse (void)
 ~IsoResponse (void)
virtual int main (void)
void saveSpikes (const Options &header)
void saveRates (const Options &header)
void plot (void)
void analyze (const OutData &signal)

Protected Member Functions

void setFRBounds (double max)
void setIBounds (void)
void createSignal (OutData &signal, double a1, double a2)
int findIsoFreq (void)
void findScaling (void)
void plotIsoSets (void)

Protected Attributes

double Flow
double Fup
vector< double > FIso
double IntCorrection
double Scaling
double pi
double A0
int UseBestFrequency
double BestFreq
double DistBestFrequency
double DistFrequencies
double Frequency1
double Frequency2
double MinIntensity
double MaxIntensity
double FinalResolution
double EstimResolution
RangeLoop::Sequence IntShuffle
bool ShortStim
double Duration
double Pause
double OnWidth
double SSWidth
bool FITest
int Repeats
int EstRepeats
int Side
double IntensityUp
bool Switch_high
double FRhigh_per
double FRhigh_fix
bool Switch_low
double FRlow_per
double FRlow_fix
double MinFR
int IrsNumber
int IrsPoints
int State
MultiPlot P
RangeLoop IntensityRange
double Intensity
RangeLoop AmplitudeRelation
double AmplFraction
OutData Signal
double AmplRatio
int MaxRatePos
double MaxRate
vector< FIDataResults
vector< IsoDataIsoResults

Detailed Description

[RePro] Measures f-I-curves for a superposition of two sine waves.

Author:
Alexander Wolf

IsoResponse extrapolates Iso-Response-Sets (IRSs) for two sine amplitudes A1 and A2, i.e. for several combinations of A1 and A2 f-I-curves are recorded and the intensities determined at which the firing rate of the cell reaches predefined values. The stimulus looks like this: s(t)=A1*sin(2pi*f1*t)+A2*sin(2pi*f2*t).

The frequencies can either be set manually (use_best_freq=0), or set at a fixed distance (dist_best_freq) from either side the best frequency (use_best_freq=1), or set at a fixed distance from each (dist_freq) other so that the pure tone stimuli have the same sensitivity according to the tuning curve (use_best_freq=2). !The last option is to be prefered; however, it does not work in all cases!

The stimulus length is defined by 'duration', the time in between stimuli by 'pause'. For each stimuli presentation we record the onset response in the time intervall 'onwidth', and the steady state response after time 'sswidth' has passed, except when 'short_stim' is true - then only the onset is recorded.

The intensity of the signal ranges from 'intmin' to 'intmax'. To find the relevant range in which the f-I-curve rises, the interval is tested with a resolution of 'estres' and each data point is measure 'estrepeats' times. When the relevant range is determined, the resolution is decreased to 'intres' and each point is repeated 'repeats' times. The order in which the intensities is measured is determined with the switch 'inshuffle' (see RangeLoop).

'setFRbounds' determines the limits of the firing rate in between which the f-I-curve is to be measured. If 'switch_high' ('switch_low') is true, the upper (lower) bound is set to 'fix_high' ('fix_low'). Otherwise, the bounds are set to the experimentally determined maximum firing rate fmax minus 'per_high' ('per_low') percent. 'setIBounds' determines then the intensity range by finding the intensities at which the upper and lower bound for the firing rate are reached.

The fraction of the amplitudes ('AmplFraction') determines the shape of the signal. In order to scan the amplitude space equidistantly, we use the tangent of 'AmplFraction' and a scaling factor 'Scaling'. 'Scaling' is estimated from the f-I-curves of the pure tones ('findScaling') to equalize the difference in sensitivity of the two stimulus frequencies. The relative amplitudes of the mixed stimuli are determined by 'AmplRatio'.

The IRSs are determined in 'plotIsoSets' for 'isonumber' firing rates 'FIso'. The extrapolation is only linear using two points. It is therefore strongly recommended to analyze the data offline.

Options
The following options are supported (brief description of each option with default values and data type):
  • Stimulus
  • Frequencies
  • use_best_freq=absolute: Frequency reference (string)
  • dist_best_freq=1kHz*3/pi: Distance of f1 and f2 from best Frequency (for 'best') (number)
  • dist_freq=2kHz*3/pi: Distance between f1 and f2 (for 'isothresh') (number)
  • f1=4kHz: 1st Frequency (number)
  • f2=10kHz*3/pi: 2nd Frequency (number)
  • Intensities
  • intmin=30dB SPL: Minimum stimulus intensity (number)
  • intmax=100dB SPL: Maximum stimulus intensity (number)
  • intres=1dB SPL: Final intensity resolution (number)
  • estres=5dB SPL: Resolution for estimation of FR-range (number)
  • intshuffle=Up: Order of intensities (string)
  • Stimulus Structure
  • short_stim=true: Measure Onset Response only (boolean)
  • duration=200ms: Stimulus duration (number)
  • pause=300ms: Pause between stimuli (number)
  • onwidth=10ms: Window length for onset firing rate (number)
  • sswidth=100ms: Window length for steady-state firing rate (number)
  • Analysis
  • repeats=12: Number of repeats for each stimulus (integer)
  • estrepeats=3: Repeats for stimulus while estimating f-I-curve (integer)
  • side=best: Speaker (string)
  • Analysis Bounds
  • intup=5dB SPL: Increases upper intensity bound by: (number)
  • switch_high=false: Higher bound FR fixed (boolean)
  • per_high=5%: Percentage of max FR (number)
  • fix_high=500Hz: Absolute value for bound of upper FR (number)
  • switch_low=false: Lower bound FR fixed (boolean)
  • per_low=50%: Percentage of max FR (number)
  • fix_low=150Hz: Absolute value for lower bound of FR (number)
  • minfr=30Hz: Minimum firing rater response (number)
  • Iso-Response-Sets
  • isonumber=5: Number of Iso-Response-Sets evaluated (integer)
  • isopoints=33: Number of data points on each IRS (integer)
Keyboard shortcuts:
  • Space: Pressing space twice aborts IsoResponse after finishing up measuring the curent f-I curve.
Files:
  • isoresponsespikes.dat: The spike trains...
  • isoresponserates.dat: Continuous recording of measured f-I-curves. Before each f-I-curve the header data is recorded. The 'run' number marks the experiment. In the table you find the intensity, the true intensity, first and second stimulus amplitude, onset firing rate and standard deviation, the steady state firing rate and standard deviation, the mean firing rate and standard deviation, and the number of repetitions:

I(dB SPL) I_t(dB SPL) A1(mPa) A2(mPa) f_on(Hz) sd(Hz) f_s(Hz) sd(Hz) f_m(Hz) sd(Hz) trials

Version:
1.1 (Jan 10, 2008)

Constructor & Destructor Documentation

IsoResponse ( void  )
~IsoResponse ( void  )

Destructor.


Member Function Documentation

int main ( void  ) [virtual]

Read options, create stimulus and start output of stimuli.

Implements RePro.

References RePro::Aborted, Options::addInteger(), Options::addNumber(), RELACSPlugin::adjust(), RangeLoop::alternateInUp(), IsoResponse::AmplFraction, IsoResponse::AmplitudeRelation, IsoResponse::AmplRatio, IsoResponse::analyze(), IsoResponse::BestFreq, Options::boolean(), RangeLoop::clear(), MultiPlot::clear(), RePro::Completed, RangeLoop::count(), IsoResponse::createSignal(), RangeLoop::currentIncrement(), IsoResponse::DistBestFrequency, IsoResponse::DistFrequencies, IsoResponse::Duration, IsoResponse::EstimResolution, IsoResponse::EstRepeats, RELACSPlugin::events(), RePro::Failed, IsoResponse::FinalResolution, IsoResponse::findIsoFreq(), IsoResponse::findScaling(), RangeLoop::finishedBlock(), IsoResponse::FIso, IsoResponse::Flow, IsoResponse::Frequency1, IsoResponse::Frequency2, IsoResponse::FRhigh_fix, IsoResponse::FRhigh_per, IsoResponse::FRlow_fix, IsoResponse::FRlow_per, IsoResponse::Fup, Options::index(), RELACSPlugin::info(), IsoResponse::IntCorrection, Options::integer(), OutData::intensity(), IsoResponse::Intensity, IsoResponse::IntensityRange, IsoResponse::IntensityUp, RePro::interrupt(), IsoResponse::IntShuffle, IsoResponse::IrsNumber, IsoResponse::IrsPoints, IsoResponse::IsoResults, MultiPlot::lock(), RELACSPlugin::lockMetaData(), RELACSPlugin::lockStimulusData(), RangeLoop::loop(), IsoResponse::MaxIntensity, IsoResponse::MaxRate, IsoResponse::MaxRatePos, RePro::message(), RELACSPlugin::metaData(), IsoResponse::MinFR, IsoResponse::MinIntensity, Options::newSection(), Options::number(), IsoResponse::OnWidth, DaqError::overflow(), IsoResponse::P, IsoResponse::Pause, IsoResponse::pi, IsoResponse::plot(), IsoResponse::plotIsoSets(), RangeLoop::pos(), RELACSPlugin::printlog(), IsoResponse::Repeats, RangeLoop::reset(), IsoResponse::Results, IsoResponse::saveRates(), IsoResponse::saveSpikes(), IsoResponse::Scaling, RangeLoop::set(), RangeLoop::setBlockRepeat(), IsoResponse::setFRBounds(), IsoResponse::setIBounds(), OutData::setIntensity(), RangeLoop::setLargeIncrement(), RangeLoop::setSequence(), RangeLoop::setSkipAbove(), RangeLoop::setSkipBelow(), RELACSPlugin::settings(), IsoResponse::ShortStim, IsoResponse::Side, RELACSPlugin::signalTime(), RangeLoop::size(), RePro::sleep(), RePro::softStop(), Traces::Speaker, Traces::SpikeEvents, IsoResponse::SSWidth, IsoResponse::State, RELACSPlugin::stimulusData(), IsoResponse::Switch_high, IsoResponse::Switch_low, tan(), RePro::testWrite(), RePro::totalRuns(), RELACSPlugin::trace(), RePro::tracePlotSignal(), DaqError::underflow(), MultiPlot::unlock(), RELACSPlugin::unlockMetaData(), RELACSPlugin::unlockStimulusData(), IsoResponse::UseBestFrequency, Options::warning(), RePro::write(), and RePro::writeZero().

void saveSpikes ( const Options header)
void saveRates ( const Options header)
void plot ( void  )
void analyze ( const OutData signal)
void setFRBounds ( double  max) [protected]
void setIBounds ( void  ) [protected]
void createSignal ( OutData signal,
double  a1,
double  a2 
) [protected]
int findIsoFreq ( void  ) [protected]
void findScaling ( void  ) [protected]
void plotIsoSets ( void  ) [protected]

Member Data Documentation

double Flow [protected]
double Fup [protected]
vector< double > FIso [protected]
double IntCorrection [protected]
double Scaling [protected]
double pi [protected]
double A0 [protected]
int UseBestFrequency [protected]
double BestFreq [protected]
double DistBestFrequency [protected]
double DistFrequencies [protected]
double Frequency1 [protected]
double Frequency2 [protected]
double MinIntensity [protected]
double MaxIntensity [protected]
double FinalResolution [protected]
double EstimResolution [protected]

Referenced by IsoResponse::main().

bool ShortStim [protected]
double Duration [protected]
double Pause [protected]
double OnWidth [protected]
double SSWidth [protected]
bool FITest [protected]
int Repeats [protected]
int EstRepeats [protected]
int Side [protected]
double IntensityUp [protected]
bool Switch_high [protected]
double FRhigh_per [protected]
double FRhigh_fix [protected]
bool Switch_low [protected]
double FRlow_per [protected]
double FRlow_fix [protected]
double MinFR [protected]
int IrsNumber [protected]
int IrsPoints [protected]
int State [protected]
MultiPlot P [protected]
double Intensity [protected]
double AmplFraction [protected]
OutData Signal [protected]
double AmplRatio [protected]
int MaxRatePos [protected]
double MaxRate [protected]
vector< FIData > Results [protected]
vector< IsoData > IsoResults [protected]

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