hyri.optimiser.fb_sara#

Define the uSARA optimiser built on the forward-backward backbone.

This module provides the reweighted sparse-analysis optimiser used for hyperspectral RI imaging with positivity and SARA regularisation.

Class

FBSARA

Represent the uSARA forward-backward optimiser.

class hyri.optimiser.fb_sara.FBSARA(meas: list[Tensor], ch_freq: Tensor, meas_op: MeasOpHyperspectral, regulariser: ProxSARAPos, 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 uSARA forward-backward optimiser.

This class combines the shared forward-backward optimisation loop with the SARA reweighting strategy and a positivity-constrained proximal operator. It alternates inner forward-backward iterations with outer reweighting cycles until both inner-loop and outer-loop stopping criteria are met.

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_max_itr_inner#

Maximum number of inner forward-backward 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 inner iterations.

Type:

float

_im_max_itr_outer#

Maximum number of reweighting cycles.

Type:

int

_im_var_tol_outer#

Relative-variation tolerance for reweighting cycles.

Type:

float

_reweight_save#

Whether intermediate reweighting products are saved to disk.

Type:

bool

_verbose#

Whether informational logs are printed.

Type:

bool

_model_prev_re#

Model image cached at the previous reweighting cycle.

Type:

torch.Tensor

_iter_inner#

Current inner-loop iteration index.

Type:

int

_iter_outer#

Current outer-loop iteration index.

Type:

int

_reweighting_flag#

Whether a reweighting update should be applied at the end of the current iteration.

Type:

bool

_t_iter_outer#

Elapsed time of the current reweighting cycle.

Type:

float

_im_rel_var#

Current inner-loop relative image variation.

Type:

float

_im_rel_var_outer#

Current outer-loop relative image variation.

Type:

float

Example

>>> optimiser = FBSARA(
...     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.

Initialise the uSARA 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 (ProxSARAPos) – Positivity-constrained SARA proximal operator.

  • 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. Default: 30.

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

  • im_var_tol (float, optional) – Inner-loop relative-variation tolerance. Default: 1e-5.

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

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

  • im_var_tol_outer (float, optional) – Outer-loop relative-variation tolerance. 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 after each reweighting 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 uSARA-specific optimisation parameters.

This method sets the forward-backward step size, computes heuristic regularisation levels, configures the wavelet noise floor and soft thresholding value, and resets reweighting-loop state.

_each_iter_begin() → None#

Run bookkeeping at the beginning of each iteration.

_stop_criteria() → bool#

Evaluate the inner-loop and reweighting stopping criteria.

The imaging loop terminates when the current reweighting cycle has converged or reached its iteration budget and the outer reweighting loop has also met its own stopping criterion.

Returns:

True if the global stopping criterion is met.

Return type:

bool

_each_iter_end() → None#

Update reweighting state and save intermediate products.

finalisation() → None#

Finalise uSARA outputs and save the reconstructed products.