PYME.Acquire.xyztc module

class PYME.Acquire.xyztc.TiledXYZTCMixin(scope, tile_settings, return_to_start=True, **kwargs)

Bases: object

finalize_t()
set_t(t_idx)
class PYME.Acquire.xyztc.TiledZStackAcquisition(scope, dim_order='XYCZT', stack_settings=None, tile_settings=None, channel_settings=None, backend=<class 'PYME.IO.acquisition_backends.MemoryBackend'>, backend_kwargs={})

Bases: TiledXYZTCMixin, XYZTCAcquisition

Class for tiled z stacks. Uses the t dimension to step through tiles.

NB - the mixin MUST be first in the inheritance list so that the _init_t and set_t methods are overridden by the mixin.

classmethod from_spool_settings(scope, settings, backend, backend_kwargs={}, series_name=None, spool_controller=None)

Create an XYZTCAcquisition object from a spool_controller settings object

classmethod get_frozen_settings(scope, spool_controller=None)

Return a dictionary of settings for the acquisition

Used to “freeze” the state of the spool_controller and/or other settings objects when queueing acquisitions for subsequent execution via the ActionManager

PYME.Acquire.xyztc.TimeSettings(num_timepoints=1, time_interval=None)

# Class to hold settings for time acquisition

# This class pricipally exists to document the interface of the time_settings parameter to XYZTCAcquisition.

# Parameters # ———-

# num_timepoints : int # Number of timepoints to acquire.

# time_interval : float (or None) # Time interval between timepoints. If None, the acquisition will be continuous. NOTE: the logic for non-none values # is not yet implemented, and this parameter will be ignored. #

class PYME.Acquire.xyztc.XYZTCAcquisition(scope, dim_order='XYCZT', stack_settings=None, time_settings=None, channel_settings=None, backend=<class 'PYME.IO.acquisition_backends.MemoryBackend'>, backend_kwargs={})

Bases: AcquisitionBase

Class to handle an XYZTC acquisition. This should serve as a base class for more specific acquisition classes, whilst also allowing for simple 3D and time-series acquisitions.

Parameters
scopePYME.Acquire.microscope.Microscope instance

The microscope instance to use for acquisition.

dim_orderstr

A string specifying the order of dimensions in the acquisition. Currently only ‘XYCZT’ is supported.

stack_settingsPYME.Acquire.stackSettings.StackSettings instance

The settings for the Z-stack acquisition. If None, the settings from scope.stackSettings will be used.

time_settingsa dict-like with a num_timepoints entry

The settings for the time acquisition. If None, only one timepoint will be acquired.

channel_settingsa dict-like with a num_channels entry

The settings for the channel acquisition. If None, only one channel will be acquired.

backendclass

A class implementing the backend interface (see PYME.IO.acquisition_backends) to use for storing the acquired data. Used for storing the acquired data and metadata. If None, a MemoryBackend will be used.

abort()

Abort the acquisition

This should stop the acquisition as quickly as practical. In many cases this can just be a call to stop(), but there is no expectation that buffers will be flushed, remaining protocol steps executed or hardware returned to a starting state. Especially for cases which involve moving translation stages or other hardware it is desirable that the abort method not result in further movement of hardware unless to a known safe state (e.g. lasers off).

Abort should, however, finalise the backend and emit the on_stop signal. TODO - should abort set spool_complete?

finalize_c()
finalize_t()
finalize_z()
classmethod from_spool_settings(scope, settings, backend, backend_kwargs={}, series_name=None, spool_controller=None)

Create an XYZTCAcquisition object from a spool_controller settings object

property md

for compatibility with spoolers

on_frame(sender, frameData, **kwargs)

Frame source handler

This method should be connected to the frame source signal (i.e. scope.frameWrangler.onFrame) and be responsible for handling incoming frames, passing them off to storage and performing anything that needs to be done (e.g. hardware movements or protocol task handling) before the next frame. NOTE - this method is called when the frame is retrieved by the frame wrangler - if the camera is running in continuous mode, this may be several frames after the camera has actually acquired the frame.

set_c(c_idx)
set_t(t_idx)
set_z(z_idx)
property shape
start()

Start the acquisition

This will usually record any metadata, connect self.on_frame to a frame source (i.e. scope.frameWrangler.onFrame), and initialise the backend. It should not block, with the bulk of the acquisition logic taking place in frame source handler.

status()
stop()

Stop the acquisition

This should disconnect from the frame souce, flush any remaining buffers, return hardware to starting state (if modified), do any cleanup, and finalise the backend.

It is desirable to send a final on_progress signal so that the GUI reflects the actual number of frames spooled etc… .

Once everything is complete, the on_stop signal should be emitted and the spool_complete flag set.

class PYME.Acquire.xyztc.ZStackAcquisition(scope, dim_order='XYCZT', stack_settings=None, time_settings=None, channel_settings=None, backend=<class 'PYME.IO.acquisition_backends.MemoryBackend'>, backend_kwargs={})

Bases: XYZTCAcquisition

Class for a simple Z-Stack acquisition.

Class to handle an XYZTC acquisition. This should serve as a base class for more specific acquisition classes, whilst also allowing for simple 3D and time-series acquisitions.

Parameters
scopePYME.Acquire.microscope.Microscope instance

The microscope instance to use for acquisition.

dim_orderstr

A string specifying the order of dimensions in the acquisition. Currently only ‘XYCZT’ is supported.

stack_settingsPYME.Acquire.stackSettings.StackSettings instance

The settings for the Z-stack acquisition. If None, the settings from scope.stackSettings will be used.

time_settingsa dict-like with a num_timepoints entry

The settings for the time acquisition. If None, only one timepoint will be acquired.

channel_settingsa dict-like with a num_channels entry

The settings for the channel acquisition. If None, only one channel will be acquired.

backendclass

A class implementing the backend interface (see PYME.IO.acquisition_backends) to use for storing the acquired data. Used for storing the acquired data and metadata. If None, a MemoryBackend will be used.

classmethod from_spool_settings(scope, settings, backend, backend_kwargs={}, series_name=None, spool_controller=None)

Create an XYZTCAcquisition object from a spool_controller settings object

classmethod get_frozen_settings(scope, spool_controller=None)

Return a dictionary of settings for the acquisition

Used to “freeze” the state of the spool_controller and/or other settings objects when queueing acquisitions for subsequent execution via the ActionManager