qem.stats
Functions
|
Adds Poisson noise to an image. |
|
Compute the Cramer-Rao Bound (CRB) given a Fisher Information Matrix (FIM). |
|
Compute the Fisher Information Matrix (FIM) for a given model function with Poisson noise. |
|
Compute the joint probability P(omega | theta) for a 2D image with Poisson-distributed data. |
- qem.stats.add_poisson_noise(image, key_id: int = 0)[source]
Adds Poisson noise to an image.
Parameters: - image: 2D array of pixel values (representing intensities). - key: JAX random key for reproducibility.
Returns: - noisy_image: The image with Poisson noise applied.
- qem.stats.compute_fim(model_func, params)[source]
Compute the Fisher Information Matrix (FIM) for a given model function with Poisson noise.
Parameters: - model_func: The model function, e.g., Gaussian, Lorentzian, etc. - params: Parameters of the model function as a JAX array. - obs: Observed image data. - x, y: Grid of points over the 2D image. - dose: Dose parameter that scales the intensity (affects Poisson noise).
Returns: - FIM: Fisher Information Matrix.
- qem.stats.compute_crb(fim)[source]
Compute the Cramer-Rao Bound (CRB) given a Fisher Information Matrix (FIM).
Parameters: - fim: Fisher Information Matrix.
Returns: - crb: Cramer-Rao Bound for each parameter.
- qem.stats.joint_probability_2d(observations, params, model_func)[source]
Compute the joint probability P(omega | theta) for a 2D image with Poisson-distributed data.
Parameters: - observations: The observed 2D image data (e.g., pixel values) as a JAX array. - params: Parameters of the model function as a JAX array. - model_func: The model function to compute lambda_k. - x, y: Grid of points over the 2D image (same shape as observations). - dose: Dose parameter that scales the intensity (affects Poisson noise).
Returns: - Joint probability P(omega | theta) for the entire 2D image.