Module src.hs

Functions specific to the implementation of the HyperSARA algorithm [Abdulaziz2019].

src.hs.compute_sara_prior_distributed(x, Psit, n_wavelet_coefficients)

Compute the l21-norm of the wavelet cofficients associated with the SARA dictionary.

Compute \(\Vert \boldsymbol{\Psi}^\dagger \mathbf{X} \Vert_{2,1}\) for an input wideband image \(\mathbf{X} \in \mathbb{R}^{N\times L}\), with \(\boldsymbol{\Psi}^\dagger\) the SARA dictionary [Carrillo2012].

Parameters
  • x (double[:, :, :]) – Wideband image cube [N(1), N(2), L].

  • Psit (lambda function) – SARA dictionary @[1].

  • n_wavelet_coefficients (int) – Number of wavelet coefficients (per channel) [1].

Returns

f – Value of \(\Vert \boldsymbol{\Psi}^\dagger \mathbf{X} \Vert_{2,1}\).

Return type

double

src.hs.hs_initialize_data_worker(y)

Initialize the variables stored on the data workers.

Parameters

y (cell) – Input data, stored as 2-layer cell, the first for channels, the second for data blocks within each channel.

Returns

  • v2 (cell) – Data fidelity dual variable. Same structure as y.

  • norm_res (cell) – Norm of the residual. Same structure as y.

  • t_block (cell) – Last iteration at which each block has been updated {L}{nblocks}. Same structure as y.

  • proj (cell) – Result of the projection step {L}{nblocks}[M, 1]. Same structure as y.

src.hs.hs_initialize_dual_lowrankness_serial(x, reweighting_alpha, sig_bar)

Initalize the dual variables related to the l21-norm prior.

Parameters
  • x (double[:, :, :]) – Wideband image [M, N, L].

  • reweighting_alpha (double) – Reweighting parameter.

  • sig_bar (double) – Reweighting floor level.

Returns

  • v0 (double[:, :]) – Dual variable associated with the nuclear-norm prior [min(M*N, L), 1].

  • weights0 (double[:]) – Associated weights for the reweigthing step.

src.hs.hs_initialize_dual_sparsity_distributed(x, Psit, extension_mode, nlevel, reweighting_alpha, sig)

Initalize the dual variables related to the l21-norm prior.

Parameters
  • x (double[:, :, :]) – Wideband image [M, N, L].

  • Psit (anonymous function) – Full SARA operator @[1].

  • extension_mode (string) – Name of the boundary extension mode.

  • nlevel (int) – Depth of the wavelet decompositions.

  • reweighting_alpha (double) – Rewighting parameter.

  • sig (double) – Estimate of the noise level transferred to the SARA domain.

Returns

  • v1 (double[:, :]) – Dual variable associated with the l21-norm prior [s, L].

  • weights1 (double[:, :]) – Weights associated for the reweigthing step [s, L].

  • s (int) – Number of wavelet decompostion for each channel [1].

src.hs.hs_update_dual_lowrankness_serial(v0, xhat, weights0, beta0, sigma0)

Update the dual variables related to the nuclear norm prior.

Parameters
  • v0 (double[:, :]) – Dual variable associated with the nuclear norm prior [min(M*N, L), 1].

  • xhat (double[:, :, :]) – Auxiliary variable related to the wideband image [M, N, L].

  • weights0 (double[:, :]) – Weights for the reweighting [min(M*N, L), 1].

  • beta0 (double) – Thresholding parameter (gamma0 / sigma0) [1]

  • sigma0 (double) – Convergence parameter [1].

Returns

  • v0 (double[:, :]) – Dual variable associated with the nuclear norm prior [min(M*N, L), 1].

  • weights0 (double[:, :, :]) – Auxiliary variable for the update of the primal variable [M, N, L].

src.hs.hs_update_dual_sparsity_distributed(v1, Psit, Psi, xhat, weights1, beta1, sigma1)

Update the dual variable related to the facet \(\ell_{2,1}\) norm prior.

Parameters
  • v1 (double[:, :]) – Dual variable associated with the facet \(\ell_{2,1}\) norm [s, L].

  • Psit (anonymous function) – Full SARA operator @[1].

  • Psi (anonymous function) – Adjoint of the full SARA operator @[1].

  • xhat (double[:, :, :]) – Auxiliary variable related to the wideband image [M, N, L].

  • weights1 (double[:, :]) – Weights associated with the reweigthing step pixels due to the overlap between facets [M, N].

  • beta1 (double) – Update step (mu / gamma1) [1].

  • sigma1 (double) – Convergence parameter [1].

Returns

  • v1 (double[:, :]) – Dual variable associated with the \(\ell_{2,1}\) norm prior [s, L].

  • g1 (double[:, :, :]) – Auxiliary variable for the update of the primal variable [M, N, L].

src.hs.hs_update_weights_lowrankness_serial(x, reweight_alpha, sig_bar)

Update the weigths for the reweighting of the nuclear norm prior.

Parameters
  • x (double[:, :, :]) – Wideband image [M, N, L].

  • reweight_alpha (double) – Reweighting parameter [1].

  • sig_bar (double) – Noise level (singular value space).

Returns

weights – Weights associated with the reweigthing step [s, L].

Return type

double[:, :]

src.hs.hs_update_weights_sparsity_distributed(x, Psit, weights, reweight_alpha, sig)

Update the weigths for the reweighting of the l21-norm prior.

Parameters
  • x (double[:, :, :]) – Wideband image [M, N, L].

  • Psit (lambda functions) – Full SARA operator @[1].

  • weights (double[:, :]) – Weights associated with the reweigthing step [s, L].

  • reweight_alpha (double) – Reweighting parameter [1].

  • sig (double) – Estimate of the noise level in the SARA domain.

Returns

weights – Updated weights associated with the reweigthing step [s, L].

Return type

double[:, :]

src.hs.hyperSARA(y, epsilon, A, At, pU, G, W, param, K, wavelet, nlevel, spectral_chunk, n_channels, M, N, oy, ox, warmstart_name, checkpoint_name, flag_dimensionality_reduction, Sigma, varargin)

Implementation of the HyperSARA imaging algorithm.

Implementation of the reweighting / PDFB algorithm underlying the HyperSARA imaging approach [Abdulaziz2019]. At each iteration of the outer reweighting scheme, the PDFB solves a problem of the form

\[\min_{X \in \mathbb{R}_+^{N \times L}} \overline{\mu} \| X \|_{\overline{\omega}, *} + \mu \|\Psi^\dagger X \|_{\omega, 2,1} + \sum_{\ell, b} \iota_{ \{\| y_{\ell, b} - \Phi_{\ell, b}(\cdot) \|_2 \leq \varepsilon_{\ell, b}\} } (x_\ell).\]
Parameters
  • y (composite, cell) – Blocks of visibilities {L}{nblocks_l}.

  • epsilon (composite, cell) – Data fidelity constraints {L}{nblocks_l}.

  • A (function handle) – Measurement operator.

  • At (function handle) – Adjoint of the measurement operator.

  • pU (composite, cell) – Preconditioning matrices {L}{nblocks_l}.

  • G (composite, cell of sparse matrices) – Degridding matrices {L}{nblocks_l}.

  • W (composite, cell of int[:]) – Masks for selection of the blocks of visibilities.

  • param (struct) – Algorithm parameters.

  • K (int) – Number of data workers.

  • wavelet (cell of string) – List of wavelet basis (for the SARA prior). If the Dirac basis ('self') is considered, it needs to appear in last position.

  • nlevel (int) – Number of wavelet decomposition levels.

  • spectral_chunk (cell of int[:]) – List of channels handled by each data process {K, 1}.

  • n_channels (int) – Total number of spectral channels.

  • M (int) – Spatial image size along axis y.

  • N (int) – Spatial image size along axis x.

  • oy (int) – Fourier oversampling factor along axis y.

  • ox (int) – Fourier oversampling factor along axis x.

  • warmstart_name (string) – Name of a valid .mat file to initialize the solver (warm-start).

  • checkpoint_name (string) – Name defining the name for checkpoint files saved throughout the iterations.

  • flag_dimensionality_reduction (bool) – Flag to indicate data dimensiomality reduction is used.

  • Sigma (composite, cell of complex[:, :]) – Dimensionality reduction matrix. (?)

  • varargin{1} (double[:, :]) – Initial value for the primal variable [M*N, L].

  • varargin{2} (double[:, :]) – Ground truth wideband image (only when debugging synthetic data experiments) [M*N, L].

Returns

xsol – Reconstructed wideband image [M*N, L].

Return type

double[:, :]

Important

  • The param structure should contain the following fields.

param.verbose (string)

Print log or not

param.save_intermediate_results_mat (bool)

Flag to save all estimates in a .mat file after each re-weighted

param.nu0 (double)

Norm of the splitting operator used to defined the low-rankness dual variable (identity, thus fixed to 1).

param.nu1 (double)

Upper bound on the norm of the SARA operator \(\Psi^\dagger\).

param.nu2 (double)

