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
Surface detection and faster z-stacks #188
Conversation
refactored the ImageSequencerThread along the way to make it possible to use it without the Ctrl
this way, we can more easily wait for results
- restore the driver-supported frame acqisition to its previous glory - fix Future.wrap to not clobber "self" - muck about with at fair few other things that got in the way
Stage.positionUpdatesPerSecond implemented for Sensapex and MockStage only, so far
- put Number in typing - minor cleanups in all files touched
Conflicts: acq4/devices/PatchPipette/statemanager.py - fixing the same problem
acq4/devices/Camera/Camera.py
Outdated
def acquireFrames(self, n=1, stack=True): | ||
"""Immediately acquire and return a specific number of frames. | ||
@contextmanager | ||
def run(self, ensureFreshFrames=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camera.ensureRunning ?
acq4/devices/Camera/Camera.py
Outdated
def getEstimatedFrameRate(self, _future: Future): | ||
"""Return the estimated frame rate of the camera. | ||
""" | ||
if not self.isRunning(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be necessary? Just:
with self.ensureRunning():
...
acq4/devices/Pipette/pipette.py
Outdated
@@ -434,9 +434,9 @@ def _solveGlobalStagePosition(self, pos): | |||
spos = np.asarray(stage.globalPosition()) | |||
return spos + dif | |||
|
|||
def _moveToLocal(self, pos, speed, linear=False): | |||
def moveToLocal(self, pos, speed, linear=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider reverting this
acq4/devices/Scanner/DeviceGui.py
Outdated
@@ -365,7 +365,8 @@ def sample(self): | |||
xRange = (self.ui.xMinSpin.value(), self.ui.xMaxSpin.value()) | |||
yRange = (self.ui.yMinSpin.value(), self.ui.yMaxSpin.value()) | |||
|
|||
background = camera.acquireFrames(1) | |||
with camera.run(ensureFreshFrames=True): | |||
background = camera.acquireFrames(1).getResult()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be camera.acquireFrames(1, ensureFresh=True)
?
closes #166
closes #171