Auditory-Projects Relacs Plugins 0.9.8
|
[RePro] Assess spike precision in locust auditory receptors More...
#include <spikeprecision.h>
Classes | |
struct | EnvelopeFrequencyData |
Public Member Functions | |
SpikePrecision (void) | |
~SpikePrecision (void) | |
virtual int | main (void) |
Protected Types | |
enum | WaveForms { Sine, Rectangular, Triangular, Sawup, Sawdown, Noisegap, Noisecutoff } |
enum | StoreModes { SessionPath, ReProPath, CustomPath } |
Protected Member Functions | |
void | analyze (vector< EnvelopeFrequencyData > &results) |
void | plot (const SampleDataD &amdb, const vector< EnvelopeFrequencyData > &results) |
void | saveSpikes (const vector< EnvelopeFrequencyData > &results) |
void | saveRates (const vector< EnvelopeFrequencyData > &results) |
void | save (const vector< EnvelopeFrequencyData > &results) |
int | createStimulus (OutData &signal, SampleDataD &amdb, double frequency, const Str &file, bool store=true) |
void | customEvent (QEvent *qce) |
Protected Attributes | |
double | CarrierFrequency |
double | Amplitude |
double | PeakAmplitude |
double | PeakAmplitudeFac |
RangeLoop | FreqRange |
double | Frequency |
WaveForms | WaveForm |
double | DutyCycle |
double | RelFreqGap |
double | AbsFreqGap |
bool | Rescale |
double | Ramp |
double | Ramp2 |
double | Intensity |
double | Duration |
int | StimRepetition |
int | Side |
double | SkipWindow |
double | Sigma1 |
double | Sigma2 |
Str | StorePath |
Str | StoreFile |
MultiPlot | SP |
MultiPlot | P |
QStackedLayout * | Stack |
string | StimulusLabel |
[RePro] Assess spike precision in locust auditory receptors
freqrange=
: Frequency range (string
)amplitude=4dB
: Amplitude of envelope (number
)intensity=80dB
SPL: Stimulus intensity (number
)intensitybase=SPL
: Stimulus intensity relative to (string
)repeats=10times
: Number of stimulus presentations (number
)duration=500ms
: Duration of stimulus (number
)pause=1000ms
: Duration of pause between stimuli (number
)carrierfreq=5kHz
: Carrier frequency (number
)usebestfreq=true
: Use the cell's best frequency (boolean
)side=left
: Speaker (string
)waveform=sine
: Type of amplitude modulation (string
)dutycycle=50%
: Duty-cycle of rectangular waveform (number
)stimfile=
: Stimulus file (string
)stimampl=0
: Amplitude factor (standard deviation) of stimulus file (number
)relfreqgap=20%
: Relative width of frequency gap (number
)absfreqgap=10Hz
: Absolute width of frequency gap (number
)rescale=true
: Rescale filtered noise-gap stimuli (boolean
)ramp2=0ms
: Ramp for rectangles and saw tooths (number
)ramp=2ms
: Ramp at beginning and end of stimulus (number
)userate=true
: Search intensity for target firing rate (boolean
)rate=100Hz
: Target firing rate (number
)ratetol=5Hz
: Tolerance for target firing rate (number
)intensitystep=8dB
: Initial intensity step (number
)searchrepeats=2times
: Number of search stimulus presentations (number
)skipwin=200ms
: Initial portion of stimulus not used for analysis (number
)sigma1=1ms
: Standard deviation of rate smoothing kernel 1 (number
)sigma2=20ms
: Standard deviation of rate smoothing kernel 2 (number
)storemode=session
: Save stimuli in (string
)storepath=
: Save stimuli in custom directory (string
)enum WaveForms [protected] |
enum StoreModes [protected] |
SpikePrecision | ( | void | ) |
Constructs a SpikePrecision-RePro: intialize widgets and create options.
References Options::addBoolean(), Options::addNumber(), Options::addSelection(), Options::addText(), SpikePrecision::Amplitude, SpikePrecision::CarrierFrequency, RangeLoop::clear(), SpikePrecision::Duration, SpikePrecision::FreqRange, SpikePrecision::Intensity, MultiPlot::lock(), Options::newSection(), Options::newSubSection(), SpikePrecision::P, MultiPlot::resize(), Parameter::setActivation(), MultiPlot::setCommonXRange(), RELACSPlugin::setLayout(), Parameter::setStyle(), Parameter::setUnit(), SpikePrecision::Side, SpikePrecision::Sigma1, SpikePrecision::Sigma2, SpikePrecision::SkipWindow, SpikePrecision::SP, SpikePrecision::Stack, SpikePrecision::StimRepetition, and MultiPlot::unlock().
~SpikePrecision | ( | void | ) |
Destructs a SpikePrecision-RePro.
int main | ( | void | ) | [virtual] |
Implements RePro.
References RePro::Aborted, SpikePrecision::AbsFreqGap, RePro::addPath(), RELACSPlugin::adjust(), Options::allText(), SpikePrecision::Amplitude, SpikePrecision::analyze(), EventList::back(), Options::boolean(), SpikePrecision::CarrierFrequency, MultiPlot::clear(), MultiPlot::clearPlots(), RePro::Completed, RELACSPlugin::control(), SpikePrecision::createStimulus(), SpikePrecision::CustomPath, MultiPlot::draw(), SpikePrecision::Duration, SpikePrecision::DutyCycle, Map< T >::empty(), Str::empty(), DaqError::errorText(), RELACSPlugin::events(), RePro::Failed, Session::fICurve(), SpikePrecision::FreqRange, SpikePrecision::Frequency, Options::index(), Options::integer(), OutData::intensity(), SpikePrecision::Intensity, RePro::interrupt(), MultiPlot::lock(), RELACSPlugin::lockMetaData(), RePro::message(), RELACSPlugin::metaData(), SpikePrecision::Noisecutoff, SpikePrecision::Noisegap, Options::number(), DaqError::overflow(), SpikePrecision::P, SpikePrecision::PeakAmplitude, SpikePrecision::PeakAmplitudeFac, SpikePrecision::plot(), RELACSPlugin::postCustomEvent(), Str::provideSlash(), Map< T >::push(), EventList::push(), SpikePrecision::Ramp, SpikePrecision::Ramp2, EventList::rate(), EventData::rate(), SpikePrecision::RelFreqGap, RePro::reproPath(), SpikePrecision::ReProPath, SpikePrecision::Rescale, Map< T >::reserve(), RangeLoop::reset(), SpikePrecision::save(), SpikePrecision::SessionPath, RangeLoop::set(), MultiPlot::setDrawBackground(), OutData::setIntensity(), RELACSPlugin::settings(), Options::setValueTypeFlags(), SpikePrecision::Side, SpikePrecision::Sigma1, SpikePrecision::Sigma2, RELACSPlugin::signalTime(), RangeLoop::size(), EventList::size(), Map< T >::size(), SpikePrecision::SkipWindow, RePro::sleep(), RePro::softStop(), SpikePrecision::SP, Traces::Speaker, Traces::SpikeEvents, Session::ssFICurve(), SpikePrecision::StimRepetition, SpikePrecision::StimulusLabel, SpikePrecision::StoreFile, SpikePrecision::StorePath, DaqError::success(), RePro::testWrite(), Options::text(), Session::threshCurve(), RELACSPlugin::trace(), RePro::tracePlotSignal(), DaqError::underflow(), MultiPlot::unlock(), RELACSPlugin::unlockMetaData(), Options::warning(), SpikePrecision::WaveForm, RePro::write(), RePro::writeZero(), Map< T >::x(), and Map< T >::y().
void analyze | ( | vector< EnvelopeFrequencyData > & | results | ) | [protected] |
References SpikePrecision::Duration, RELACSPlugin::events(), SpikePrecision::FreqRange, SpikePrecision::Frequency, SpikePrecision::Intensity, RangeLoop::pos(), SpikePrecision::Sigma1, SpikePrecision::Sigma2, RELACSPlugin::signalTime(), SpikePrecision::SkipWindow, Traces::SpikeEvents, and SpikePrecision::StoreFile.
Referenced by SpikePrecision::main().
void plot | ( | const SampleDataD & | amdb, |
const vector< EnvelopeFrequencyData > & | results | ||
) | [protected] |
References MultiPlot::clear(), MultiPlot::draw(), SpikePrecision::Duration, SpikePrecision::FreqRange, SpikePrecision::Frequency, SpikePrecision::Intensity, MultiPlot::lock(), RELACSPlugin::lockMetaData(), RangeLoop::maxValue(), RELACSPlugin::metaData(), RangeLoop::minValue(), Options::number(), SpikePrecision::P, SpikePrecision::PeakAmplitude, RangeLoop::pos(), Map< T >::push(), SpikePrecision::EnvelopeFrequencyData::Rate1, SpikePrecision::EnvelopeFrequencyData::Rate2, Map< T >::reserve(), EventList::size(), SpikePrecision::SkipWindow, SpikePrecision::EnvelopeFrequencyData::Spikes, Traces::SpikeTraces, SpikePrecision::EnvelopeFrequencyData::SSRate, SpikePrecision::StimRepetition, MultiPlot::unlock(), and RELACSPlugin::unlockMetaData().
Referenced by SpikePrecision::main().
void saveSpikes | ( | const vector< EnvelopeFrequencyData > & | results | ) | [protected] |
References TableKey::addNumber(), RePro::addPath(), SpikePrecision::CarrierFrequency, SpikePrecision::Intensity, RELACSPlugin::lockMetaData(), RELACSPlugin::lockStimulusData(), RePro::macroName(), RELACSPlugin::metaData(), Options::number(), Options::save(), TableKey::saveKey(), RELACSPlugin::settings(), SpikePrecision::Side, RELACSPlugin::stimulusData(), RePro::totalRuns(), RELACSPlugin::unlockMetaData(), and RELACSPlugin::unlockStimulusData().
Referenced by SpikePrecision::save().
void saveRates | ( | const vector< EnvelopeFrequencyData > & | results | ) | [protected] |
References TableKey::addNumber(), RePro::addPath(), SpikePrecision::CarrierFrequency, SpikePrecision::Intensity, RELACSPlugin::lockMetaData(), RELACSPlugin::lockStimulusData(), RePro::macroName(), RELACSPlugin::metaData(), Options::number(), TableKey::save(), Options::save(), TableKey::saveKey(), RELACSPlugin::settings(), SpikePrecision::Side, RELACSPlugin::stimulusData(), RePro::totalRuns(), RELACSPlugin::unlockMetaData(), and RELACSPlugin::unlockStimulusData().
Referenced by SpikePrecision::save().
void save | ( | const vector< EnvelopeFrequencyData > & | results | ) | [protected] |
References SpikePrecision::saveRates(), and SpikePrecision::saveSpikes().
Referenced by SpikePrecision::main().
int createStimulus | ( | OutData & | signal, |
SampleDataD & | amdb, | ||
double | frequency, | ||
const Str & | file, | ||
bool | store = true |
||
) | [protected] |
References SpikePrecision::AbsFreqGap, Options::addText(), SpikePrecision::Amplitude, SpikePrecision::CarrierFrequency, SpikePrecision::Duration, SpikePrecision::DutyCycle, SampleData< T >::empty(), Options::erase(), OutData::fill(), RELACSPlugin::filter(), SampleData< T >::free(), SampleData< T >::freqFilter(), SpikePrecision::Frequency, Options::index(), SampleData< T >::indices(), SpikePrecision::Intensity, SampleData< T >::length(), SampleData< T >::load(), Str::longName(), SpikePrecision::Noisecutoff, SpikePrecision::Noisegap, SpikePrecision::PeakAmplitude, SpikePrecision::PeakAmplitudeFac, pow(), RELACSPlugin::printlog(), SpikePrecision::Ramp, SampleData< T >::ramp(), SpikePrecision::Ramp2, SampleData< T >::range(), rectangle(), SpikePrecision::Rectangular, SpikePrecision::RelFreqGap, SpikePrecision::Rescale, SampleData< T >::resize(), SampleData< T >::save(), Options::save(), sawDown(), SpikePrecision::Sawdown, sawUp(), SpikePrecision::Sawup, OutData::setIdent(), OutData::setTrace(), SpikePrecision::Side, sin(), SampleData< T >::size(), Options::size(), Traces::Speaker, SampleData< T >::stepsize(), SpikePrecision::StimulusLabel, SpikePrecision::StoreFile, SpikePrecision::StorePath, translate(), triangle(), SpikePrecision::Triangular, Options::warning(), and SpikePrecision::WaveForm.
Referenced by SpikePrecision::main().
void customEvent | ( | QEvent * | qce | ) | [protected, virtual] |
Reimplemented from RePro.
References SpikePrecision::P, RELACSPlugin::postCustomEvent(), MultiPlot::setDrawBackground(), SpikePrecision::SP, SpikePrecision::Stack, MultiPlot::tryLock(), and MultiPlot::unlock().
double CarrierFrequency [protected] |
double Amplitude [protected] |
Referenced by SpikePrecision::createStimulus(), SpikePrecision::main(), and SpikePrecision::SpikePrecision().
double PeakAmplitude [protected] |
Referenced by SpikePrecision::createStimulus(), SpikePrecision::main(), and SpikePrecision::plot().
double PeakAmplitudeFac [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double Frequency [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double DutyCycle [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double RelFreqGap [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double AbsFreqGap [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
bool Rescale [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double Ramp [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double Ramp2 [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
double Intensity [protected] |
double Duration [protected] |
int StimRepetition [protected] |
Referenced by SpikePrecision::main(), SpikePrecision::plot(), and SpikePrecision::SpikePrecision().
int Side [protected] |
double SkipWindow [protected] |
double Sigma1 [protected] |
Referenced by SpikePrecision::analyze(), SpikePrecision::main(), and SpikePrecision::SpikePrecision().
double Sigma2 [protected] |
Referenced by SpikePrecision::analyze(), SpikePrecision::main(), and SpikePrecision::SpikePrecision().
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().
Referenced by SpikePrecision::analyze(), SpikePrecision::createStimulus(), and SpikePrecision::main().
Referenced by SpikePrecision::customEvent(), SpikePrecision::main(), and SpikePrecision::SpikePrecision().
QStackedLayout* Stack [protected] |
Referenced by SpikePrecision::customEvent(), and SpikePrecision::SpikePrecision().
string StimulusLabel [protected] |
Referenced by SpikePrecision::createStimulus(), and SpikePrecision::main().