Basic Electrophysiology Relacs Plugins
0.9.8
|
#include <amplifiercontrol.h>
Public Slots | |
void | startResistance (void) |
void | doResistance (void) |
void | stopResistance (void) |
void | startBuzz (void) |
void | doBuzz (void) |
void | stopBuzz (void) |
void | activateBridgeMode (bool activate=true) |
void | activateCurrentClampMode (bool activate=true) |
void | activateDynamicClampMode (bool activate=true) |
void | activateVoltageClampMode (bool activate=true) |
void | manualSelection (bool activate=true) |
void | setSyncPulse (double durationus) |
void | setSyncMode (int mode) |
Public Slots inherited from Control | |
virtual void | saveDoxygenOptions (void) |
virtual void | saveWidget (void) |
Public Slots inherited from ConfigDialog | |
virtual void | dialog (void) |
virtual void | help (void) |
virtual void | notifyDialog (const Options &opt) |
Public Member Functions | |
AmplifierControl (void) | |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | keyReleaseEvent (QKeyEvent *e) |
virtual void | initDevices (void) |
virtual void | notify (void) |
virtual void | modeChanged (void) |
Public Member Functions inherited from Control | |
Control (const string &name, const string &pluginset="", const string &author="unknown", const string &version="unknown", const string &date=__DATE__) | |
virtual | ~Control (void) |
virtual void | setName (const string &name) |
void | start (void) |
virtual void | requestStop (void) |
bool | wait (double time=-1.0) |
virtual void | addActions (QMenu *menu, bool doxydoc) |
RELACSPlugin (const string &configident="", int configgroup=0, const string &name="", const string &pluginset="", const string &author="unknown", const string &version="unknown", const string &date=__DATE__) | |
virtual | ~RELACSPlugin (void) |
QWidget * | widget (void) |
void | setWidget (QWidget *widget) |
void | setLayout (QLayout *layout) |
int | desktopWidth (void) const |
int | desktopHeight (void) const |
string | pluginSet (void) const |
string | uniqueName (void) const |
void | setShortUniqueName (void) |
void | setLongUniqueName (void) |
void | updateUniqueName (void) |
const Options & | settings (void) const |
Options & | settings (void) |
void | setSettings (void) |
virtual void | notifyMetaData (void) |
virtual void | notifyStimulusData (void) |
void | setRELACSWidget (RELACSWidget *rw) |
virtual string | helpFileName (void) const |
const InList & | traces (void) const |
const InData & | trace (int index) const |
const InData & | trace (const string &ident) const |
int | traceIndex (const string &ident) const |
string | traceNames (void) const |
string | rawTraceNames (void) const |
const EventList & | events (void) const |
const EventData & | events (int index) const |
const EventData & | events (const string &ident) const |
const EventData & | stimulusEvents (void) const |
const EventData & | restartEvents (void) const |
const EventData & | recordingEvents (void) const |
int | traceInputTrace (int trace) const |
int | traceInputTrace (const string &ident) const |
int | traceInputEvent (int trace) const |
int | traceInputEvent (const string &ident) const |
int | eventInputTrace (int event) const |
int | eventInputTrace (const string &ident) const |
int | eventInputEvent (int event) const |
int | eventInputEvent (const string &ident) const |
double | signalTime (void) const |
double | currentTime (void) const |
double | currentTimeRaw (void) const |
void | addTracesEvents (deque< InList * > &data, deque< EventList * > &events) |
void | setTracesEvents (const InList &data, const EventList &event) |
void | assignTracesEvents (const InList &data, const EventList &events) |
void | assignTracesEvents (void) |
void | updateDerivedTracesEvents (void) |
int | getData (double mintracetime=0.0, double prevsignal=-1000.0) |
int | outTracesSize (void) const |
int | outTraceIndex (const string &name) const |
string | outTraceName (int index) const |
string | outTraceNames (void) const |
const TraceSpec & | outTrace (int index) const |
const TraceSpec & | outTrace (const string &name) const |
void | setSignalDelay (int device, double delay) |
bool | acquisition (void) const |
bool | simulation (void) const |
bool | analysis (void) const |
bool | idle (void) const |
string | modeStr (void) const |
Options & | relacsSettings (void) |
const Options & | relacsSettings (void) const |
void | lockRelacsSettings (void) const |
void | unlockRelacsSettings (void) const |
QMutex * | relacsSettingsMutex (void) |
string | path (void) const |
string | addPath (const string &file) const |
string | defaultPath (void) const |
string | addDefaultPath (const string &file) const |
bool | saving (void) const |
Options & | stimulusData (void) |
const Options & | stimulusData (void) const |
int | stimulusDataTraceFlag (void) const |
void | lockStimulusData (void) const |
void | unlockStimulusData (void) const |
QMutex * | stimulusDataMutex (void) |
MetaData & | metaData (void) |
const MetaData & | metaData (void) const |
void | lockMetaData (void) const |
void | unlockMetaData (void) const |
QMutex * | metaDataMutex (void) |
AllDevices * | devices (void) const |
Device * | device (const string &ident) |
void | updateDeviceMenu (void) |
DigitalIO * | digitalIO (const string &ident) |
Trigger * | trigger (const string &ident) |
Attenuate * | attenuator (const string &name) |
Filter * | filter (const string &name) |
Filter * | filterTrace (int index) |
Filter * | filterTrace (const string &name) |
Options & | filterOpts (const string &name) |
Options & | filterTraceOpts (int index) |
Options & | filterTraceOpts (const string &name) |
void | lockFilter (const string &name) |
void | lockFilterTrace (int index) |
void | lockFilterTrace (const string &name) |
void | unlockFilter (const string &name) |
void | unlockFilterTrace (int index) |
void | unlockFilterTrace (const string &name) |
void | autoConfigureFilter (Filter *filter, double tbegin, double tend) |
void | autoConfigureFilter (Filter *filter, double duration) |
void | autoConfigureFilter (double tbegin, double tend) |
void | autoConfigureFilter (double duration) |
Filter * | detector (const string &name) |
Filter * | detectorEvents (int index) |
Filter * | detectorEvents (const string &name) |
Options & | detectorOpts (const string &name) |
Options & | detectorEventsOpts (int index) |
Options & | detectorEventsOpts (const string &name) |
void | lockDetector (const string &name) |
void | lockDetectorEvents (int index) |
void | lockDetectorEvents (const string &name) |
void | unlockDetector (const string &name) |
void | unlockDetectorEvents (int index) |
void | unlockDetectorEvents (const string &name) |
void | autoConfigureDetector (Filter *detector, double tbegin, double tend) |
void | autoConfigureDetector (Filter *detector, double duration) |
void | autoConfigureDetectors (double tbegin, double tend) |
void | autoConfigureDetectors (double duration) |
double | sessionTime (void) const |
string | sessionTimeStr (void) const |
bool | sessionRunning (void) const |
int | reproCount (void) const |
virtual void | sessionStarted (void) |
virtual void | sessionStopped (bool saved) |
bool | globalKeyEvents (void) |
void | setGlobalKeyEvents (bool global=true) |
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) |
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) | |
Protected Member Functions | |
void | clearSyncPulse (void) |
void | measureResistance (void) |
virtual void | customEvent (QEvent *qce) |
Protected Member Functions inherited from Control | |
virtual void | main (void) |
bool | interrupt (void) const |
bool | waitOnData (double time=MAXDOUBLE) |
bool | waitOnReProSleep (double time=MAXDOUBLE) |
bool | waitOnReProFinished (double time=MAXDOUBLE) |
bool | waitOnSessionStart (double time=MAXDOUBLE) |
bool | waitOnSessionPrestop (double time=MAXDOUBLE) |
bool | waitOnSessionStop (double time=MAXDOUBLE) |
bool | sleep (double t) |
void | timeStamp (void) |
bool | sleepOn (double t) |
virtual void | setPluginSet (const string &pluginset) |
void | printlog (const string &s) const |
void | warning (const string &s, double timeout=0.0) |
void | info (const string &s, double timeout=0.0) |
void | postCustomEvent (int type=0) |
int | maxVoltages (const InData &data, vector< double > &ranges) const |
int | maxValues (const InData &data, vector< double > &ranges) const |
void | setGain (const InData &data, int gainindex) |
void | adjustGain (const InData &data, double maxvalue) |
void | adjustGain (const InData &data, double minvalue, double maxvalue) |
void | adjust (const InData &data, double tbegin, double tend, double threshold) |
void | adjust (const InData &data, double duration, double threshold) |
int | activateGains (void) |
Control * | control (int index) |
Control * | control (const string &name) |
Options & | controlOpts (int index) |
Options & | controlOpts (const string &name) |
void | lockControl (int index) |
void | lockControl (const string &name) |
void | unlockControl (int index) |
void | unlockControl (const string &name) |
Model * | model (void) |
Options & | modelOpts (void) |
void | lockModel (void) |
void | unlockModel (void) |
RePros * | repros (void) |
Options & | reprosDialogOpts (void) |
RePro * | repro (int index) |
RePro * | repro (const string &name) |
Options & | reproOpts (int index) |
Options & | reproOpts (const string &name) |
void | lockRePro (int index) |
void | lockRePro (const string &name) |
void | unlockRePro (int index) |
void | unlockRePro (const string &name) |
RePro * | currentRePro (void) |
Options & | currentReProOpts (void) |
void | lockCurrentRePro (void) |
void | unlockCurrentRePro (void) |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
void | setWaitMouseCursor (void) |
void | restoreMouseCursor (void) |
Protected Member Functions inherited from ConfigDialog | |
void | setDialogOpen (bool open=true) |
void | setHelpOpen (bool open=true) |
Additional Inherited Members | |
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) |
Static Public Member Functions inherited from Traces | |
static void | initialize (const RELACSPlugin *rp, const InList &data, const EventList &events) |
static string | spikeTraceNames (void) |
static string | spikeEventNames (void) |
static string | currentTraceNames (void) |
static string | potentialTraceNames (void) |
static string | nerveTraceNames (void) |
static string | nerveEventNames (void) |
static string | currentOutputNames (void) |
static string | potentialOutputNames (void) |
Static Public Attributes inherited from Control | |
static const int | DeviceId |
static const int | AnalogInputId |
static const int | AnalogOutputId |
static const int | DigitalIOId |
static const int | TriggerId |
static const int | AttenuatorId |
static const int | AttenuateId |
static const int | ModelId |
static const int | FilterId |
static const int | ReProId |
static const int | ControlId |
static const int | Core |
static const int | Plugins |
Static Public Attributes inherited from Traces | |
static int | SpikeTraces = 0 |
static int | SpikeTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | SpikeEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | CurrentTraces = 0 |
static int | CurrentTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | PotentialTraces = 0 |
static int | PotentialTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | NerveTraces = 0 |
static int | NerveTrace [MaxTraces] = { -1, -1, -1, -1 } |
static int | NerveEvents [MaxTraces] = { -1, -1, -1, -1 } |
static int | CurrentOutputs = 0 |
static int | CurrentOutput [MaxTraces] = { -1, -1, -1, -1 } |
static int | PotentialOutputs = 0 |
static int | PotentialOutput [MaxTraces] = { -1, -1, -1, -1 } |
Protected Slots inherited from Control | |
void | startTheSession (void) |
void | stopTheSession (void) |
void | toggleSession (void) |
void | removeFocus (void) |
void | muteAudioMonitor (void) |
void | unmuteAudioMonitor (void) |
void | widgetDestroyed (QObject *obj) |
Protected Slots inherited from ConfigDialog | |
void | notificationFromDialog (const Parameter &p) |
virtual void | dClosed (int r) |
virtual void | hClosed (int r) |
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 Control | |
RELACSWidget * | RW |
Protected Attributes inherited from ConfigDialog | |
Options | DialogOptions |
Static Protected Attributes inherited from StandardTraces | |
static const int | MaxTraces |
[Control] Controls an amplifier: buzzer and resistance measurement.
initmode=Bridge:
Initial mode of the amplifier (string
)resistancecurrent=1nA
: The average current of the amplifier used for measuring electrode resistance (number
)adjust=false:
Adjust input gain for resistance measurement (boolean
)maxresistance=100MOhm
: Maximum resistance to be expected for scaling voltage trace (number
)buzzpulse=500ms
: Duration of buzz pulse (number
)showbridge=true:
Make bridge mode for amplifier selectable (boolean
)showcc=false:
Make current clamp mode for amplifier selectable (boolean
)showdc=false:
Make dynamic clamp mode for amplifier selectable (boolean
)showvc=false:
Make voltage clamp mode for amplifier selectable (boolean
)showmanual=false:
Make manual mode for amplifier selectable (boolean
)syncpulse=10us
: Duration of SEC current injection (number
)syncmode=0samples
: Interval is average over (integer
);Z:
Buzz
.: BuzzO:
Measure resistance ("O" is the shortcut of "Ohm"!)ALT-B
: Switch amplifier to bridge modeALT-C
: Switch amplifier to current-clamp modeALT-Y
: Switch amplifier to dynamic-clamp modeALT-V
: Switch amplifier to voltage-clamp modeALT-A
: Switch to manual selection of amplifier mode/lib/udev/hwdb
.d/60-keyboard.hwdb for your presenter/keyboard70-keyboard-relacs.hwdb
in /etc/udev/hwdb
.d/#define
KEY_1 etc. AmplifierControl | ( | void | ) |
References Control::setGlobalKeyEvents(), and Control::setLayout().
|
virtual |
Reimplemented from Control.
References AmplifierControl::startResistance().
|
virtual |
Reimplemented from Control.
References AmplifierControl::measureResistance(), and AmplifierControl::stopResistance().
|
virtual |
Reimplemented from Control.
References AmplifierControl::activateBridgeMode(), AmplifierControl::activateCurrentClampMode(), AmplifierControl::activateDynamicClampMode(), AmplifierControl::activateVoltageClampMode(), Control::device(), Control::lockMetaData(), Control::lockStimulusData(), AmplifierControl::manualSelection(), Control::metaData(), DoubleSpinBox::setPrecision(), AmplifierControl::setSyncMode(), AmplifierControl::setSyncPulse(), AmplifierControl::startBuzz(), AmplifierControl::startResistance(), Control::stimulusData(), AmplifierControl::stopResistance(), Control::unlockMetaData(), Control::unlockStimulusData(), and Control::widget().
|
virtual |
|
virtual |
If idle() sets manual mode selection for the amplifier.
Reimplemented from Control.
References Control::idle(), and AmplifierControl::manualSelection().
|
slot |
Mute audio monitor and call doResistance() a little bit delayed.
References Control::activateGains(), Control::adjustGain(), AmplifierControl::doResistance(), InData::gainIndex(), Control::getData(), ConfigDialog::lock(), Control::muteAudioMonitor(), Control::trace(), and ConfigDialog::unlock().
Referenced by AmplifierControl::initDevices(), and AmplifierControl::keyPressEvent().
|
slot |
Start measuring electrode resistance.
Referenced by AmplifierControl::startResistance().
|
slot |
Stop measuring electrode resistance.
References Control::activateGains(), ConfigDialog::lock(), AmplifierControl::measureResistance(), Control::setGain(), Control::trace(), ConfigDialog::unlock(), and Control::unmuteAudioMonitor().
Referenced by AmplifierControl::initDevices(), and AmplifierControl::keyReleaseEvent().
|
slot |
Mute audio monitor and call doBuzz() a little bit delayed.
References AmplifierControl::doBuzz(), and Control::muteAudioMonitor().
Referenced by AmplifierControl::initDevices().
|
slot |
Start buzzing the electrode.
References AmplifierControl::stopBuzz().
Referenced by AmplifierControl::startBuzz().
|
slot |
Stop buzzing the electrode.
References Control::unmuteAudioMonitor().
Referenced by AmplifierControl::doBuzz().
|
slot |
Activate/deactivate bridge mode of the amplifier.
References AmplifierControl::clearSyncPulse(), Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::initDevices(), and AmplifierControl::notify().
|
slot |
Activate/deactivate current-clamp mode of the amplifier.
References AmplifierControl::clearSyncPulse(), Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::activateDynamicClampMode(), AmplifierControl::initDevices(), CalibrateSyncPulse::main(), and AmplifierControl::notify().
|
slot |
Activate/deactivate current-clamp mode with external synchronization of the amplifier.
References AmplifierControl::activateCurrentClampMode(), Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::initDevices(), CalibrateSyncPulse::main(), and AmplifierControl::notify().
|
slot |
Activate/deactivate voltage-clamp mode of the amplifier.
References AmplifierControl::clearSyncPulse(), Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::initDevices(), and AmplifierControl::notify().
|
slot |
Turn on manual selection of the amplifier.
References AmplifierControl::clearSyncPulse(), Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::initDevices(), AmplifierControl::modeChanged(), and AmplifierControl::notify().
|
slot |
Set duration of the synchronization pulse to durationus microseconds.
References Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::initDevices().
|
slot |
Set mode of the synchronization pulse to mode.
References Control::lockStimulusData(), Control::stimulusData(), and Control::unlockStimulusData().
Referenced by AmplifierControl::initDevices().
|
protected |
Resets stimulus metadata regarding amplifier synchronization.
References Control::stimulusData().
Referenced by AmplifierControl::activateBridgeMode(), AmplifierControl::activateCurrentClampMode(), AmplifierControl::activateVoltageClampMode(), and AmplifierControl::manualSelection().
|
protected |
Measure electrode resistance.
References Control::currentTime(), Control::getData(), ConfigDialog::lock(), Control::lockMetaData(), InData::mean(), Control::metaData(), Control::trace(), ConfigDialog::unlock(), and Control::unlockMetaData().
Referenced by AmplifierControl::keyReleaseEvent(), and AmplifierControl::stopResistance().
|
protectedvirtual |
Reimplemented from Control.