Basic Electrophysiology Relacs Plugins
0.9.8
|
#include <thresholdsuspikedetector.h>
Public Slots | |
void | customEvent (QEvent *qce) |
void | autoConfigure (void) |
Public Slots inherited from ConfigDialog | |
virtual void | dialog (void) |
virtual void | help (void) |
virtual void | notifyDialog (const Options &opt) |
Public Member Functions | |
ThresholdSUSpikeDetector (const string &ident="", int mode=0) | |
virtual int | init (const InData &data, EventData &outevents, const EventList &other, const EventData &stimuli) |
virtual void | readConfig (StrQueue &sq) |
virtual void | notify (void) |
virtual int | autoConfigure (const InData &data, double tbegin, double tend) |
virtual void | save (const string ¶m) |
void | save (void) |
virtual int | detect (const InData &data, EventData &outevents, const EventList &other, const EventData &stimuli) |
int | checkEvent (InData::const_iterator first, InData::const_iterator last, InData::const_iterator event, InData::const_range_iterator eventtime, InData::const_iterator index, InData::const_range_iterator indextime, InData::const_iterator prevevent, InData::const_range_iterator prevtime, EventData &outevents, double &threshold, double &minthresh, double &maxthresh, double &time, double &size, double &width) |
Public Member Functions inherited from Filter | |
Filter (const string &ident, int mode, FilterType type, int outtraces=0, const string &name="", const string &pluginset="", const string &author="unknown", const string &version="unknown", const string &date=__DATE__) | |
virtual | ~Filter (void) |
virtual int | init (const InData &indata, InData &outdata) |
virtual int | init (const InList &indata, InList &outdata) |
virtual int | init (const EventData &inevents, InData &outdata) |
virtual int | init (const EventList &inevents, InList &outdata) |
virtual int | init (const InList &indata, EventList &outevents, const EventList &other, const EventData &stimuli) |
virtual int | init (const EventData &inevents, EventData &outevents, const EventList &other, const EventData &stimuli) |
virtual int | init (const EventList &inevents, EventList &outevents, const EventList &other, const EventData &stimuli) |
virtual int | adjust (const InData &indata, InData &outdata) |
virtual int | adjust (const InList &indata, InList &outdata) |
virtual int | adjust (const EventData &inevents, InData &outdata) |
virtual int | adjust (const EventList &inevents, InList &outdata) |
virtual int | adjust (const InData &indata) |
virtual int | adjust (const InList &indata) |
virtual int | adjust (const EventData &inevents) |
virtual int | adjust (const EventList &inevents) |
virtual int | autoConfigure (const InList &indata, double tbegin, double tend) |
virtual int | autoConfigure (const EventData &inevents, double tbegin, double tend) |
virtual int | autoConfigure (const EventList &inevents, double tbegin, double tend) |
virtual int | filter (const InData &indata, InData &outdata) |
virtual int | filter (const InList &indata, InList &outdata) |
virtual int | filter (const EventData &inevents, InData &outdata) |
virtual int | filter (const EventList &inevents, InList &outdata) |
virtual int | detect (const InList &data, EventList &outevents, const EventList &other, const EventData &stimuli) |
virtual int | detect (const EventData &inevents, EventData &outevents, const EventList &other, const EventData &stimuli) |
virtual int | detect (const EventList &inevents, EventList &outevents, const EventList &other, const EventData &stimuli) |
void | save (void) |
const string & | ident (void) const |
virtual void | setIdent (const string &ident) |
virtual void | setName (const string &name) |
FilterType | type (void) const |
int | outTraces (void) const |
int | mode (void) const |
void | setMode (int mode) |
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 |
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 OptWidget * | dialogOptions (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 | saveConfig (ofstream &str) |
virtual int | configSize (void) const |
virtual void | config (void) |
virtual void | preConfig (void) |
Protected Attributes | |
Detector < InData::const_iterator, InDataTimeIterator > | D |
double | Threshold |
bool | Peaks |
bool | TestMaxSize |
double | MaxSize |
bool | TestSymmetry |
double | MaxSymmetry |
double | MinSymmetry |
bool | TestInterval |
double | MinInterval |
double | NoSpikeInterval |
bool | StimulusRequired |
double | SnippetsTime |
double | SnippetsWidth |
double | SnippetsSymmetry |
bool | LogHistogram |
double | UpdateTime |
double | HistoryTime |
double | SizeResolution |
OptWidget | SDW |
long | LastSize |
double | LastTime |
double | StimulusEnd |
double | IntervalStart |
double | IntervalEnd |
double | IntervalWidth |
QTime | Update |
Plot * | SP |
Plot * | HP |
SampleDataD | GoodSpikesHist |
SampleDataD | BadSpikesHist |
SampleDataD | AllSpikesHist |
string | Unit |
Protected Attributes inherited from ConfigDialog | |
Options | DialogOptions |
Static Protected Attributes | |
static const int | UpdateFlag = 8192 |
Additional Inherited Members | |
Public Types inherited from Filter | |
enum | FilterType |
Public Types inherited from ConfigClass | |
enum | Action |
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) |
Protected Member Functions inherited from ConfigDialog | |
void | setDialogOpen (bool open=true) |
void | setHelpOpen (bool open=true) |
[Detector] Spike detection based on an absolute voltage threshold.
Detector
threshold=1mV
: Detection threshold (number
)peaks=true:
Detect peaks (boolean
)testmaxsize=false:
Use maximum size (boolean
)maxsize=1mV
: Maximum size (number
)testmaxsymmetry=false:
Use maximum symmetry (boolean
)maxsymmetry=1
: Maximum symmetry (number
)testisi=false:
Test interspike interval (boolean
)minisi=1ms
: Minimum interspike interval (number
)Indicators
nospike=100ms
: Interval for no spike (number
)considerstimulus=false:
Expect spikes during stimuli only (boolean
)resolution=0.5mV
: Resolution of spike size (number
)log=false:
Logarithmic histograms (boolean
)update=1sec
: Update time interval (number
)snippetstime=1sec
: Spike snippets shown from the last (number
)snippetswidth=1ms
: Width of spike snippet (number
)snippetssymmetry=0.1
: Symmetry threshold for spike snippets (number
)history=10sec
: Maximum history time (number
)rate=100Hz
: Rate (number
)size=100mV
: Spike size (number
) ThresholdSUSpikeDetector | ( | const string & | ident = "" , |
int | mode = 0 |
||
) |
References OptWidget::assign(), ThresholdSUSpikeDetector::autoConfigure(), ConfigDialog::dialog(), ThresholdSUSpikeDetector::HistoryTime, ThresholdSUSpikeDetector::HP, ThresholdSUSpikeDetector::LastSize, ThresholdSUSpikeDetector::LastTime, Plot::lock(), ThresholdSUSpikeDetector::LogHistogram, ThresholdSUSpikeDetector::MaxSize, ThresholdSUSpikeDetector::MaxSymmetry, ThresholdSUSpikeDetector::MinInterval, ThresholdSUSpikeDetector::MinSymmetry, ConfigDialog::mutex(), Plot::noGrid(), ThresholdSUSpikeDetector::NoSpikeInterval, ThresholdSUSpikeDetector::Peaks, ThresholdSUSpikeDetector::SDW, Plot::setBMarg(), ConfigClass::setConfigSelectMask(), ConfigDialog::setDialogSelectMask(), Plot::setLMarg(), OptWidget::setMargins(), Plot::setRMarg(), Plot::setTMarg(), OptWidget::setVerticalSpacing(), Plot::setXLabel(), Plot::setXLabelPos(), Plot::setXRange(), Plot::setXTics(), Plot::setYLabel(), Plot::setYRange(), ThresholdSUSpikeDetector::SizeResolution, ThresholdSUSpikeDetector::SnippetsSymmetry, ThresholdSUSpikeDetector::SnippetsTime, ThresholdSUSpikeDetector::SnippetsWidth, ThresholdSUSpikeDetector::SP, ThresholdSUSpikeDetector::StimulusRequired, ThresholdSUSpikeDetector::TestInterval, ThresholdSUSpikeDetector::TestMaxSize, ThresholdSUSpikeDetector::TestSymmetry, ThresholdSUSpikeDetector::Threshold, ThresholdSUSpikeDetector::Unit, Plot::unlock(), ThresholdSUSpikeDetector::Update, and ThresholdSUSpikeDetector::UpdateTime.
|
virtual |
Reimplemented from Filter.
References InData::begin(), ThresholdSUSpikeDetector::D, InData::end(), ThresholdSUSpikeDetector::HistoryTime, ThresholdSUSpikeDetector::HP, Detector< DataIter, TimeIter >::init(), ThresholdSUSpikeDetector::IntervalEnd, ThresholdSUSpikeDetector::IntervalStart, ThresholdSUSpikeDetector::IntervalWidth, ThresholdSUSpikeDetector::LastTime, Plot::lock(), ThresholdSUSpikeDetector::notify(), ThresholdSUSpikeDetector::SDW, Detector< DataIter, TimeIter >::setHistorySize(), EventData::setSizeFormat(), EventData::setSizeScale(), EventData::setSizeUnit(), EventData::setWidthFormat(), EventData::setWidthScale(), EventData::setWidthUnit(), Plot::setXLabel(), Plot::setYLabel(), Plot::setYRange(), ThresholdSUSpikeDetector::StimulusEnd, InData::timeBegin(), InData::unit(), ThresholdSUSpikeDetector::Unit, Plot::unlock(), OptWidget::updateSettings(), and OptWidget::updateValues().
|
virtual |
Reimplemented from ConfigClass.
|
virtual |
References ThresholdSUSpikeDetector::AllSpikesHist, ThresholdSUSpikeDetector::BadSpikesHist, ThresholdSUSpikeDetector::D, Parameter::flags(), floor(), ThresholdSUSpikeDetector::GoodSpikesHist, ThresholdSUSpikeDetector::HistoryTime, Plot::lock(), ThresholdSUSpikeDetector::LogHistogram, max(), ThresholdSUSpikeDetector::MaxSize, ThresholdSUSpikeDetector::MaxSymmetry, ThresholdSUSpikeDetector::MinInterval, ThresholdSUSpikeDetector::MinSymmetry, ThresholdSUSpikeDetector::NoSpikeInterval, Parameter::number(), ThresholdSUSpikeDetector::Peaks, ThresholdSUSpikeDetector::SDW, Detector< DataIter, TimeIter >::setHistorySize(), Plot::setXRange(), ThresholdSUSpikeDetector::SizeResolution, ThresholdSUSpikeDetector::SnippetsSymmetry, ThresholdSUSpikeDetector::SnippetsTime, ThresholdSUSpikeDetector::SnippetsWidth, ThresholdSUSpikeDetector::SP, ThresholdSUSpikeDetector::StimulusRequired, ThresholdSUSpikeDetector::TestInterval, ThresholdSUSpikeDetector::TestMaxSize, ThresholdSUSpikeDetector::TestSymmetry, ThresholdSUSpikeDetector::Threshold, ThresholdSUSpikeDetector::Unit, Plot::unlock(), OptWidget::updateSettings(), ThresholdSUSpikeDetector::UpdateTime, and OptWidget::updateValues().
Referenced by ThresholdSUSpikeDetector::init().
|
virtual |
Reimplemented from Filter.
References ThresholdSUSpikeDetector::autoConfigure().
|
virtual |
Reimplemented from Filter.
References ThresholdSUSpikeDetector::save().
void save | ( | void | ) |
References TableKey::addNumber(), ThresholdSUSpikeDetector::AllSpikesHist, ThresholdSUSpikeDetector::BadSpikesHist, ThresholdSUSpikeDetector::GoodSpikesHist, Filter::ident(), ConfigDialog::lock(), max(), ConfigDialog::name(), SampleData< T >::pos(), TableKey::save(), TableKey::saveKey(), SampleData< T >::size(), ThresholdSUSpikeDetector::Unit, and ConfigDialog::unlock().
Referenced by ThresholdSUSpikeDetector::save().
|
virtual |
Detect spikes in a single trace of the analog data data.
Reimplemented from Filter.
References ThresholdSUSpikeDetector::AllSpikesHist, Array< T >::back(), EventData::back(), EventData::backWidth(), Detector< DataIter, TimeIter >::badEvents(), ThresholdSUSpikeDetector::BadSpikesHist, ceil(), Plot::clear(), InData::copy(), EventData::count(), ThresholdSUSpikeDetector::D, Plot::draw(), InData::end(), Detector< DataIter, TimeIter >::goodEvents(), ThresholdSUSpikeDetector::GoodSpikesHist, ThresholdSUSpikeDetector::HistoryTime, ThresholdSUSpikeDetector::HP, InData::index(), ThresholdSUSpikeDetector::IntervalEnd, ThresholdSUSpikeDetector::IntervalStart, ThresholdSUSpikeDetector::IntervalWidth, ThresholdSUSpikeDetector::LastSize, ThresholdSUSpikeDetector::LastTime, Plot::lock(), EventData::meanRate(), EventData::meanSize(), InData::minBegin(), InData::minIndex(), InData::minTime(), ThresholdSUSpikeDetector::NoSpikeInterval, Detector< DataIter, TimeIter >::peakHist(), ThresholdSUSpikeDetector::Peaks, Plot::plot(), Plot::plotVLine(), InData::pos(), Array< T >::push(), Array< T >::reserve(), ThresholdSUSpikeDetector::SDW, InData::size(), EventData::size(), EventData::sizeHist(), ThresholdSUSpikeDetector::SnippetsSymmetry, ThresholdSUSpikeDetector::SnippetsTime, ThresholdSUSpikeDetector::SnippetsWidth, ThresholdSUSpikeDetector::SP, InData::stepsize(), ThresholdSUSpikeDetector::StimulusEnd, ThresholdSUSpikeDetector::StimulusRequired, ThresholdSUSpikeDetector::Threshold, Detector< DataIter, TimeIter >::troughHist(), ThresholdSUSpikeDetector::Unit, Plot::unlock(), ThresholdSUSpikeDetector::Update, EventData::updateMean(), ThresholdSUSpikeDetector::UpdateTime, and OptWidget::updateValues().
int checkEvent | ( | InData::const_iterator | first, |
InData::const_iterator | last, | ||
InData::const_iterator | event, | ||
InData::const_range_iterator | eventtime, | ||
InData::const_iterator | index, | ||
InData::const_range_iterator | indextime, | ||
InData::const_iterator | prevevent, | ||
InData::const_range_iterator | prevtime, | ||
EventData & | outevents, | ||
double & | threshold, | ||
double & | minthresh, | ||
double & | maxthresh, | ||
double & | time, | ||
double & | size, | ||
double & | width | ||
) |
Returns 1: this is an event, 0: this is not an event, -1: resume next time at lastindex. Update the threshold threshold. After each call of checkEvent() the threshold is bounded to minthresh and maxthresh.
References EventData::back(), ThresholdSUSpikeDetector::MaxSize, ThresholdSUSpikeDetector::MaxSymmetry, ThresholdSUSpikeDetector::MinInterval, ThresholdSUSpikeDetector::MinSymmetry, ThresholdSUSpikeDetector::Peaks, EventData::size(), ThresholdSUSpikeDetector::TestInterval, ThresholdSUSpikeDetector::TestMaxSize, and ThresholdSUSpikeDetector::TestSymmetry.
|
slot |
References OptWidget::assign(), ConfigDialog::mutex(), and ThresholdSUSpikeDetector::SDW.
|
slot |
References ThresholdSUSpikeDetector::AllSpikesHist, ThresholdSUSpikeDetector::Peaks, SampleData< T >::pos(), ThresholdSUSpikeDetector::SDW, SampleData< T >::size(), ThresholdSUSpikeDetector::Threshold, ThresholdSUSpikeDetector::Unit, and OptWidget::updateValues().
Referenced by ThresholdSUSpikeDetector::autoConfigure(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
|
protected |
The threshold for detecting peaks.
Referenced by ThresholdSUSpikeDetector::autoConfigure(), ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Detect peaks (true) or troughs (false ).
Referenced by ThresholdSUSpikeDetector::autoConfigure(), ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
True if MaxSize is used.
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
The maximum size of a spike.
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
True if MaxSymmetry and MinSymmetry are used.
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
The maximum symmetry.
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
The minimum symmetry.
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Test interspike interval?
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Minimum interspike interval.
Referenced by ThresholdSUSpikeDetector::checkEvent(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
If no spikes are detected, update statistic assuming that a single spike did not occur within NoSpikeInterval.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
True if spikes are expected during stimuli only.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Time from which spike snippets are plotted.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Width of spike snippets.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Threshold for symmetry of spike snippets.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Plot histogram logarithmically.
Referenced by ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Update time for histograms and indicators.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Maximum time for history spike events.
Referenced by ThresholdSUSpikeDetector::detect(), ThresholdSUSpikeDetector::init(), ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
Resolution of spike sizes and thresholds.
Referenced by ThresholdSUSpikeDetector::notify(), and ThresholdSUSpikeDetector::ThresholdSUSpikeDetector().
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
Referenced by ThresholdSUSpikeDetector::detect(), and ThresholdSUSpikeDetector::init().
|
protected |
Referenced by ThresholdSUSpikeDetector::detect(), and ThresholdSUSpikeDetector::init().
|
protected |
Referenced by ThresholdSUSpikeDetector::detect(), and ThresholdSUSpikeDetector::init().
|
protected |
Referenced by ThresholdSUSpikeDetector::detect(), and ThresholdSUSpikeDetector::init().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |