Electric Field Measurement Relacs Plugins
0.9.8
|
#include <eodtools.h>
Classes | |
class | AcceptEOD |
Public Member Functions | |
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) |
[lib] Functions for analyzing EODs of weakly electric fish.
EODTools | ( | void | ) |
double eodThreshold | ( | const InData & | data, |
double | tbegin, | ||
double | tend, | ||
double | contrast = 0.2 |
||
) |
Returns a threshold suitable for detecting EOD peaks and troughs in data in the time interval from tbegin to tend. contrast is the maximum expected contrast of an amplitude modulation or beat within this time interval.
References relacs::max(), relacs::min(), and InData::minMax().
void eodPeaks | ( | const InData & | data, |
double | tbegin, | ||
double | tend, | ||
double | threshold, | ||
EventData & | peaks | ||
) |
Detect eod peaks in data. The times of the EOD peaks are the times of the maximum data values. The sizes are the maximum of a square function fitted to the three topmost data points.
References InData::begin(), EventData::clear(), InData::end(), Detector< DataIter, TimeIter >::init(), InData::minBegin(), Detector< DataIter, TimeIter >::peak(), and EventData::reserve().
void eodTroughs | ( | const InData & | data, |
double | tbegin, | ||
double | tend, | ||
double | threshold, | ||
EventData & | troughs | ||
) |
Detect eod troughs in data. The times of the EOD troughs are the times of the minimum data values. The sizes are the minimum of a square function fitted to the three lowest data points.
References InData::begin(), EventData::clear(), InData::end(), Detector< DataIter, TimeIter >::init(), InData::minBegin(), EventData::reserve(), EventData::setSource(), and Detector< DataIter, TimeIter >::trough().
void eodPeaksTroughs | ( | const InData & | data, |
double | tbegin, | ||
double | tend, | ||
double | threshold, | ||
EventData & | peaks, | ||
EventData & | troughs | ||
) |
Detect eod peaks and troughs in data. The times of the EOD peaks/troughs are the times of the maximum/minimum data values. The sizes are the maximum/minimum of a square function fitted to the three highest/lowest data points.
References EventList::add(), InData::begin(), EventData::clear(), InData::end(), Detector< DataIter, TimeIter >::init(), InData::minBegin(), Detector< DataIter, TimeIter >::peakTrough(), EventData::reserve(), and EventData::setSource().
double meanPeaks | ( | const InData & | data, |
double | tbegin, | ||
double | tend, | ||
double | threshold | ||
) |
Mean absolute size of eod peaks.
References EventData::eventSize(), relacs::peaks(), and EventData::size().
double meanTroughs | ( | const InData & | data, |
double | tbegin, | ||
double | tend, | ||
double | threshold | ||
) |
Mean absolute size of eod troughs.
References EventData::eventSize(), EventData::size(), and relacs::troughs().
double eodAmplitude | ( | const InData & | data, |
double | tbegin, | ||
double | tend | ||
) |
Mean eod amplitude from an EOD without beat (0.5 * p-p amplitude).
References EventData::eventSize(), relacs::peaks(), EventData::size(), and relacs::troughs().
Referenced by CalibEField::analyze(), JAR::analyze(), EODDetector::autoConfigure(), CalibEField::main(), and JAR::main().
void beatAmplitudes | ( | const InData & | eodd, |
double | tbegin, | ||
double | tend, | ||
double | period, | ||
double | contrast, | ||
double & | uppermean, | ||
double & | upperampl, | ||
double & | lowermean, | ||
double & | lowerampl | ||
) |
The mean EOD amplitude and beat amplitudes of the beat of period period and expected contrast contrast determined from the standard deviation of the upper and lower EOD amplitudes. upperampl and lowerampl are 0.5*p-p amplitudes.
References relacs::floor(), EventData::meanSize(), and relacs::sqrt().
Referenced by CalibEField::analyze().
double beatAmplitude | ( | const InData & | eodd, |
double | tbegin, | ||
double | tend, | ||
double | period, | ||
double | contrast = 0.2 |
||
) |
The amplitude of the beat of period period determined from the standard deviation of EOD amplitudes (0.5 * p-p amplitude).
References relacs::floor(), and EventData::meanSize().
double beatContrast | ( | const InData & | eodd, |
double | tbegin, | ||
double | tend, | ||
double | period, | ||
double | contrast = 0.2 |
||
) |
The contrast of the beat of period period determined from the standard deviation of EOD amplitudes.
References relacs::floor(), and EventData::meanSize().
Referenced by JAR::analyze().