|
| EODDetector (const string &ident="", int mode=0) |
|
| ~EODDetector (void) |
|
virtual int | init (const InData &data, EventData &outevents, const EventList &other, const EventData &stimuli) |
|
virtual void | notify (void) |
|
virtual int | adjust (const InData &data) |
|
virtual int | autoConfigure (const InData &data, double tbegin, double tend) |
|
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) |
|
| 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 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) |
|
virtual void | save (const string ¶m) |
|
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) |
|
| 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) |
|
| 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) |
|
| EODTools (void) |
|
double | eodThreshold (const InData &data, double tbegin, double tend, double contrast=0.2) |
|
void | eodPeaks (const InData &data, double tbegin, double tend, double threshold, EventData &peaks) |
|
void | eodTroughs (const InData &data, double tbegin, double tend, double threshold, EventData &troughs) |
|
void | eodPeaksTroughs (const InData &data, double tbegin, double tend, double threshold, EventData &peaks, EventData &troughs) |
|
double | meanPeaks (const InData &data, double tbegin, double tend, double threshold) |
|
double | meanTroughs (const InData &data, double tbegin, double tend, double threshold) |
|
double | eodAmplitude (const InData &data, double tbegin, double tend) |
|
void | beatAmplitudes (const InData &eodd, double tbegin, double tend, double period, double contrast, double &uppermean, double &upperampl, double &lowermean, double &lowerampl) |
|
double | beatAmplitude (const InData &eodd, double tbegin, double tend, double period, double contrast=0.2) |
|
double | beatContrast (const InData &eodd, double tbegin, double tend, double period, double contrast=0.2) |
|
[Detector] A detector for EOD cycles of weakly electric fish
- Author
- Jan Benda
- Version
- 1.7 (Feb 3, 2013)
Detects each cycle of a periodic input waveform, like the EOD of a wave-type weakly electric fish.
The threshold defines the minimum distance between peaks and troughs that are detected. If adapt is set to true
, then the threshold is set automatically to ratio times the two-fold size of the EOD amplitude. Once a peak is detected the time of the EOD cycles is computed as the threshold crossing time of a voltage level that is at zeroratio times the peak-to-peak amplitude below the peak. You can select from four methods to determine the exact threshold crossing time (interpolation):
closest
datapoint
takes the time of the the data point right before the threshold crossing.
linear
interpolation
takes the time of a linear interpolation between the two data points directly below and above the threshold crossing.
linear
fit
and quadratic
fit
fit a line or a parabola to the region determined by fitwin and compute from the fit the threshold crossing time.
For computing the size (amplitude, half of the peak-to-peak amplitude) of the EOD a parabola is fitted to the three data points around the peak and the peak of this parabula is used as the peak size. If filtertau is greater than zero the the EOD waveform is low-pass filtered with this time constant and this mean value is subtracted from the peak size to result in the desired amplitude.
- Input
- A single voltage trace of the periodic input waveform
- Output
- The times of the EOD peaks and their amplitude.
- Options
threshold=1mV
: Threshold (number
)
adapt=false:
Adapt threshold (boolean
)
ratio=50%
: Ratio (number
)
autoratio=50%
: Auto sets threshold relative to EOD peak-to-peak amplitude (number
)
maxperiod=100ms
: Maximum EOD period for analyzing (number
)
filtertau=100ms
: Filter time constant (number
)
zeroratio=25%
: Time is computed from threshold crossing by ratio of peak-to-peak amplitude below peak (number
)
interpolation=linear
interpolation: Method for threshold-crossing time (string
)
fitwin=40%
: Fraction between threshold crossing and peak used for fit (number
)
- Auto Button
- Clicking on the "Auto" button sets the threshold to
autoratio
of the peak-to-peak amplitude.