Electric Field Measurement Relacs Plugins
0.9.8
|
#include <jar.h>
Public Member Functions | |
JAR (void) | |
virtual int | main (void) |
virtual void | sessionStarted (void) |
virtual void | sessionStopped (bool saved) |
void | save (void) |
void | saveJAR (const Options &header) |
void | saveMeanJAR (const Options &header) |
void | saveEOD (const Options &header) |
void | saveTrace (void) |
void | saveEODFreq (const Options &header) |
void | saveChirps (const Options &header) |
void | saveChirpTraces (const Options &header) |
void | saveChirpEOD (const Options &header) |
void | reset (bool saved) |
void | plot (void) |
void | analyze (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 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 | 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 Traces | |
Traces (void) | |
Public Member Functions inherited from StandardTraces | |
StandardTraces (void) | |
Public Member Functions inherited from EODTools | |
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) |
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 Public Member Functions inherited from Traces | |
static void | initialize (const RELACSPlugin *rp, const InList &data, const EventList &events) |
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) |
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) |
Protected Attributes inherited from ConfigDialog | |
Options | DialogOptions |
Static Protected Attributes inherited from Traces | |
static int | EODTrace = -1 |
static int | EODEvents = -1 |
static int | ChirpEvents = -1 |
static int | LocalEODTraces = 0 |
static int | LocalEODTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | LocalEODEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | LocalChirpEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | LocalBeatPeakEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | LocalBeatTroughEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | FishEODTanks = 0 |
static int | FishEODTraces [MaxTraces] = { 0, 0, 0, 0 } |
static int | FishEODTrace [MaxTraces][MaxTraces] = { { -1, -1, -1, -1 }, { -1, -1, -1, -1 } } |
static int | FishEODEvents [MaxTraces][MaxTraces] = { { -1, -1, -1, -1 }, { -1, -1, -1, -1 } } |
static int | FishChirpEvents [MaxTraces][MaxTraces] = { { -1, -1, -1, -1 }, { -1, -1, -1, -1 } } |
static int | GlobalEField = -1 |
static int | GlobalAMEField = -1 |
static int | LocalEFields = 0 |
static int | LocalEField [MaxTraces] = { -1, -1, -1, -1 } |
static int | LocalAMEFields = 0 |
static int | LocalAMEField [MaxTraces] = { -1, -1, -1, -1 } |
static int | FishEFields = 0 |
static int | FishEField [MaxTraces] = { -1, -1, -1, -1 } |
static int | EFields = 0 |
static int | EField [2 *MaxTraces] = { -1, -1, -1, -1 } |
static int | GlobalEFieldTrace = -1 |
static int | GlobalEFieldEvents = -1 |
static int | LocalEFieldTraces = 0 |
static int | LocalEFieldTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | LocalEFieldEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | FishEFieldTraces = 0 |
static int | FishEFieldTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | FishEFieldEvents [MaxTraces] = { -1, -1, -1, -1 } |
Static Protected Attributes inherited from StandardTraces | |
static const int | MaxTraces |
[RePro] Measure the fishes jamming avoidance response and chirp characteristics at different delta f's and beat contrasts.
duration=10seconds
: Signal duration (number
)pause=20seconds
: Pause between signals (number
)ramp=0.5seconds
: Duration of linear ramp (number
)deltafstep=2Hz
: Delta f steps (number
)deltafmax=12Hz
: Maximum delta f (number
)deltafmin=-12Hz
: Minimum delta f (number
)deltafrange=
: Range of delta f's (string
)amplsel=contrast:
Stimulus amplitude (string
)contrastmax=20%
: Maximum contrast (number
)contrastmin=10%
: Minimum contrast (number
)contraststep=10%
: Contrast steps (number
)amplmin=1mV/cm
: Minimum amplitude (number
)amplmax=2mV/cm
: Maximum amplitude (number
)amplstep=1mV/cm
: Amplitude steps (number
)repeats=200
: Repeats (integer
)genstim=true:
Generate stimulus (boolean
)sinewave=false:
Use sine wave (boolean
)file=
: Stimulus file (string
)sigstdev=1
: Standard deviation of signal (number
)warpfile=false:
Warp stimulus file to the requested Delta fs (boolean
)before=1seconds
: Time before stimulation to be analyzed (number
)after=5seconds
: Time after stimulation to be analyzed (number
)savetraces=true:
Save traces during pause (boolean
)jaraverage=500ms
: Time for measuring EOD rate (number
)chirpaverage=20ms
: Time for measuring chirp data (number
)eodsavetime=1000ms
: Duration of EOD to be saved (number
)EODTrace1
) and events (EODEvents1
).EODTrace2
) and events (EODEvents2
).SignalEvents1
). JAR | ( | void | ) |
|
virtual |
Implements RePro.
References JAR::analyze(), Array< T >::assign(), RangeLoop::blockRepeat(), DaqError::busy(), OutData::clear(), RangeLoop::clear(), Map< T >::clear(), EventData::clear(), MultiPlot::clearPlots(), MultiPlot::draw(), OutData::duration(), OutData::empty(), EODTools::eodAmplitude(), Traces::EODEvents, Traces::EODTrace, DaqError::error(), DaqError::errorText(), Str::expandPath(), DaqError::failed(), OutData::fixSample(), floor(), Traces::GlobalEField, OutData::indices(), OutData::intensity(), OutData::length(), OutData::load(), Traces::LocalBeatPeakEvents, Traces::LocalEODEvents, Traces::LocalEODTrace, MultiPlot::lock(), OutData::maximize(), RangeLoop::maxValue(), RangeLoop::minValue(), Str::name(), DaqError::OverflowUnderrun, JAR::plot(), OutData::ramp(), RangeLoop::remainingBlockCount(), OutData::repeat(), RangeLoop::reset(), OutData::resize(), JAR::save(), JAR::saveTrace(), RangeLoop::set(), OutData::setCarrierFreq(), OutData::setDelay(), OutData::setIdent(), OutData::setIntensity(), OutData::setPriority(), OutData::setSampleRate(), RangeLoop::setSequence(), OutData::setStartSource(), OutData::setTrace(), OutData::sineWave(), RangeLoop::singleRepeat(), RangeLoop::size(), Array< T >::size(), OutData::size(), and MultiPlot::unlock().
|
virtual |
|
virtual |
void save | ( | void | ) |
Save results data.
References JAR::saveEOD(), JAR::saveJAR(), and JAR::saveMeanJAR().
Referenced by JAR::main().
void saveJAR | ( | const Options & | header | ) |
Save JAR for each stimulus.
References TableKey::addNumber(), TableKey::newSection(), TableKey::save(), TableKey::saveKey(), sqrt(), and RangeLoop::value().
Referenced by JAR::save().
void saveMeanJAR | ( | const Options & | header | ) |
Save mean JAR for each delta f.
References TableKey::addNumber(), TableKey::newSection(), TableKey::save(), TableKey::saveKey(), sqrt(), and RangeLoop::value().
Referenced by JAR::save().
void saveEOD | ( | const Options & | header | ) |
Save EOD stimulus.
References TableKey::addNumber(), Traces::EODTrace, TableKey::save(), and TableKey::saveKey().
Referenced by JAR::save().
void saveTrace | ( | void | ) |
Save trace data.
References JAR::saveChirpEOD(), JAR::saveChirps(), JAR::saveChirpTraces(), and JAR::saveEODFreq().
Referenced by JAR::main().
void saveEODFreq | ( | const Options & | header | ) |
Save EOD frequency and amplitude.
References TableKey::addNumber(), TableKey::save(), TableKey::saveKey(), Map< T >::size(), Map< T >::x(), and Map< T >::y().
Referenced by JAR::saveTrace().
void saveChirps | ( | const Options & | header | ) |
Save chirp parameter.
References TableKey::addNumber(), TableKey::newSection(), TableKey::save(), and TableKey::saveKey().
Referenced by JAR::saveTrace().
void saveChirpTraces | ( | const Options & | header | ) |
Save chirp frequency, amplitude and phase traces.
References TableKey::addNumber(), TableKey::save(), TableKey::saveKey(), Map< T >::size(), Map< T >::x(), and Map< T >::y().
Referenced by JAR::saveTrace().
void saveChirpEOD | ( | const Options & | header | ) |
Save the EOD around each chirp.
References TableKey::addNumber(), Traces::EODEvents, Traces::EODTrace, TableKey::save(), and TableKey::saveKey().
Referenced by JAR::saveTrace().
void reset | ( | bool | saved | ) |
void plot | ( | void | ) |
Plot data.
References MultiPlot::clear(), Map< T >::clear(), MultiPlot::draw(), MultiPlot::lock(), Str::name(), RangeLoop::pos(), Map< T >::push(), Map< T >::reserve(), Map< T >::resize(), Map< T >::size(), RangeLoop::size(), MultiPlot::unlock(), RangeLoop::value(), Map< T >::x(), and Map< T >::y().
Referenced by JAR::main().
void analyze | ( | void | ) |
Analyze data.
References EventData::assign(), EventData::back(), EODTools::beatContrast(), EventData::begin(), ceil(), Traces::ChirpEvents, EventData::clear(), Map< T >::clear(), EventData::end(), EODTools::eodAmplitude(), Traces::EODEvents, Traces::EODTrace, EventData::eventSize(), EventData::eventWidth(), floor(), EventData::frequency(), Traces::GlobalEFieldEvents, EventIterator::index(), Traces::LocalEODEvents, Traces::LocalEODTrace, EventData::meanSize(), EventData::next(), RangeLoop::pos(), EventData::previous(), EventData::previousTime(), Map< T >::push(), Map< T >::reserve(), Map< T >::size(), EventData::size(), EventIterator::time(), Map< T >::x(), and Map< T >::y().
Referenced by JAR::main().