acq4 / acq4

Data acquisition for patch clamp ephys / optogenetics / imaging experiments
http://www.acq4.org
MIT License
61 stars 49 forks source link

Obstacle avoidance during cell detection #263

Closed campagnola closed 2 weeks ago

campagnola commented 2 months ago

When approaching a cell through tissue, the operator usually watches the pipette tip for contact with any obstacles hit before reaching the cell. This is most apparent when the tip is blocked, causing the pressure wave to dissipate from the surrounding tissue. For automation, though, it is easier to just watch for changes in resistance. So, in cell-detect mode:

outofculture commented 1 month ago

@jessicatrnh okay, to test this, you'll want to look at the following 'cell detect' parameters:

outofculture commented 1 month ago

oh, and it won't avoid obstacles if it is minDectectionDistance away from the target.

jessicatrnh commented 1 month ago
2024-07-24T14:31:49.221771-07:00 Unexpected error: 
AttributeError: 'PatchPipette' object has no attribute 'patchrec'
AttributeError: 'PatchPipette' object has no attribute 'patchrec'
  File C:\Users\svc_multipatch\acq4\acq4\devices\PatchPipette\states.py, line 217, in _runJob
    self.nextState = self.run()
                     ^^^^^^^^^^
  File C:\Users\svc_multipatch\acq4\acq4\devices\PatchPipette\states.py, line 643, in run
    return self._run()
           ^^^^^^^^^^^
  File C:\Users\svc_multipatch\acq4\acq4\devices\PatchPipette\states.py, line 651, in _run
    return self._transition_to_seal(speed)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File C:\Users\svc_multipatch\acq4\acq4\devices\PatchPipette\states.py, line 754, in _transition_to_seal
    self.dev.patchrec()['detectedCell'] = True
    ^^^^^^^^^^^^^^^^^

Show thread states 59
jessicatrnh commented 1 month ago

Pipette approaches target as expected but state quickly changes to seal or foul states immediately when the tip touches the tissue...

jessicatrnh commented 1 month ago

Working much better after changing the cell detect advanceSpeed from 10um/s to 5um/s. The pipette avoided the obstacle (moved around it!) but the target still needs some fine tuning (either drift or distance too far).

Even after changing minDetectionDistance from 5um to 2um the tip does not stop and seal at target...stops right outside and starts seal.

campagnola commented 1 month ago

Some things to add here: