Auditory Relacs Plugins  0.9.8
Classes | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
FICurve Class Reference

#include <ficurve.h>

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

Classes

struct  FIData
 
struct  ThreshData
 

Public Member Functions

 FICurve (void)
 
 ~FICurve (void)
 
virtual int main (void)
 
virtual void init (void)
 
- Public Member Functions inherited from ConfigDialog
 ConfigDialog (const string &configident="", int configgroup=0, const string &name="", const string &author="", const string &version="", const string &date=__DATE__)
 
virtual ~ConfigDialog (void)
 
string name (void) const
 
virtual void setName (const string &name)
 
string author (void) const
 
virtual void setAuthor (const string &author)
 
string version (void) const
 
virtual void setVersion (const string &version)
 
string date (void) const
 
virtual void setDate (const string &date)
 
virtual OptWidgetdialogOptions (OptDialog *od, string *tabhotkeys=0)
 
virtual void dialogButtons (OptDialog *od)
 
virtual void dialogEmptyMessage (OptDialog *od)
 
int dialogSelectMask (void) const
 
void setDialogSelectMask (int mask)
 
void addDialogSelectMask (int mask)
 
int dialogReadOnlyMask (void) const
 
void setDialogReadOnlyMask (int mask)
 
void addDialogReadOnlyMask (int mask)
 
int dialogStyle (void) const
 
void setDialogStyle (int style)
 
void addDialogStyle (int style)
 
string dialogCaption (void) const
 
void setDialogCaption (const string &caption)
 
bool dialogHeader (void) const
 
void setDialogHeader (bool d)
 
string headerBackgroundColor (void) const
 
void setHeaderBackgroundColor (const string &color)
 
string headerForegroundColor (void) const
 
void setHeaderForegroundColor (const string &color)
 
string headerImageFile (void) const
 
void setHeaderImageFile (const string &file)
 
virtual void dialogHeaderWidget (OptDialog *od)
 
bool dialogHelp (void) const
 
void setDialogHelp (bool d)
 
string helpCaption (void) const
 
void setHelpCaption (const string &caption)
 
string helpPath (int inx=0) const
 
int helpPathes (void) const
 
void clearHelpPathes (void)
 
void setHelpPath (const string &path)
 
void addHelpPath (const string &path)
 
virtual string helpFileName (void) const
 
bool dialogOpen (void) const
 
bool helpOpen (void) const
 
QWidget * mainWidget (void)
 
virtual void setMainWidget (QWidget *widget)
 
void lock () const
 
void unlock () const
 
bool tryLock (int timeout=1)
 
QMutex * mutex (void)
 
- Public Member Functions inherited from ConfigClass
 ConfigClass (const string &ident, int group=0, int mode=0xffff, int selectmask=0)
 
 ConfigClass (const ConfigClass &C)
 
virtual ~ConfigClass (void)
 
const string & configIdent (void) const
 
void setConfigIdent (const string &ident)
 
int configGroup (void) const
 
void setConfigGroup (int group)
 
int configMode (void) const
 
void setConfigMode (int mode)
 
void addConfigMode (int mode)
 
void delConfigMode (int mode)
 
int configSelectMask (void) const
 
void setConfigSelectMask (int mask)
 
void addConfig (void)
 
void readConfig (void)
 
virtual void readConfig (StrQueue &sq)
 
virtual void saveConfig (ofstream &str)
 
virtual int configSize (void) const
 
virtual void config (void)
 
virtual void preConfig (void)
 
- Public Member Functions inherited from StandardTraces
 StandardTraces (void)
 

Protected Slots

void plotMouseEvent (Plot::MouseEvent &me)
 
- Protected Slots inherited from ConfigDialog
void notificationFromDialog (const Parameter &p)
 
virtual void dClosed (int r)
 
virtual void hClosed (int r)
 

Protected Member Functions

virtual void customEvent (QEvent *qce)
 
void saveSpikes (const string &file, const vector< FIData > &results)
 
void saveRates (const string &file, const vector< FIData > &results)
 
void saveFICurve (const string &file, const vector< FIData > &results)
 
void analyzeFICurve (const vector< FIData > &results, double minrate=0.0)
 
void setHeader (void)
 
void updateSession (const vector< FIData > &results)
 
void save (const vector< FIData > &results)
 
void plotIntensitySelection (void)
 
virtual void plot (const vector< FIData > &results)
 
virtual void analyze (vector< FIData > &results)
 
virtual DoneState next (vector< FIData > &results, bool msg=true)
 
int loop (vector< FIData > &results)
 
void silentActivity (void)
 
void resetSilentActivity (void)
 
- Protected Member Functions inherited from ConfigDialog
void setDialogOpen (bool open=true)
 
void setHelpOpen (bool open=true)
 

Protected Attributes

double MinIntensity
 
double MaxIntensity
 
double IntensityStep
 
bool UseThresh
 
bool UseSaturation
 
RangeLoop::Sequence IntShuffle
 
int IntIncrement
 
int SingleRepeat
 
int IntBlockRepeat
 
int IntRepeat
 
double CarrierFrequency
 
bool UseBestFreq
 
int Waveform
 
double Ramp
 
int Side
 
double Duration
 
double Pause
 
bool SkipPause
 
int SkipSilentIncrement
 
int SlopeIntIncrement
 
double MinRateSlope
 
double MaxRateFrac
 
double IntensityExtension
 
bool UseSilent
 
double MaxBaseRate
 
int MaxSilent
 
double SilentFactor
 
int ResetSilent
 
double RateDt
 
double PreWidth
 
double PeakWidth
 
double SSWidth
 
bool PlotOnSSRate
 
bool AdjustGain
 
bool SetBest
 
int SetCurves
 
RangeLoop IntensityRange
 
double Intensity
 
OutData Signal
 
double MeanIntensity
 
double MinCarrierFrequency
 
int FICurveStops
 
int NSilent
 
double SilentRate
 
double LastSilentRate
 
double SilentRateSq
 
double SilentRateSD
 
double MaxSilentRate
 
double MaxPlotRate
 
MultiPlot P
 
bool PlotIntensitySelection
 
Options Header
 
ThreshData Threshold
 
- Protected Attributes inherited from ConfigDialog
Options DialogOptions
 

Additional Inherited Members

- Public Types inherited from ConfigClass
enum  Action
 
- Public Slots inherited from ConfigDialog
virtual void dialog (void)
 
virtual void help (void)
 
virtual void notifyDialog (const Options &opt)
 
- Signals inherited from ConfigDialog
void dialogAccepted (void)
 
void dialogAction (int r)
 
void dialogClosed (int r)
 
- Static Public Member Functions inherited from ConfigClass
static void setConfigureClasses (ConfigureClasses *cfg)
 
- Static Protected Member Functions inherited from StandardTraces
static void clearIndices (int *traceindices, int n=-1)
 
static void initStandardTraces (const InList &data, int *ntraces, int *traceindices, const string *names, string &namelist, bool alpha=false)
 
static void initStandardEventTraces (const InList &data, const EventList &events, int *ntraces, int *traceindices, int *eventindices, const string *tracenames, const string *eventnames, string &tracenamelist, string &eventnamelist, bool alpha=false)
 
static void initStandardOutputs (const RELACSPlugin *rp, int *ntraces, int *traceindices, const string *names, string &namelist, bool alpha=false)
 
- Static Protected Attributes inherited from StandardTraces
static const int MaxTraces
 

Detailed Description

[RePro] Optimized measuring of f-I curves.

Version
1.6 (Jul 18, 2014)
Author
Jan Benda
Options
  • Intensities
    • intmin=30dB SPL: Minimum stimulus intensity (number)
    • intmax=100dB SPL: Maximum stimulus intensity (number)
    • intstep=1dB SPL: Sound intensity step (number)
    • usethresh=false: Relative to the cell's threshold (boolean)
    • usesat=false: Maximum intensity relative to the cell's best saturation (boolean)
    • useprevints=no: Re-use intensities from the previous run (string)
    • intshuffle=Up: Order of intensities (string)
    • intincrement=0: Initial increment for intensities (integer)
    • singlerepeat=6: Number of immediate repetitions of a single stimulus (integer)
    • blockrepeat=1: Number of repetitions of a fixed intensity increment (integer)
    • repeats=1: Number of repetitions of the whole f-I curve measurement (integer)
    • manualskip=false: Show buttons for manual selection of intensities (boolean)
  • Waveform
    • waveform=sine: Waveform of stimulus (string)
    • carrierfreq=5kHz: Frequency of carrier (number)
    • usebestfreq=false: Relative to the cell's best frequency (boolean)
    • ramp=2ms: Ramp of stimulus (number)
    • duration=400ms: Duration of stimulus (number)
    • pause=400ms: Pause (number)
    • side=left: Speaker (string)
  • Optimization
    • Baseline activity
      • usesilent=false: Use measured baseline activity (boolean)
      • maxbaserate=10Hz: Maximum baseline activity (number)
      • maxsilent=100: Maximum trials used for baseline activity (integer)
      • resetsilent=Never: Reset estimation of baseline activity at (string)
      • silentfactor=3: Weight for standard deviation of baseline activity (number)
    • No response
      • skippause=true: Skip pause if there is no response (boolean)
      • silentintincrement=1: Skip all stimuli below not responding ones
        at intensity increments below (integer)
    • Slope
      • slopeintincrement=2: Optimize slopes at intensity increments below (integer)
      • minrateslope=0Hz/dB: Minimum slope of firing rate (number)
      • maxratefrac=100%: Fraction of maximum firing rate above which slopes are optimized (number)
      • extint=0dB SPL: Extend intensity range by (number)
  • Analysis
    • ratedt=1ms: Bin width for firing rate (number)
    • prewidth=50ms: Window length for baseline firing rate (number)
    • peakwidth=100ms: Window length for peak firing rate (number)
    • sswidth=50ms: Window length for steady-state firing rate (number)
    • plotonssrate=true: Plot onset- and steady-state rate (boolean)
    • adjust=true: Adjust input gain (boolean)
    • setbest=true: Set results to the session variables (boolean)
    • setcurves=none: F-I curves to be passed to session (string)
Plots
The let plot shos the spike raster (red) and the spike frequency of the currently measured intensity and carrier frequency.xs

The right plot shows the f-I curve of the currently measured carrier frequency. Cyan is the firing rate before the stimulus, orange is the mean firing rate (spike count divided by stimulus duration), red is the steady-state firing rate, and green is the onset spike frequency (mean max spike frequency).

If you have selected manualskip then move the mouse into the top part of the f-I curve plot. This brings up a line of red and green buttons, each one corresponding to an intensity value. Green buttons indicated intensities that are measured, red buttons indicate skipped (not measured) intensitties. Left click on a button to toggle measurement of the corresponding intensity value. Simultaneously holding down the shift key toggels all intensities below the selected one. Holding down the ctrl key toggels all intensities above the selected one.

Constructor & Destructor Documentation

FICurve ( void  )
~FICurve ( void  )

Destructor.

Member Function Documentation

int main ( void  )
virtual

Implements RePro.

Reimplemented in FIField.

References FICurve::AdjustGain, OutData::back(), OutData::bandNoiseWave(), FICurve::CarrierFrequency, RangeLoop::clear(), MultiPlot::clear(), RangeLoop::count(), RangeLoop::currentIncrement(), FICurve::Duration, Map< T >::empty(), DaqError::errorText(), OutData::free(), FICurve::IntBlockRepeat, OutData::intensity(), FICurve::Intensity, FICurve::IntensityExtension, FICurve::IntensityRange, FICurve::IntensityStep, FICurve::IntIncrement, FICurve::IntRepeat, FICurve::IntShuffle, MultiPlot::lock(), FICurve::loop(), FICurve::MaxBaseRate, FICurve::MaxIntensity, FICurve::MaxPlotRate, FICurve::MaxRateFrac, FICurve::MaxSilent, RangeLoop::maxValue(), FICurve::MeanIntensity, FICurve::MinCarrierFrequency, FICurve::MinIntensity, FICurve::MinRateSlope, RangeLoop::minValue(), RangeLoop::noCount(), DaqError::overflow(), FICurve::P, FICurve::Pause, FICurve::PeakWidth, FICurve::PlotIntensitySelection, FICurve::plotMouseEvent(), FICurve::PlotOnSSRate, RangeLoop::pos(), FICurve::PreWidth, RangeLoop::purge(), FICurve::Ramp, FICurve::RateDt, RangeLoop::reset(), FICurve::ThreshData::reset(), FICurve::ResetSilent, FICurve::resetSilentActivity(), FICurve::save(), RangeLoop::set(), FICurve::SetBest, RangeLoop::setBlockRepeat(), FICurve::SetCurves, OutData::setDelay(), DaqError::setError(), RangeLoop::setIncrement(), OutData::setIntensity(), RangeLoop::setRepeat(), RangeLoop::setSequence(), RangeLoop::setSingleRepeat(), RangeLoop::setSkipAbove(), RangeLoop::setSkipBelow(), OutData::setTrace(), FICurve::Side, FICurve::Signal, FICurve::SilentFactor, OutData::sineWave(), FICurve::SingleRepeat, RangeLoop::size(), Map< T >::size(), FICurve::SkipPause, FICurve::SkipSilentIncrement, FICurve::SlopeIntIncrement, FICurve::SSWidth, RangeLoop::step(), DaqError::success(), Session::threshCurve(), FICurve::Threshold, DaqError::underflow(), MultiPlot::unlock(), FICurve::UseBestFreq, FICurve::UseSaturation, FICurve::UseSilent, FICurve::UseThresh, FICurve::Waveform, Map< T >::x(), and Map< T >::y().

