PYME.Acquire.Spooler module

class PYME.Acquire.Spooler.EventLogger(scope, hdf5File)

Event logging backend base class

Methods

logEvent(eventName[, eventDescr, timestamp]) Log an event.
logEvent(eventName, eventDescr='', timestamp=None)

Log an event. Should be overriden in derived classes.

Note

In addition to the name and description, timing information is recorded

for each event.

Parameters:

eventName : string

short event name - < 32 chars and should be shared by events of the same type.

eventDescr : string

description of the event - additional, even specific information packaged as a string (<255 chars). This is commonly used to store parameters - e.g. z positions, and should be both human readable and easily parsed.

class PYME.Acquire.Spooler.Spooler(filename, frameSource, protocol=<PYME.Acquire.protocol.Protocol instance>, guiUpdateCallback=None, fakeCamCycleTime=None, maxFrames=9223372036854775807, **kwargs)

Spooler base class

Methods

FlushBuffer()
OnFrame(**kwargs) Callback which should be called on every frame
StartSpool()
StopSpool()
doStartLog() Record pertinant information to metadata at start of acquisition.
doStopLog() Record information to metadata at end of acquisition
fakeTime() Generate a fake timestamp for use with the simulator where the camera

Create a new spooler.

Parameters:

scope : PYME.Acquire.microscope.microscope object

The microscope providing the data

filename : string

The file into which to spool

frameSource : dispatch.Signal object

A source of frames we can subscribe to. It should implement a “connect” method allowing us to register a callback and then call the callback with the frame data in a “frameData” kwarg.

protocol : PYME.Acquire.protocol.TaskListProtocol object

The acquisition protocol

guiUpdateCallback : function

a function to call when the spooling GUI needs updating

Methods

FlushBuffer()
OnFrame(**kwargs) Callback which should be called on every frame
StartSpool()
StopSpool()
doStartLog() Record pertinant information to metadata at start of acquisition.
doStopLog() Record information to metadata at end of acquisition
fakeTime() Generate a fake timestamp for use with the simulator where the camera
FlushBuffer()
OnFrame(**kwargs)

Callback which should be called on every frame

StartSpool()
StopSpool()
doStartLog()

Record pertinant information to metadata at start of acquisition.

Loops through all registered sources of start metadata and adds their entries.

doStopLog()

Record information to metadata at end of acquisition

fakeTime()

Generate a fake timestamp for use with the simulator where the camera cycle time does not match the actual time elapsed to generate the frame