Module sensors
: device adapters for sensing devices (cameras, etc.)¶
hal.Sensor
device adapters shipped with MicroscoPy:
-
class
microscopy.device_adapters.sensors.
Andor
(cam, n=1, display=None, thermistor=None)[source]¶ Device adapter for the Andor EMCCD
andor2.Andor
.The camera is operated in Kinetic mode.
The exposure property allows changing the exposure on-the-fly (i.e., without pausing the scan first).
Parameters: - cam (
andor2.Andor
) – an AndorUI object - n (int) – number of images to take (default 1)
- display (
microscopy.display.LiveDisplay
) – the active camera live display - thermistor – a Thermistor object to keep track of ambient temperature.
-
exposure
¶ Query or set the exposure time (in ms).
If the camera is acquiring, the exposure change will be applied once the current snap is finished.
-
snap
(new=True)[source]¶ Return the latest data, either from a new acquisition sequence (new=True, default), or from the last one (new=False).
The data is also available
-
save_metadata
(h5file, dataset_name)[source]¶ Add acquisition atributes to an existing HDF5 dataset.
Parameters: - h5file – a
h5py.File
(must be open) - dataset_name (string) – name of the dataset (must have already been created).
- h5file – a
-
intensity
(center, width, new=True)[source]¶ Return the sum of pixel values in a ROI centered at center, of with width.
center and width must be tuples. Works with 1D and 2D data. If new=True, snap a new image, otherwise use the last acquired image.
- cam (
-
class
microscopy.device_adapters.sensors.
AndorExposures
(cam, exposures, n=1, display=None, thermistor=None)[source]¶ An extension of the Andor camera class where for each scan position several images are taken with different exposures.
-
class
microscopy.device_adapters.sensors.
VoltIn
(ai, scaling=-1, wait=0)[source]¶ Analog input adapter.
Parameters: - ai – analog input channel (any callable object that returns a float when called)
- scaling (float) – a multiplicative factor applied to the measured voltage
-
class
microscopy.device_adapters.sensors.
Pixelfly
(camera)[source]¶ Sensor adapter for PCO Pixelfly CCD cameras
Parameters: cam – a pxlfly.PyPixelfly
instance