Patch-clamp Relacs Plugins  0.9.8
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SingleStimulus Class Reference

#include <singlestimulus.h>

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

Public Member Functions

 SingleStimulus (void)
 
 ~SingleStimulus (void)
 
virtual void preConfig (void)
 
virtual void notify (void)
 
virtual int main (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)
 

Protected Types

enum  WaveForms {
  File =0, Const, Sine, Rectangular,
  Triangular, Sawup, Sawdown, Alpha,
  Whitenoise, OUnoise, Sweep
}
 
enum  StoreModes { SessionPath, ReProPath, CustomPath }
 
enum  StoreLevels { All, Generated, Noise, None }
 

Protected Member Functions

void openTraceFile (ofstream &tf, TableKey &tracekey, const Options &header)
 
void saveTrace (ofstream &tf, TableKey &tracekey, int index, const SampleDataF &voltage, const SampleDataF &current)
 
void saveMeanTrace (Options &header, TableKey &tracekey, const SampleDataF &meanvoltage, const SampleDataF &meancurrent)
 
void saveSpikes (Options &header, const EventList &spikes)
 
void saveRate (Options &header, const SampleDataD &rate, double sigma)
 
void plot (const EventList &spikes, const SampleDataD &rate, const OutData &signal, const SampleDataF &voltage, const SampleDataF &meanvoltage, double meanrate, double cvrate, double duration, int repeats)
 
void analyze (EventList &spikes, SampleDataD &rate, double &meanrate, double &cvrate, double duration, double skipwin, double sigma, double before, double after)
 
int createStimulus (OutData &signal, const Str &file, double &duration, double deltat, double ramp, double cycleramp, double skipwin, bool storesignal)
 
void customEvent (QEvent *qce)
 
- Protected Member Functions inherited from ConfigDialog
void setDialogOpen (bool open=true)
 
void setHelpOpen (bool open=true)
 

Protected Attributes

string VUnit
 
string IUnit
 
double IInFac
 
double Amplitude
 
double PeakAmplitude
 
double PeakAmplitudeFac
 
WaveForms WaveForm
 
double Frequency
 
double PulseDuration
 
double DutyCycle
 
double Tau
 
int Seed
 
double StartFreq
 
double EndFreq
 
double Offset
 
string StimulusLabel
 
StoreLevels StoreLevel
 
Str StorePath
 
Str StoreFile
 
MultiPlot SP
 
MultiPlot P
 
QStackedLayout * Stack
 
- 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)
 
- Protected Slots inherited from ConfigDialog
void notificationFromDialog (const Parameter &p)
 
virtual void dClosed (int r)
 
virtual void hClosed (int r)
 

Detailed Description

[RePro] Output of a single stimulus stored in a file.

Author
Jan Benda
Version
1.8 (Feb 26, 2015)
Options
  • Waveform
    • waveform=From file: Stimulus waveform (string)
    • stimfile=: Stimulus file (string)
    • stimampl=0: Amplitude factor (standard deviation) of stimulus file (number)
    • amplitude=1nA: Amplitude of stimulus (number)
    • freqsel=frequency: Specify (string)
    • freq=10Hz: Frequency of waveform (number)
    • period=100ms: Period of waveform (number)
    • numperiods=1: Number of periods (number)
    • pulsesel=pulse duration: Specify (string)
    • pulseduration=10ms: Pulse duration (number)
    • dutycycle=50%: Duty-cycle (number)
    • tau=1000ms: Time-constant (number)
    • seed=0: Seed for random number generation (integer)
    • startfreq=1Hz: Start sweep with frequency (number)
    • endfreq=100Hz: End sweep with frequency (number)
    • cycleramp=0ms: Ramp for each cycle (number)
    • duration=1000ms: Maximum duration of stimulus (number)
    • ramp=0ms: Ramp for stimulus onset and offset (number)
  • Stimulus
    • offset=0nA: Stimulus mean (number)
    • offsetbase=absolute: Stimulus mean relative to (string)
    • samerate=true: Use sampling rate of input (boolean)
    • samplerate=1kHz: Sampling rate of output (number)
    • repeats=10times: Number of stimulus presentations (number)
    • pause=1000ms: Duration of pause between stimuli (number)
    • before=100ms: Time before stimulus to be analyzed (number)
    • after=100ms: Time after stimulus to be analyzed (number)
    • outtrace=Current-1: Output trace (string)
  • Offset - search
    • userate=false: Search offset for target firing rate (boolean)
    • rate=100Hz: Target firing rate (number)
    • ratetol=5Hz: Tolerance for target firing rate (number)
    • offsetstep=8nA: Initial offset step (number)
    • searchrepeats=2times: Number of search stimulus presentations (number)
    • silentrate=0Hz: Ignore response below (number)
    • maxsilent=1: Number of stimulus presentations if response is below silentrate (integer)
    • skippause=true: Skip pause if response is below silentrate (boolean)
    • maxsearch=1intensities: Stop search if response does not change for more than (integer)
    • method=Bisect: Method (string)
    • minslope=4Hz/nA: Minimum slope required for interpolation (number)
    • searchduration=0ms: Maximum duration of stimulus (number)
    • searchpause=0ms: Duration of pause between stimuli (number)
  • Analysis
    • skipwin=100ms: Initial portion of stimulus not used for analysis (number)
    • sigma=10ms: Standard deviation of rate smoothing kernel (number)
    • storevoltage=true: Save voltage trace (boolean)
    • plot=Current voltage trace: Plot shows (string)
    • Save stimuli
      • storemode=session: Save stimuli in (string)
      • storepath=: Save stimuli in custom directory (string)
      • storelevel=all: Save (string)

