holypipette.devices.manipulator.microscope module

A microscope is a manipulator with a single axis. With methods to take a stack of images, autofocus, etc.

TODO: * a umanager class that autoconfigures with umanager config file * steps for stack acquisition?

class holypipette.devices.manipulator.microscope.Microscope(dev, axis)[source]

Bases: Manipulator

A microscope Z axis, obtained here from an axis of a Manipulator.

absolute_move(x)[source]

Moves the device axis to position x in um.

Parameters:

x (target position in um.)

load_configuration(config)[source]

Loads configuration from dictionary config. Variables not present in the dictionary are untouched.

position()[source]

Current position

Return type:

The current position of the device axis in um.

relative_move(x)[source]

Moves the device axis by relative amount x in um.

Parameters:

x (position shift in um.)

save_configuration()[source]

Outputs configuration in a dictionary.

stack(camera, z, preprocessing=<function Microscope.<lambda>>, save=None, pause=0.3)[source]

Take a stack of images at the positions given in the z list

Parameters:
  • camera (a camera, eg with a snap() method)

  • z (A list of z positions)

  • preprocessing (a function that processes the images (optional))

  • save (saves images to disk if True)

  • pause (pause in second after each movement)

step_move(distance)[source]
stop()[source]

Stop current movements.

wait_until_still()[source]

Waits for the motors to stop.