hyri.optimiser.fb_airi#

Define the unconstrained AIRI optimiser.

This module provides the AIRI optimiser built on the shared forward-backward backbone with adaptive denoiser selection.

Class

FBAIRI

Represent the AIRI forward-backward optimiser.

class hyri.optimiser.fb_airi.FBAIRI(meas: list[Tensor], ch_freq: Tensor, meas_op: MeasOpHyperspectral, regulariser: DenAIRI, rank_ch_start: int = 0, meas_op_approx: MeasOpHyperspectral | None = None, 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: ForwardBackward

Represent the AIRI forward-backward optimiser.

This class combines the shared forward-backward optimisation loop with a denoising AIRI prior. It optionally uses an approximate measurement operator during the iterative forward step and can adapt the 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_rank, 1, 1) after reshaping in the base optimiser.

_use_approx_meas_op#

Whether an approximate measurement operator is used in the iterative forward step.

Type:

bool

_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 = FBAIRI(
...     meas=meas,
...     ch_freq=ch_freq,
...     meas_op=meas_op,
...     regulariser=regulariser,
... )
>>> optimiser.initialisation()
>>> optimiser.run()
>>> optimiser.finalisation()

References

Terris, M., Dabbech, A., Tang, C., & Wiaux, Y. (2023). Image reconstruction algorithms in radio interferometry: From handcrafted to learned regularization denoisers. MNRAS, 518(1), 604-622.

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 AIRI optimiser.

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

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

  • meas_op (MeasOpHyperspectral) – Precise hyperspectral measurement operator used for diagnostics and final products.

  • regulariser (DenAIRI) – AIRI denoising regulariser.

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

  • meas_op_approx (MeasOpHyperspectral | None, optional) – Optional approximate measurement operator used during the iterative forward step. Default: None.

  • 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.

Note

When meas_op_approx is provided, the approximate operator is used in the iterative forward step while meas_op remains the reference operator for dirty-image, PSF, peak estimation, and heuristic calculations.

initialisation() → None#

Initialise AIRI-specific optimisation parameters.

This method sets the forward-backward step size, estimates channel-wise image peaks, computes heuristic noise levels, initialises the AIRI denoiser selector, and prints configuration information when verbose logging is enabled.

_estimate_channel_wise_peak_val() → None#

Estimate or set channel-wise image peak values.

If self._im_peak_est is not provided, this method estimates peak values from the dirty image normalized by the PSF peak. The result is stored in self._prev_peak_val with shape (1, C_rank, 1, 1).

_each_iter_begin() → None#

Run bookkeeping at the beginning of each iteration.

_stop_criteria() → bool#

Evaluate the AIRI stopping criterion.

This method computes the relative image variation across all ranks, reports iteration statistics when verbose logging is enabled, and terminates once the minimum iteration count has been reached and the relative variation falls below the tolerance.

Returns:

True if the stopping criterion is met.

Return type:

bool

_each_iter_end() → None#

Save intermediate results and update AIRI denoiser selection.

finalisation() → None#

Finalise AIRI outputs and save the reconstructed products.