Upper bound on the norm of the measurement operator \(\Phi\)

param.gamma (double)

Regularization parameter (sparsity prior).

param.gamma0 (double)

Regularization parameter (low-rankness prior).

param.pdfb_min_iter (int)

Minimum number of iterations (PDFB).

param.pdfb_max_iter (int)

Maximum number of iterations (PDFB).

param.pdfb_rel_var (double)

Relative variation tolerance (PDFB).

param.pdfb_fidelity_tolerance (double)

Tolerance to check data constraints are satisfied (PDFB).

param.reweighting_max_iter (int)

Maximum number of reweighting steps.

param.reweighting_min_iter (int)

Minimum number of reweighting steps (to reach “noise” level).

param.reweighting_rel_var (double)

Tolerance relative variation (reweighting).

param.reweighting_alpha (double)

Starting reweighting parameter.

param.reweighting_sig (double)

Noise level (in wavelet space)

param.reweighting_sig_bar (double)

Noise level (singular value space)

param.elipse_proj_max_iter (int)

Maximum number of iterations for the FB algo that implements the projection onto the ellipsoid.

param.elipse_proj_min_iter (int)

Minimum number of iterations for the FB algo that implements the projection onto the ellipsoid.

parma.elipse_proj_eps (double)

Stopping criterion for the projection.

  • The following fileds are added to param in the course of the algorithm to be able to restart it from a previous state

param.reweighting_alpha (double)

Current state of the reweighting parameter.

param.init_reweight_step_count (int)

Iteration index of the current reweighting step when the checkpoint file is written.

param.init_reweight_last_iter_step (int)

Global iteration index (unrolled over all pdfb iterations performed in the reweighting scheme) from which to restart the algorithm.

param.init_t_start (int)

Global iteration index (unrolled over all pdfb iterations performed in the reweighting scheme) from which to restart the algorithm (param.init_t_start = param.init_reweight_last_iter_step + 1).

  • The following fileds are added to param in the course of the algorithm to be able to restart it from a previous state

param.reweighting_alpha (double)

Current state of the reweighting parameter.

param.init_reweight_step_count (int)

Iteration index of the current reweighting step when the checkpoint file is written.

param.init_reweight_last_iter_step (int)

Global iteration index (unrolled over all pdfb iterations performed in the reweighting scheme) from which to restart the algorithm.

param.init_t_start (int)

Global iteration index (unrolled over all pdfb iterations performed in the reweighting scheme) from which to restart the algorithm (param.init_t_start = param.init_reweight_last_iter_step + 1).

  • The following fileds are involved in the adaptive estimation of the noise level

param.flag_adjust_noise (bool)

Flag to activate the adaptive procedure to estimate the noise level.

param.pdfb_adjust_noise_min_iter (int)

Minimum number of iterations to enable the adjustement of the estimate of the noise level.

param.pdfb_adjust_noise_rel_var (double)

Tolerance relative variation (reweighting) to to enable the adjustement of the estimate of the noise level.

param.pdfb_adjust_noise_start_iter (int)

Number of iterations to force triggering noise adjustement.

Note

The checkpoint file saved throughout the iterations is composed of the following variables (to be verified).

param (struct)

Current state of the parameter structure (updated with auxiliary parameters describing the state of the solver when the checkpoint file has been written).

xsol (double[:, :])

Current state of the image estimate.

res (double[:, :, :])

Current state of the wideband residual image.

g (double[:, :])

Auxiliary variable involved in the update of the primal variable.

epsilon (cell of cell of double)

(Updated) Value of the l2-ball radii.

t_block (cell of cell of int)

Index of the last iteration where the weigths have been updated.

proj (cell of cell of complex[:])

Auxiliary variable involved in the update of the data fidelity dual variables.

norm_res (cell of cell of double)

Norm of the residual image (per channel per block).

v0 (cell of double[:])

Dual variables associated with the low-rankness.

v1 (double[:, :])

Dual variables associated with the sparsity prior.

v2 (cell of cell complex[:])

Dual variables associated with the data fidelity terms (each cell corresponding to a data block).

weights0 (cell of double[:])

Weights associated with the low-rankness prior.

weights1 (cell of double[:])

Weights associated with the sparsity prior.

end_iter (int)

Last iteration (unrolled over all pdfb iterations).

t_l21 (double)

Time to update the sparsity dual variable.

t_nuclear (double)

Time to update the low-rankness dual variable.

t_master (double)

Time to perform update/computations on the master process.

t_data (double)

Time to update the data fidelity dual variables.

rel_val (double)

Relative variation of the solution across the iterations.