pyfast_adt.main.adaptor.camera.adaptor_serval

Attributes

cam

Classes

Cam_medipix3

Interfaces with Serval from ASI.

Module Contents

class pyfast_adt.main.adaptor.camera.adaptor_serval.Cam_medipix3(name='serval', instance_gui=None)

Bases: pyfast_adt.main.adaptor.camera.adaptor_cam.Cam_base

Interfaces with Serval from ASI.

name = 'serval'
instance_gui = None
url
get_image(exposure=None, binsize=None, triggers=1, **kwargs)

Image acquisition routine. If the exposure and binsize are not given, the default values are read from the config file.

exposure:

Exposure time in seconds.

binsize:

Which binning to use.

get_movie(n_frames, exposure=None, binsize=None, **kwargs)

Movie acquisition routine. If the exposure and binsize are not given, the default values are read from the config file.

n_frames:

Number of frames to collect

exposure:

Exposure time in seconds.

binsize:

Which binning to use.

get_image_dimensions()

Get the binned dimensions reported by the camera.

get_camera_dimensions()

Get the dimensions reported by the camera.

get_name() str

Get the name reported by the camera.

connect()

‘ connection with the device

establish_connection() None

Establish connection to the camera. by adding a new destination called Image to the detector, this is made to preserve previous exsisting destinations necessary for other operations

release_connection() None

Release the connection to the camera.

set_exposure(exposure_time: int)

‘ set the exposure time in ms for the camera

get_exposure()

‘ get the exposure time in ms for the camera

start_liveview(delay: float)

‘ start the live view of the camera

stop_liveview()

‘ stop the live view of the camera

set_binning(binning: int)

‘ set the binning of the camera, common parameters are 1, 2, 4, 8

get_binning()

‘ get the binning of the camera

acquire_image(exposure_time: int, binning: int, processing='Unprocessed')

Acquire image through its adaptor and return it, exposure in ms and binning is usually 1

acquire_image_and_show(exposure_time: int, binning: int, processing='Unprocessed')

Acquire image through its adaptor and return it, exposure in ms and binning is usually 1

rotate_img(img, times=None, flip_h=None, flip_v=None)
set_processing(processing: str)

‘ set the processing of the camera, processing = “Unprocessed, Background subtracted, Gain normalized”

get_processing()

‘ get the processing typeof the camera

acquire_series_images(exposure_time: int, binning: int, processing: str, buffer_size: int, stop_signal, display=False)
prepare_acquisition_cRED_data(camera: str, binning: int, exposure: int, buffer_size, FPS_devider=1)
acquisition_cRED_data(stage_thread=None, timer=None, event=None, stop_event=None)

Acquire images into the buffer up to the thread is alive, usually the stage thread is passed for cRED experiments

save_cRED_data(savingpath)
correctCross(raw, factor=2)

correct the cross of the collected image from (512,512) to (514,514). the intensity from the neighboring pixels is divided by the factor value and assigned to the “cross” pixels. return the corrected image as a np.array of shape (514,514) the intensity of the reflections inside the cross are splitted in 2 consequent pixels

get_camera_characteristic()
load_calibration_table()
is_cam_streaming()

True is the camera have a live mode where you can retrieve the images from the memory like the xf416r, otherwise False like the timepix1

is_cam_bottom_mounted()

True if the camera is mounted on the bottom of the microscope, otherwise False

collect_image_cred(triggers=1, **kwargs)

specific function for ASI cheetah data collection. this function retrieve an image from the buffer of the camera the problem is that resolve too fast and fill the buffer of the datacollection in pyfast adt too fast. or we introduce a sleeper or we find another way.

prepare_collection_cred_images(exposure=None, binsize=1, triggers=10000, **kwargs)
shuffle_chip_order(raw, order=[1, 2, 3, 4])

Shuffle the chips in the image based on the given order.

Parameters: - raw: np.ndarray, Input 512x512 image. - order: list of int, Desired order of chips.

pyfast_adt.main.adaptor.camera.adaptor_serval.cam