PYME.Acquire.frameWrangler module

Implementation of the FrameWrangler class (previously PreviewAcquisator) which manages the flow of information from a camera into the rest of the program, letting dependant parts of the program know when new data arrives via signals.

As hardware control in PYMEAcquire is largely driven by and synchronized with camera frames, this also encompasses the ‘heart’ or core of the program which everything else responds to.

class PYME.Acquire.frameWrangler.FrameWrangler(_cam, _ds=None)

Bases: wx._core.EvtHandler

Attributes

ClassName See GetClassName
EvtHandlerEnabled See GetEvtHandlerEnabled and SetEvtHandlerEnabled
NextHandler See GetNextHandler and SetNextHandler
PreviousHandler See GetPreviousHandler and SetPreviousHandler
dsa Whatever frame is currently passing through the acquisition queue
thisown The membership flag

Methods

Notify([event]) Callback which is called regularly by a system timer to poll the
Prepare([keepds]) Prepare for acquisition by allocating the buffer which will store the data we recieve.
checkHardware() Check to see if our hardware is ready for us to take the next frame
destroy()
getFPS()
getFrame([colours]) Ask the camera to put a frame into our buffer
getReqMemChans(colours) Use this function to calc how may channels to allocate when creating a new data stack
isRunning()
onExpReady() There is an exposure waiting in the Camera,
purge() purge (and discard) all remaining frames in the camera buffer
start([tiint]) Start aquisition
stop() Stop sequence aquisition
Notify(event=None)

Callback which is called regularly by a system timer to poll the camera

Prepare(keepds=False)

Prepare for acquisition by allocating the buffer which will store the data we recieve. The buffer stores a single frame, and all frames pass through this buffer. The current state of the buffer is accessible via the currentFrame variable.

Parameters:keepds: Whether or not to keep the previously allocated array
checkHardware()

Check to see if our hardware is ready for us to take the next frame

NB: This is largely legacy code, as the camera is usually used in free-running mode.

destroy()
dsa

Whatever frame is currently passing through the acquisition queue

NB: this new code should use the more informatively named currentFrame property instead

getFPS()
getFrame(colours=None)

Ask the camera to put a frame into our buffer

getReqMemChans(colours)

Use this function to calc how may channels to allocate when creating a new data stack

isRunning()
onExpReady()

There is an exposure waiting in the Camera, pull it down into our local storage and notify any listeners

purge()

purge (and discard) all remaining frames in the camera buffer

start(tiint=100)

Start aquisition

stop()

Stop sequence aquisition