void init ( void  )
virtual

Initialize on start session.

References FICurve::ResetSilent, and FICurve::resetSilentActivity().

void plotMouseEvent ( Plot::MouseEvent me)
protectedslot
void customEvent ( QEvent *  qce)
protectedvirtual
void saveSpikes ( const string &  file,
const vector< FIData > &  results 
)
protected
void saveRates ( const string &  file,
const vector< FIData > &  results 
)
protected
void saveFICurve ( const string &  file,
const vector< FIData > &  results 
)
protected
void analyzeFICurve ( const vector< FIData > &  results,
double  minrate = 0.0 
)
protected
void setHeader ( void  )
protected
void updateSession ( const vector< FIData > &  results)
protected
void save ( const vector< FIData > &  results)
protected
void plotIntensitySelection ( void  )
protected
void plot ( const vector< FIData > &  results)
protectedvirtual
void analyze ( vector< FIData > &  results)
protectedvirtual
RePro::DoneState next ( vector< FIData > &  results,
bool  msg = true 
)
protectedvirtual
int loop ( vector< FIData > &  results)
protected
void silentActivity ( void  )
protected
void resetSilentActivity ( void  )
protected

Member Data Documentation

double MinIntensity
protected
double MaxIntensity
protected

Referenced by FICurve::FICurve(), and FICurve::main().

double IntensityStep
protected
bool UseThresh
protected

Referenced by FICurve::FICurve(), and FICurve::main().

bool UseSaturation
protected

Referenced by FICurve::FICurve(), and FICurve::main().

RangeLoop::Sequence IntShuffle
protected

Referenced by FICurve::FICurve(), and FICurve::main().

int IntIncrement
protected

Referenced by FICurve::FICurve(), and FICurve::main().

int SingleRepeat
protected
int IntBlockRepeat
protected
int IntRepeat
protected

Referenced by FICurve::FICurve(), and FICurve::main().

double CarrierFrequency
protected
bool UseBestFreq
protected

Referenced by FICurve::FICurve(), and FICurve::main().

int Waveform
protected
double Ramp
protected

Referenced by FICurve::FICurve(), and FICurve::main().

int Side
protected
double Duration
protected
double Pause
protected
bool SkipPause
protected
int SkipSilentIncrement
protected
int SlopeIntIncrement
protected
double MinRateSlope
protected
double MaxRateFrac
protected
double IntensityExtension
protected
bool UseSilent
protected
double MaxBaseRate
protected
int MaxSilent
protected
double SilentFactor
protected
int ResetSilent
protected
double RateDt
protected

Referenced by FICurve::FICurve(), and FICurve::main().

double PreWidth
protected
double PeakWidth
protected
double SSWidth
protected
bool PlotOnSSRate
protected
bool AdjustGain
protected
bool SetBest
protected
int SetCurves
protected
RangeLoop IntensityRange
protected
double Intensity
protected
OutData Signal
protected
double MeanIntensity
protected
double MinCarrierFrequency
protected

Referenced by FICurve::FICurve(), and FICurve::main().

int FICurveStops
protected

Referenced by FICurve::FICurve(), and FICurve::next().

int NSilent
protected
double SilentRate
protected
double LastSilentRate
protected
double SilentRateSq
protected
double SilentRateSD
protected
double MaxSilentRate
protected
double MaxPlotRate
protected

Referenced by FICurve::analyze(), and FICurve::main().

MultiPlot P
protected
bool PlotIntensitySelection
protected
Options Header
protected
ThreshData Threshold
protected

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