PYME.recipes.acquisition module¶
- class PYME.recipes.acquisition.QueueAcquisitions(parent=None, invalidate_parent=True, **kwargs)¶
Bases:
OutputModule
Queue move-to and start-spool acquisition tasks for each input position using the ActionServer web wrapper queue_action endpoint.
- Parameters
- input_positionsInput
PYME.IO.tabular containing ‘x_um’ and ‘y_um’ coordinates in units of micrometers (preferred) or ‘x’ and ‘y’ coordinates in units of nanometers.
- action_server_urlCStr
URL of the microscope-side action server process.
- spool_settingsDictStrAny
settings to be passed to PYME.Acquire.SpoolController.start_spooling as key-word arguments. Ones that make sense in the context of this recipe module include:
- max_framesint
number of frames to spool per series
- methodstr
‘File’, ‘Queue’ (py2 only), or ‘Cluster’.
- hdf_compression_level: int
pytables compression level, valid for file/queue methods only.
- z_steppedbool
flag to toggle z stepping or standard protocol during spool
- z_dwellint
number of frames to acquire at each z position for z-stepped spools
- cluster_h5bool
spool to single h5 file on cluster (True) or pzf files (False). Only relevant for Cluster method.
- pzf_compression_settingsdict
see PYME.IO.HTTPSpooler
- protocol_namestr
filename of the acquisition protocol to follow while spooling
- subdirectorystr
firectory within current SpoolController set directory to spool a given series. The directory will be created if it doesn’t already exist.
- lifo: Bool
last-in first-out behavior (True) starts at the last position in input_positions, False starts with the 0th. Useful in instances where e.g. you leave the microscope at the end of a detection scan and reversing the position order could mean less travel.
- optimize_pathBool
toggle whether acquisition tasks for positions are posted in an order which will minimize stage travel. Still respects the lifo parameter to pick the start.
- timeoutFloat
time in seconds after which the acquisition tasks associated with these positions will be ignored/unqueued from the action manager.
- nice: Int
priority at which acquisition tasks should execute (default=10)
- max_durationfloat
A generous estimate, in seconds, of how long the task might take, after which the lasers will be automatically turned off and the action queue paused.
- between_post_throttleFloat
Time in seconds to sleep between posts to avoid bombarding the microscope-side server. Can be set to zero for ~no throttling.
- action_server_url = <PYME.misc.mock_traits.CStr object>¶
- between_post_throttle = <PYME.misc.mock_traits.Float object>¶
- input_positions = <PYME.recipes.traits.Input object>¶
- lifo = <PYME.misc.mock_traits.CStr object>¶
- max_duration = <PYME.misc.mock_traits.Float object>¶
- nice = <PYME.misc.mock_traits.CStr object>¶
- optimize_path = <PYME.misc.mock_traits.CStr object>¶
- save(namespace, context={})¶
- Parameters
- namespacedict
The recipe namespace
- contextdict
Information about the source file to allow pattern substitution to generate the output name. At least ‘basedir’ (which is the fully resolved directory name in which the input file resides) and ‘file_stub’ (which is the filename without any extension) should be resolved.
Notes
str spool_settings values can context-substitute templated parameters, e.g. spool_settings = {‘subdirectory’: ‘{file_stub}’,
‘extra_metadata: {‘Samples.Well’: ‘{file_stub}’}}
- spool_settings = <PYME.misc.mock_traits.CStr object>¶
- timeout = <PYME.misc.mock_traits.Float object>¶
- PYME.recipes.acquisition.format_values(d, context)¶