Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Sutter amplifier support #2126

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MichaelHuth
Copy link
Collaborator

This PR adds Sutter amplifier support to MIES

@MichaelHuth MichaelHuth self-assigned this May 31, 2024
@MichaelHuth MichaelHuth requested review from timjarsky and t-b as code owners May 31, 2024 11:54
@MichaelHuth
Copy link
Collaborator Author

MichaelHuth commented Jun 4, 2024

@t-b Here is a table with the settable IPA options:

		 CCMode // Sets headstage to Current Clamp
		 VCMode // Sets headstage to Voltage Clamp
		 IHold  // Sets the holding current in Current clamp to value
		 VHold // Sets the holding potential in Voltage clamp to value
		 Filter // Sets the amplifier filter setting (same for CC and VC).
                   Possible settings are (500;1kHz;2kHz;5kHz;10kHz;20kHz).
                   Function will set to the closest setting given an actual value.
                   Thus, either 5000 or 4900 will set the filter to 5kHz
		 IFilter // see above
		 VFilter // see above
		 VGain // Sets the input gain in Current clamp mode. Possible settings are 10;20;50;100;200;500 mV/mV).
		 IGain // Sets the input gain in Current clamp mode. Possible settings are (0.5;1;2.5;5;10;25 mV/pA).
// remark: Shouldn't that be a different clamp mode here?
		 Offset  // Sets the offset (in Volts)
		 OffsetLock // Toggles the offset lock
		 ECompMag // Sets electrode compensation magnitude (SI units, so value is between 0 and 25e-12).
		 ECompTau // Sets electrode compensation tau value (SI units, between 0.1e-6 and 4.5e-6).
		 RsComp  // Sets the whole-cell compensation Rs value (between 0 and 100e6).
		 CmComp // Sets the whole-cell compensation Cm value (between 0 and 100e-12).
		 RsPred // Sets the series resistance prediction value (% between 0 and 1). 
		 RsCorr  // Sets the series resistance correction value (% between 0 and 1).
		 RsLag // Sets the series resistance correction lag time (between 0 and 200e-6).
		 Bridge // Sets current clamp bridge balance (between 0 to 200e6).
		 BridgeOn // Enables/disables bridge balance.
		 AutoEComp // Activates the automatic electrode compensation routine
		 AutoCellComp // Activates the automatic cell compensation routine.
		 RsCompOn	// Rs Compensation enabled
		 RsCorrOn	//Prediction/Correction enabled
		 DynHold // Sets the dynamic hold voltage (between -1 and 1 V) for slow voltage control in CC mode.
		 DynHoldOn		// Enables/disables dynamic hold.
		 ECompOn		// Enables/disables electrode compensation (capacitance neutralization) in current clamp mode.
		 VHoldOn		//  Enables/disables holding potential in VC mode
		 IHoldOn		// Enables/disables holding current in CC mode.
		 AutoOffset // Calls the automatic offset control 
		 SealTest // Sets the HS#1 seal test. Value=0 off; otherwise value is amplitude in mV 
// (scaled 20 pA/unit in CC). SealTest automatically turns off if the amplifier is switched from VC to CC 
// (or vice versa), or if the headstage tab is changed (on the dIPA or multiple amplifiers). Seal test has a 
// 100ms duration which cannot be changed. Note: the seal test is not functional on headstage 2 of 
// the dIPA. If you require a seal test for the dIPA, please contact Sutter Instrument for a software solution.
		 Buzz

@t-b
Copy link
Collaborator

t-b commented Jun 4, 2024

Note to self: Figure out mapping between MCC controls and IPA names. Only support IPA ones which are on the MCC GUI window.

@MichaelHuth MichaelHuth force-pushed the feature/2126-sutter-amplifier-support branch from ae2068c to 9880788 Compare June 7, 2024 14:51
Sutter IPA control procedures and Sutter XOP 2.60 are
Copyright Sutter Instrument Corp. 2015 - 2024

The package was provided by Telly Galiatsatos
[email protected]
@MichaelHuth MichaelHuth force-pushed the feature/2126-sutter-amplifier-support branch 4 times, most recently from d309547 to 4754f7b Compare June 10, 2024 10:37
- Moved MCC specific Amplifier functions to MIES_AmplifierInteraction_MolecularDevices.ipf
- prefixed these functions with AIMCC_
- For all non-static AI_ functions, added abstraction that depending on device
  the MCC functions is called or a placeholder for Sutter amplifier is used.
- Added device argument to AI_ functions that did not used one, adapted depending
  call sites
- Kept checks of optional arguments in public AI_ functions
- Changed function declaration of public AIMCC_ functions to not use optional arguments
  The reason is that optional arguments can not easily promoted through function calls.
- Added updateView argument to AIMCC_UpdateAmpModel as ParamIsDefault state of value was
  used also for decision for updating the AmpView. This does not change the previous behavior.
- Adapted function declaration of all AIMCC_ functions to use modern syntax
@MichaelHuth MichaelHuth force-pushed the feature/2126-sutter-amplifier-support branch from 4754f7b to fefd7fd Compare June 10, 2024 14:01
@MichaelHuth
Copy link
Collaborator Author

MichaelHuth commented Jun 11, 2024

