Compiled models and measurements¶
Compiled models form the boundary between physical experiment configuration and the algorithms. Measurements are nonnegative float64 intensities with a leading frame axis. See concepts and conventions for the Fourier and array conventions shared by both objects.
ImagePlaneModel
¶
Compiled pupil, Fourier crops, sampling, and frame/source weights.
Models are constructed by compile_model, not
directly. Returned arrays copy immutable compiled data. Shape tuples use
(height, width); wave vectors use radians per metre.
reconstruction_shape
property
¶
reconstruction_shape: Shape2D
Return the high-resolution complex-object shape.
is_multiplexed
property
¶
is_multiplexed: bool
Return whether any frame incoherently combines multiple sources.
pupil
property
¶
pupil: ComplexArray
Return the sampled complex pupil on the low-resolution Fourier grid.
pupil_support
property
¶
pupil_support: MaskArray
Return the uint8 aperture-support mask shaped image_shape.
frame_gains
property
¶
frame_gains: FloatArray | None
Return optional positive acquisition-frame intensity multipliers.
suggest_reconstruction_shape
¶
suggest_reconstruction_shape(
optics: Optics,
illumination: Illumination,
image_shape: Shape2D,
reconstruction_shape: ReconstructionShapeSpec = "smooth",
) -> Shape2D
Resolve a reconstruction-size choice without building pupil or crop arrays.
compile_model
¶
compile_model(
optics: Optics,
illumination: Illumination,
image_shape: Shape2D,
reconstruction_shape: ReconstructionShapeSpec = "smooth",
) -> ImagePlaneModel
Compile experiment geometry into an immutable image-plane model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
optics
|
Optics
|
Valid physical microscope parameters. |
required |
illumination
|
Illumination
|
Complete geometry, calibration, and acquisition description. |
required |
image_shape
|
Shape2D
|
Low-resolution frame shape as |
required |
reconstruction_shape
|
ReconstructionShapeSpec
|
Exact high-resolution shape, or |
'smooth'
|
Returns:
| Type | Description |
|---|---|
ImagePlaneModel
|
Pupil, Fourier crops, sampling, source weights, and frame gains used by simulation and reconstruction. |
compile_camera_model
¶
compile_camera_model(
model: ImagePlaneModel, camera: CameraModel
) -> ImagePlaneModel
Compile the known uniform linear detector response into a model.
Pixel sensitivity, stochastic noise, clipping, quantization, and bad pixels remain detector effects and are not represented in the returned model.
MeasurementStack
¶
MeasurementStack(
measurements: FloatArray,
*,
frame_weights: Sequence[float] | None = None,
masks: MaskArray | None = None,
)
Resident float64 intensity stack shaped (frames, height, width).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
measurements
|
FloatArray
|
Nonnegative finite float64 array with shape |
required |
frame_weights
|
Sequence[float] | None
|
Optional finite nonnegative weight per frame; omitted weights are one. |
None
|
masks
|
MaskArray | None
|
Optional uint8 array matching |
None
|
frame_weights
property
¶
frame_weights: FloatArray
Return a float64 copy containing one objective weight per frame.
ReconstructionProblem
¶
ReconstructionProblem(
measurements: FloatArray | MeasurementStack,
model: ImagePlaneModel,
*,
frame_weights: Sequence[float] | None = None,
masks: MaskArray | None = None,
name: str | None = None,
)
Validated pairing of measurements and a compiled image-plane model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
measurements
|
FloatArray | MeasurementStack
|
Float64 |
required |
model
|
ImagePlaneModel
|
Compiled model with matching frame count and low-resolution shape. |
required |
frame_weights
|
Sequence[float] | None
|
Optional metadata used only when |
None
|
masks
|
Sequence[float] | None
|
Optional metadata used only when |
None
|
name
|
str | None
|
Optional human-readable problem identifier propagated to metadata. |
None
|