Member Enumeration Documentation

enum WaveForms
protected
Enumerator
File 
Const 
Sine 
Rectangular 
Triangular 
Sawup 
Sawdown 
Alpha 
Whitenoise 
OUnoise 
Sweep 
enum StoreModes
protected
Enumerator
SessionPath 
ReProPath 
CustomPath 
enum StoreLevels
protected
Enumerator
All 
Generated 
Noise 
None 

Constructor & Destructor Documentation

SingleStimulus ( void  )
~SingleStimulus ( void  )

Destructor.

Member Function Documentation

void preConfig ( void  )
virtual
void notify ( void  )
virtual

References SingleStimulus::IUnit.

int main ( void  )
virtual

Implements RePro.

References SingleStimulus::Amplitude, SingleStimulus::analyze(), OutData::back(), EventList::back(), MultiPlot::clear(), MultiPlot::clearPlots(), OutData::constWave(), SampleData< T >::copy(), SingleStimulus::createStimulus(), SingleStimulus::CustomPath, MultiPlot::draw(), SingleStimulus::DutyCycle, Str::empty(), SingleStimulus::EndFreq, DaqError::error(), DaqError::errorText(), DaqError::failed(), SingleStimulus::Frequency, Map< T >::insert(), SingleStimulus::IUnit, MultiPlot::lock(), OutData::maxSampleRate(), SingleStimulus::Offset, SingleStimulus::openTraceFile(), SingleStimulus::OUnoise, DaqError::overflow(), SingleStimulus::P, SingleStimulus::PeakAmplitude, SingleStimulus::PeakAmplitudeFac, SingleStimulus::plot(), Str::provideSlash(), SingleStimulus::PulseDuration, EventList::push(), Map< T >::push(), EventData::rate(), EventList::rate(), SingleStimulus::ReProPath, Map< T >::reserve(), SampleData< T >::resize(), SingleStimulus::saveMeanTrace(), SingleStimulus::saveRate(), SingleStimulus::saveSpikes(), SingleStimulus::saveTrace(), SingleStimulus::Seed, SingleStimulus::SessionPath, OutData::setIdent(), OutData::setTrace(), EventList::size(), Map< T >::size(), SampleData< T >::size(), SingleStimulus::SP, SingleStimulus::StartFreq, SingleStimulus::StimulusLabel, SingleStimulus::StoreFile, SingleStimulus::StoreLevel, SingleStimulus::StorePath, DaqError::success(), SingleStimulus::Tau, DaqError::underflow(), MultiPlot::unlock(), SingleStimulus::VUnit, SingleStimulus::WaveForm, Map< T >::x(), and Map< T >::y().

void openTraceFile ( ofstream &  tf,
TableKey tracekey,
const Options header 
)
protected
void saveTrace ( ofstream &  tf,
TableKey tracekey,
int  index,
const SampleDataF voltage,
const SampleDataF current 
)
protected
void saveMeanTrace ( Options header,
TableKey tracekey,
const SampleDataF meanvoltage,
const SampleDataF meancurrent 
)
protected
void saveSpikes ( Options header,
const EventList spikes 
)
protected
void saveRate ( Options header,
const SampleDataD rate,
double  sigma 
)
protected
void plot ( const EventList spikes,
const SampleDataD rate,
const OutData signal,
const SampleDataF voltage,
const SampleDataF meanvoltage,
double  meanrate,
double  cvrate,
double  duration,
int  repeats 
)
protected
void analyze ( EventList spikes,
SampleDataD rate,
double &  meanrate,
double &  cvrate,
double  duration,
double  skipwin,
double  sigma,
double  before,
double  after 
)
protected
int createStimulus ( OutData signal,
const Str file,
double &  duration,
double  deltat,
double  ramp,
double  cycleramp,
double  skipwin,
bool  storesignal 
)
protected
void customEvent ( QEvent *  qce)
protected

Member Data Documentation

string VUnit
protected
string IUnit
protected
double IInFac
protected
double Amplitude
protected
double PeakAmplitude
protected
double PeakAmplitudeFac
protected
WaveForms WaveForm
protected
double Frequency
protected
double PulseDuration
protected
double DutyCycle
protected
double Tau
protected
int Seed
protected
double StartFreq
protected
double EndFreq
protected
double Offset
protected
string StimulusLabel
protected
StoreLevels StoreLevel
protected
Str StorePath
protected
Str StoreFile
protected
MultiPlot SP
protected
MultiPlot P
protected
QStackedLayout* Stack
protected

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