oap_model.detector module

class oap_model.detector.Detector(position: tuple[float, float, float], arm_separation: float = 0.1, n_pixels: int = 128, pixel_size: float = 1e-05, wavelength: float = 6.58e-07, detection_length: float = inf)[source]

Bases: object

arm_separation: float = 0.1
detection_length: float = inf
n_pixels: int = 128
pixel_size: float = 1e-05
position: tuple[float, float, float]
wavelength: float = 6.58e-07
class oap_model.detector.DiameterSpec(diameter_method: str = 'circle_equivalent', edge_filter: bool = True, framed: bool = True, min_sep: float = None, bound: bool = True, filled: bool = False, z_confinement: bool = False, c: float = 8.0)[source]

Bases: object

bound: bool = True
c: float = 8.0
diameter_method: str = 'circle_equivalent'
edge_filter: bool = True
filled: bool = False
property filters
framed: bool = True
min_sep: float = None
z_confinement: bool = False
class oap_model.detector.ImageFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

NO_EDGE_HALF_INTENSITY = 2
PRESENT_HALF_INTENSITY = 1
PRIMARY_Z_CONFINED = 3
class oap_model.detector.ImagedRegion(detector_position: ndarray, amplitude: AmplitudeField, arm_separation: float = 0.1, particles: DataFrame = None)[source]

Bases: object

A region illuminated by the laser beam at a single instant.

amplitude: AmplitudeField
arm_separation: float = 0.1
detector_position: ndarray
property distance
property end

The end of the region in the detector’s reference frame, note that this is the low y value.

get_focused_image(cloud, detector)[source]
get_frames_to_measure(spec, **kwargs) list[tuple[tuple[float, float], oap_model.intensity.IntensityField]][source]
measure_diameters(spec: DiameterSpec = DiameterSpec(diameter_method='circle_equivalent', edge_filter=True, framed=True, min_sep=None, bound=True, filled=False, z_confinement=False, c=8.0), **kwargs)[source]
particles: DataFrame = None
plot(detector=None, cloud=None, plot_outlines=False, **kwargs)[source]
property start

The start of the region in the detector’s reference frame, note that this is the high y value.

trim_blank_space()[source]

Trim the blank space from the start and end of the image.

property xlims
property y_values

The y values of the detector pixels, aligned so the y value at index i is the y value of the pixel at index i.