hyri.optimiser.fb_hypersara#

Define the Hyper-uSARA optimiser.

This module provides the Hyper-uSARA optimiser built on the shared forward-backward backbone with positivity and reweighted sparse analysis regularisation.

Class

FBHyperSARA

Represent the Hyper-uSARA forward-backward optimiser.

class hyri.optimiser.fb_hypersara.FBHyperSARA(meas: list[Tensor], ch_freq: Tensor, meas_op: MeasOpHyperspectral, regulariser: ProxHyperSARAPos, rank_ch_start: int = 0, meas_op_approx: MeasOpHyperspectral | None = None, im_min_itr: int = 30, im_max_itr: int = 2000, im_var_tol: float = 1e-05, heu_reg_scale: float = 1.0, im_max_itr_outer: int = 20, im_var_tol_outer: float = 0.0001, save_pth: str = 'results', file_prefix: str = '', reweight_save: bool = True, verbose: bool = True)#

Bases: ForwardBackward

Represent the Hyper-uSARA forward-backward optimiser.

This class combines the shared forward-backward optimisation loop with a hyperspectral reweighted SARA prior under positivity. The optimisation is organised into inner forward-backward iterations and outer major cycles that refresh the wavelet-analysis weights.

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.

_use_approx_meas_op#

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

Type:

bool

_im_max_itr_inner#

Maximum number of iterations per major cycle.

Type:

int

_im_min_itr#

Minimum number of inner iterations before checking convergence.

Type:

int

_im_var_tol#

Relative-variation tolerance for the inner loop.

Type:

float

_im_max_itr_outer#

Maximum number of reweighting major cycles.

Type:

int

_im_var_tol_outer#

Relative-variation tolerance for the outer reweighting loop.

Type:

float

_reweight_save#

Whether intermediate products are saved at the end of each major cycle.

Type:

bool

_verbose#

Whether informational logs are printed.

Type:

bool

_heuristic_l2#

Channel-collapsed heuristic level used by the hyperspectral regulariser.

Type:

torch.Tensor

_model_prev_re#

Model image saved at the start of the current major cycle.

Type:

torch.Tensor

_iter_inner#

Inner forward-backward iteration index within the current major cycle.

Type:

int

_iter_outer#

Major-cycle index for reweighting.

Type:

int

_reweighting_flag#

Whether the current iteration ended a major cycle and triggered reweighting.

Type:

bool

_t_iter_outer#

Elapsed time of the current major cycle.

Type:

float

_im_rel_var#

Current relative image variation in the inner loop.

Type:

float

_im_rel_var_outer#

Relative image variation between two successive major cycles.

Type:

float

Example

>>> optimiser = FBHyperSARA(
...     meas=meas,
...     ch_freq=ch_freq,
...     meas_op=meas_op,
...     regulariser=regulariser,
... )
>>> optimiser.initialisation()
>>> optimiser.run()
>>> optimiser.finalisation()

References

Tang, C., Dabbech, A., Jackson, A., & Wiaux, Y. (2026). HyperAIRI: A Plug-and-play Algorithm for Precise Hyperspectral Image Reconstruction in Radio Interferometry. The Astrophysical Journal Supplement Series, 283(1), 9.

Initialise the Hyper-uSARA 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) – Precise hyperspectral measurement operator used for diagnostics and final products.

  • regulariser (ProxHyperSARAPos) – Hyper-uSARA proximal 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 inner-loop iterations before checking convergence. Default: 30.

  • im_max_itr (int, optional) – Maximum number of inner-loop iterations per major cycle. Default: 2000.

  • im_var_tol (float, optional) – Relative-variation tolerance for the inner loop. Default: 1e-5.

  • heu_reg_scale (float, optional) – Multiplicative scaling applied to the heuristic regularisation levels. Default: 1.0.

  • im_max_itr_outer (int, optional) – Maximum number of reweighting major cycles. Default: 20.

  • im_var_tol_outer (float, optional) – Relative-variation tolerance for the outer reweighting loop. Default: 1e-4.

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

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

  • reweight_save (bool, optional) – Save intermediate products at the end of each major cycle. Default: True.

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

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, and heuristic calculations.

initialisation() → None#

Initialise Hyper-uSARA-specific optimisation parameters.

This method sets the forward-backward step size, computes the channel-wise and collapsed heuristic levels, configures the wavelet noise floor and soft-thresholding levels, and initialises the first set of reweighting coefficients.

_each_iter_begin() → None#

Run logic at the beginning of each iteration.

This method resets the outer-loop timer when a new major cycle starts.

_stop_criteria() → bool#

Evaluate the Hyper-uSARA stopping criteria.

The algorithm stops only after both the inner forward-backward loop and the outer reweighting loop satisfy their respective stopping conditions.

Returns:

True when the overall optimisation should stop, otherwise False.

Return type:

bool

_each_iter_end() → None#

Run post-processing at the end of each iteration.

When an inner loop finishes, this method refreshes the reweighting coefficients, optionally saves intermediate products, and advances the major-cycle counters.

finalisation() → None#

Finalise Hyper-uSARA 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.