Control MCC func const or AIMCC_* function Sutter ID Sutter Comment
Radio_ClampMode_1 AIMCC_SetClampMode CCMode Sets headstage to Current Clamp
Radio_ClampMode_0 AIMCC_SetClampMode VCMode Sets headstage to Voltage Clamp
setvar_DataAcq_Hold_IC MCC_SETHOLDING_FUNC Ihold Sets the holding current in Current clamp to value
setvar_DataAcq_Hold_VC MCC_SETHOLDING_FUNC Vhold Sets the holding potential in Voltage clamp to value
Filter Sets the amplifier filter setting (same for CC and VC). Possible settings are (500;1kHz;2kHz;5kHz;10kHz;20kHz). Function will set to the closest setting given an actual value. Thus, either 5000 or 4900 will set the filter to 5kHz
Ifilter see above
Vfilter see above
Gain_AD_00 AIMCC_RetrieveGains Vgain Sets the input gain in Current clamp mode. Possible settings are 10;20;50;100;200;500 mV/mV).
Gain_AD_00 AIMCC_RetrieveGains Igain Sets the input gain in Current clamp mode. Possible settings are (0.5;1;2.5;5;10;25 mV/pA).
setvar_DataAcq_PipetteOffset_IC MCC_SETPIPETTEOFFSET_FUNC Offset Sets the offset (in Volts)
OffsetLock Toggles the offset lock
EcompMag Sets electrode compensation magnitude (SI units, so value is between 0 and 25e-12).
EcompTau Sets electrode compensation tau value (SI units, between 0.1e-6 and 4.5e-6).
MCC_SETWHOLECELLCOMPRESIST_FUNC RsComp Sets the whole-cell compensation Rs value (between 0 and 100e6).
MCC_SETWHOLECELLCOMPCAP_FUNC CmComp Sets the whole-cell compensation Cm value (between 0 and 100e-12).
setvar_DataAcq_RsPred MCC_SETRSCOMPPREDICTION_FUNC RsPred Sets the series resistance prediction value (% between 0 and 1).
setvar_DataAcq_RsCorr MCC_SETRSCOMPCORRECTION_FUNC RsCorr Sets the series resistance correction value (% between 0 and 1).
RsLag Sets the series resistance correction lag time (between 0 and 200e-6).
setvar_DataAcq_BB MCC_SETBRIDGEBALRESIST_FUNC Bridge Sets current clamp bridge balance (between 0 to 200e6).
check_DatAcq_BBEnable BridgeOn Enables/disables bridge balance.
AutoEComp Activates the automatic electrode compensation routine
AutoCellComp Activates the automatic cell compensation routine.
check_DatAcq_RsCompEnable MCC_SETRSCOMPENABLE_FUNC RsCompOn Rs Compensation enabled
RsCorrOn Prediction/Correction enabled
DynHold Sets the dynamic hold voltage (between -1 and 1 V) for slow voltage control in CC mode.
DynHoldOn Enables/disables dynamic hold.
check_DatAcq_CNEnable EcompOn Enables/disables electrode compensation (capacitance neutralization) in current clamp mode.
check_DatAcq_HoldEnableVC MCC_SETHOLDINGENABLE_FUNC VholdOn Enables/disables holding potential in VC mode
check_DatAcq_HoldEnable MCC_SETHOLDINGENABLE_FUNC IholdOn Enables/disables holding current in CC mode.
button_DataAcq_AutoPipOffset_IC AutoOffset Calls the automatic offset control
SealTest Sets the HS#1 seal test. Value=0 off; otherwise value is amplitude in mV (scaled 20 pA/unit in CC). SealTest automatically turns off if the amplifier is switched from VC to CC (or vice versa), or if the headstage tab is changed (on the dIPA or multiple amplifiers). Seal test has a 100ms duration which cannot be changed. Note: the seal test is not functional on headstage 2 of the dIPA. If you require a seal test for the dIPA, please contact Sutter Instrument for a software solution.
Buzz
button_DataAcq_AutoBridgeBal_IC MCC_AUTOBRIDGEBALANCE_FUNC
setvar_DataAcq_CN MCC_SETNEUTRALIZATIONCAP_FUNC
setvar_DataAcq_AutoBiasV sets a value
setvar_DataAcq_AutoBiasVrange sets a value
setvar_DataAcq_IbiasMax sets a value
check_DataAcq_AutoBias sets a value
check_DatAcq_WholeCellEnable MCC_SETWHOLECELLCOMPENABLE_FUNC
setvar_DataAcq_WCC MCC_SETWHOLECELLCOMPCAP_FUNC
setvar_DataAcq_WCR MCC_SETWHOLECELLCOMPRESIST_FUNC
button_DataAcq_WCAuto MCC_AUTOWHOLECELLCOMP_FUNC
check_DataAcq_Amp_Chain
button_DataAcq_FastComp_VC MCC_AUTOFASTCOMP_FUNC
button_DataAcq_SlowComp_VC MCC_AUTOSLOWCOMP_FUNC

@MichaelHuth MichaelHuth assigned t-b and unassigned MichaelHuth Jun 11, 2024
@t-b t-b added the PR:Postponed 2025 Pull requests where we continue only in 2025 label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Amplifier PR:Postponed 2025 Pull requests where we continue only in 2025
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants