hyri.optimiser.pd_airi#

Define the constrained AIRI optimiser.

This module provides the cAIRI optimiser built on the shared primal-dual backbone with an AIRI denoiser in the primal update and a constrained data-fidelity prox in the dual update.

Class

PDAIRI

Represent the constrained AIRI primal-dual optimiser.

class hyri.optimiser.pd_airi.PDAIRI(meas: list[Tensor], ch_freq: Tensor, meas_op: MeasOpHyperspectral, regulariser_prime: DenAIRI, regulariser_dual_data: ProxEllipsoid, rank_ch_start: int = 0, im_min_itr: int = 100, im_max_itr: int = 2000, im_var_tol: float = 0.0001, im_peak_est: float | None = None, heu_noise_scale: float = 1.0, adapt_net_select: bool = True, peak_tol_min: float = 0.001, peak_tol_max: float = 0.1, peak_tol_step: float = 0.1, verbose: bool = True, save_pth: str = 'results', file_prefix: str = '', iter_save: int = 1000)#

Bases: PrimalDualPrecond

Represent the constrained AIRI primal-dual optimiser.

This class combines the shared primal-dual optimisation loop with an AIRI denoiser in the primal image update and an ellipsoidal data-fidelity prox in the dual visibility update. It can also adapt AIRI denoiser selection from channel-wise peak estimates as the reconstruction evolves.

Shape:
  • Image tensor – (1, C_rank, H, W).

  • Visibility tensor – tuple of C_rank tensors, each with shape (1, 1, N_c).

  • Frequency tensor – (1, C_total, 1, 1) after reshaping in the base optimiser.

_im_min_itr#

Minimum number of iterations before convergence is checked.

Type:

int

_im_var_tol#

Relative-variation tolerance for the image model.

Type:

float

_im_peak_est#

User-provided image peak estimate, if any.

Type:

float | None

_adapt_net_select#

Whether AIRI denoiser selection is adapted during optimisation.

Type:

bool

_peak_tol_min#

Minimum allowed relative peak-variation threshold.

Type:

float

_peak_tol#

Current relative peak-variation threshold.

Type:

float

_peak_tol_step#

Multiplicative decay factor applied to the peak-variation threshold.

Type:

float

_peak_val_range#

Current valid peak-value range returned by the denoiser selector.

Type:

list

_verbose#

Whether informational logs are printed.

Type:

bool

_iter_save#

Interval between intermediate FITS snapshots.

Type:

int

_prev_peak_val#

Previous channel-wise image peak estimate.

Type:

torch.Tensor | float | None

_im_rel_var#

Current relative image variation.

Type:

float

Example

>>> optimiser = PDAIRI(
...     meas=meas,
...     ch_freq=ch_freq,
...     meas_op=meas_op,
...     regulariser_prime=regulariser_prime,
...     regulariser_dual_data=regulariser_dual_data,
... )
>>> optimiser.initialisation()
>>> optimiser.run()
>>> optimiser.finalisation()

References

Terris, M., Tang, C., Jackson, A., & Wiaux, Y. (2025). The AIRI plug-and-play algorithm for image reconstruction in radio- interferometry: variations and robustness. MNRAS, 537(2), 1608-1619.

Initialise the constrained AIRI optimiser.

Parameters:
  • meas (List[torch.Tensor]) – Local measurement tensors, typically one tensor per local channel.

  • ch_freq (torch.Tensor) – Frequencies for all spectral channels.

  • meas_op (MeasOpHyperspectral) – Hyperspectral measurement operator.

  • regulariser_prime (DenAIRI) – AIRI denoiser used in the primal image update.

  • regulariser_dual_data (ProxEllipsoid) – Proximal operator applied to the dual data variable.

  • rank_ch_start (int, optional) – Global starting channel index owned by the current rank. Default: 0.

  • im_min_itr (int, optional) – Minimum number of iterations before convergence is checked. Default: 100.

  • im_max_itr (int, optional) – Maximum number of iterations. Default: 2000.

  • im_var_tol (float, optional) – Relative-variation tolerance. Default: 1e-4.

  • im_peak_est (float | None, optional) – User-provided image peak estimate. Default: None.

  • heu_noise_scale (float, optional) – Multiplicative scaling applied to heuristic noise levels. Default: 1.0.

  • adapt_net_select (bool, optional) – Adapt AIRI denoiser selection during optimisation. Default: True.

  • peak_tol_min (float, optional) – Minimum allowed relative peak-variation threshold. Default: 1e-3.

  • peak_tol_max (float, optional) – Initial relative peak-variation threshold. Default: 0.1.

  • peak_tol_step (float, optional) – Multiplicative decay factor for the peak-variation threshold. Default: 0.1.

  • verbose (bool, optional) – Enable informational logging. Default: True.

  • save_pth (str, optional) – Directory where optimiser products are saved. Default: "results".

  • file_prefix (str, optional) – Prefix prepended to saved file names. Default: "".

  • iter_save (int, optional) – Save interval for intermediate FITS products. Default: 1000.

initialisation() → None#

Initialise cAIRI-specific optimisation parameters.

This method computes the primal step size from the preconditioned operator norm, estimates image peaks, computes heuristic noise levels, and initialises the AIRI denoiser selector.

_estimate_channel_wise_peak_val() → None#

Estimate or set channel-wise image peak values.

When no user estimate is provided, this method uses the channel-wise maxima of the normalised dirty image.

_each_iter_begin() → None#

Run logic at the beginning of each iteration.

No per-iteration pre-processing is required for cAIRI.

_stop_criteria() → bool#

Evaluate the cAIRI stopping criterion.

The stopping criterion checks both image stabilisation and whether the current model satisfies the ellipsoidal data-fidelity constraint.

Returns:

True when the optimisation should stop, otherwise False.

Return type:

bool

_each_iter_end() → None#

Run post-processing at the end of each iteration.

This method saves intermediate products and updates the AIRI denoiser selection when the channel-wise peak estimates have stabilised enough.

finalisation() → None#

Finalise cAIRI and save the reconstructed products.

This method prints final log information, saves the reconstructed model and residual dirty images, and exports a spectral-index map when the final model has a spectral dimension.