File MIES_AmplifierInteraction_Sutter.ipf

AI_SU Interface with the amplifiers integrated in the Sutter IPA devices

The amplifier headstages are addressed by their probe index, which is the zero-based index of the headstage over all IPA devices in the order of LISTOFDEVICES from GetSUDeviceInfo(). The MIES headstage with the same index is fixed to that amplifier headstage.

Todo:

Add GUI controls to the DAEphys panel for the Sutter amplifier settings primary output low pass filter, gain and dynamic hold. Contrary to MCC amplifiers there is no amplifier control software for these settings. The filter can currently only be set via AI_WriteToAmplifier() with MCC_PRIMARYSIGNALLPF_FUNC, gain and dynamic hold only via the IPA_Control API. All three are stored in the labnotebook. The controls require a DAEphys panel version bump and support in the configuration save/restore code, see https://github.com/AllenInstitute/MIES/issues/2790.

Gains of the Sutter headstages

The Sutter XOP outputs and acquires the headstage signals in SI units, independent of the gain setting of the amplifier.

static const double SUTTER_VC_DA_GAIN = 1000

mV/V, command in V

static const double SUTTER_VC_AD_GAIN = 1e-12

A/pA, current in A.

static const double SUTTER_IC_DA_GAIN = 1e12

pA/A, command in A

static const double SUTTER_IC_AD_GAIN = 1e-3

V/mV, voltage in V.

Functions

static variable AI_SU_GetNumberOfProbes()

Return the number of amplifier headstages of all IPA devices.

static std::tuple<string, variable> AI_SU_GetDeviceHeadstageFromProbe(variable probeIndex)

Return the IPA device serial and the one-based headstage number on that device of the given probe index.

static variable AI_SU_GetProbeFromDeviceHeadstage(string serial, variable deviceHeadstage)

Return the probe index of the one-based headstage number on the IPA device with the given serial.

variable AI_SU_FindConnectedAmps()

Return the number of connected amplifier headstages.

The amplifiers are integrated in the IPA devices, so these are the amplifier headstages of all IPA devices found when opening the device.

std::tuple<variable, variable, string, string> AI_SU_QueryGainsUnitsForClampMode(string device, variable headstage, variable clampMode)

Return the gains and units of the given clamp mode.

These are fixed for Sutter amplifiers, see SUTTER_VC_DA_GAIN.

variable AI_SU_QueryGains(string device)

Fill the gains and units of all headstages with Sutter amplifiers.

The data is inserted into ChanAmpAssign and ChanAmpAssignUnit.

Returns:

number of Sutter amplifiers

string AI_SU_GetAmplifierList()

Return a nicely layouted list of the amplifier headstages of all IPA devices.

string AI_SU_GetAmplifierDef(variable probeIndex)

Return the amplifier list entry for the given probe index.

variable AI_SU_ParseAmplifierDef(string amplifierDef)

Parse the entries which AI_SU_GetAmplifierDef() created.

Returns:

probe index

static std::tuple<string, variable, variable> AI_SU_GetSetting(variable func, variable clampMode)

Return the IPA control keyword and the scale factors for the given amplifier function.

The value for the IPA control package is value * prefixScale * unitScale, where value is in MIES units (see usePrefixes of AI_SendToAmp()), prefixScale converts from MIES units to SI units and unitScale from SI units to the unit of the IPA control package.

Parameters:
Returns:

keyword, empty if the function is not supported by the Sutter amplifiers

static variable AI_SU_IsAutomaticFunction(variable func)

Return true if func is an automatic function, which has no value to read or compare.

variable AI_SU_Initialize(string device)
variable AI_SU_Shutdown(string device)
variable AI_SU_GetMode(string device, variable headstage)
variable AI_SU_UpdateDependentSettings(string device, variable headStage, variable func, variable clampMode)
variable AI_SU_FillAndSendAmpliferSettings(string device, variable sweepNo)
variable AI_SU_GetHoldingCommand(string device, variable headstage)
variable AI_SU_SetClampMode(string device, variable headstage, variable mode)
variable AI_SU_EnsureCorrectMode(string device, variable headstage)
variable AI_SU_SelectMultiClamp(string device, variable headstage)
variable AI_SU_SendToAmp(string device, variable headStage, variable mode, variable func, variable accessType, variable checkBeforeWrite, variable usePrefixes, variable selectAmp, variable value)

Variables

static const string AMPLIFIER_DEF_FORMAT = "%s HS %d"