Skip to content

FFI for clamp control #2547

@campagnola

Description

@campagnola

Currently I am accessing GUI elements directly for many these. My ideal API would look like:

GetClampState(headstage)
   Returns: 
   {
       'Mode': 'IC'|'VC'|'I=0',
       'HoldingPotential': float, 
       'HoldingPotentialEnable': bool,
       'BiasCurrent': float, 
       'BiasCurrentEnable': bool,
        'AutoBiasVcom': float,
        'AutoBiasVcomVariance': float,
        'AutoBiasIbiasmax': float,
        'AutoBiasEnable': float,
        'PipetteOffsetVC': float,
        'PipetteOffsetIC': float,
   }

SetClampMode(headstage, mode)
SetHoldingPotential(headstage, value, enable) 
SetBiasCurrent(headstage, value, enable) 
SetAutoBias(headstage, target_potential, enable)
SetHeadstageActive(headstage, enable)
SetTestPulseEnable(headstage, enable)
AutoPipetteOffset(headstage)
AutoCapacitance(headstage)
AutoBridgeBalance(headstage)

Notes:

  • All of the functions above are currently possible by accessing GUI elements directly, but many require multiple requests that degrade performance (including setting the headstage selection slider)
  • If GetClampState is too expensive as written, it could be broken up into more targeted requests
  • All of the values returned by GetClampState are currently being read using the pub/sub topic 'amplifier:set value', but it is also necessary to be able to explicitly request these before such message has been received
  • All Set..() functions should return only after the change is complete
  • You're welcome to simplify the API by combining set functions, like setClampParameter(headstage, param_name, value)
  • Maybe you'll want to add device as the first argument to all functions?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions