File MIES_AcquireData.ipf

ACD Helpers for data acquisition used for testing and replay feature

Functions

static variable ACD_EnsureMCCIsOpen()
variable ACD_CALLABLE_PROTO(string device)
static string ACD_AcquireDataSelectFunction(string module, string funcName)
variable ACD_AcquireDataDoNothing(string device)
variable ACD_CreateLockedDAEphys(string device, string unlockedDevice = defaultValue)

Open a DAEphys panel and lock it to the given device.

In case unlockedDevice is given, no new panel is created.

variable ACD_CreateLockedDatabrowser(string device)
static variable ACD_OpenDatabrowser()
static variable ACD_FetchCustomizationFunctions(ACD_DAQSettings *s)
static variable ACD_ParseNumber(string str, string name, variable defValue = defaultValue)
static string ACD_ParseString(string str, string name, string defValue = defaultValue)
std::tuple<ACD_DAQSettings> ACD_InitDAQSettingsFromString(string str)

Fill the ACD_DAQSettings structure from a specially crafted string.

variable ACD_AcquireData(ACD_DAQSettings *s, string device)

Configuration management for executing tests which require hardware.

Setting up data acquisition is a tedious task. We have therefore developed a configuration management to speed that up.

Example:

/// UTF_TD_GENERATOR DataGenerators#DeviceNameGeneratorMD1
static Function MyTest([string str])

    [STRUCT ACD_DAQSettings s] = ACD_InitDAQSettingsFromString("MD1_RA1_I0_L0_BKG1"           + \
                                                               "__HS0_DA0_AD0_CM:IC:_ST:ABCD:")

    ACD_AcquireData(s, md.s0)
End

static Function MyTest_REENTRY([string str])
    // ...
End

This starts data acquisition with one active headstage (HS0) in current clamp (:IC:) on DA0 and AD0 with stimulus set ABCD. As a rule of thumb new entries should be added here if we have more than three users of a setting.

Numeric parameters are directly passed after the name, string parameters are enclosed in colons (:).

Required:

  • MultiDevice (MD: 1/0)

  • Repeated Acquisition (RA: 1/0)

  • Indexing (I: 1/0)

  • Locked Indexing (L: 1/0)

  • Background Data acquisition (BKG: 1/0)

Optional:

  • Use amplifier: (amp: 1/0)

  • Distributed data acquisition: (dDAQ: 1/0)

  • Optimized overlap distributed data acquisition: (oodDAQ: 1/0)

  • Repeat Sets (RES: [1, inf])

  • Open Databrowser (DB: 1/0)

  • Onset user delay (OD: > 0)

  • Termination delay (TD: > 0)

  • dDAQ delay (DDL: > 0)

  • Run testpulse instead (TP: 1/0)

  • Run data acquisition (DAQ: 1/0). Running data acquisition is the default. Setting _TP0_DAQ0 allows to not start anything.

  • Set the ITI (ITI: > 0)

  • Get/Set ITI checkbox (GSI: 1/0)

  • TP during ITI checkbox (TPI: 1/0)

  • Inserted TP checkbox (ITP: 1/0)

  • Fail on Abort/RTE: (FAR: 1/0), defaults to 1

  • Sampling interval multiplier (SIM: 1, 2, 4, …, 64), defaults to 1

  • Save TP: (STP: 1/0), defaults to 0

  • TP Baseline Percentage: (TBP: [25, 49])

  • Fixed frequency acquisition: (FFR: see DAP_GetSamplingFrequencies() for available values)

  • TP Duration: (TPD: [5, inf[)

HeadstageConfig:

  • Full specification: __HSXX_ADXX_DAXX_CM:XX:_ST:XX:_IST:XX:_AF:XX:_IAF:XX:_ASOXX Required:

    • HS

    • AD

    • DA

    • CM (VC/IC/IZ): clamp mode Optional:

    • ST: stimulus set

    • IST: indexing stimulus set

    • AF: analysis function for stimulus set

    • IAF: analysis function for indexing stimulus set

    • ASO (1/0): severes the amplifier connection and disables the headstage again after configuration, thus making the DA and AD channels unassociated

TTLConfig:

  • Full specification: __TTLXX_ST:XX: Required:

    • TTL Optional:

    • ST: TTL stimulus set

For tweaking data acquisition with full flexibility we also support customization functions before initialization, preInit aka before the DAEphys panel is created, and before acquisition, preAcq aka before the Start DAQ/TP button is pressed. The global functions, which are still per test suite, must be called GlobalPreAcq/GlobalPreInit and the per test case ones ${testcase}_PreAcq/${testcase}_PreInit. They must all be static. The global functions are called before the per test case functions. This allows to override the global ones.