arrakis.wsclean_rmsynth

Module Contents

Classes

RMSynthParams

Functions

_clean_loop(phis, rmsf, fdf_residual, fdf_clean, ...)

_gauss(→ numpy.ndarray)

Gaussion function

deconvolve(residual, model, psf, meta)

get_rmsynth_params(→ RMSynthParams)

Get parameters for RMSynth

proper_rm_clean(→ numpy.ndarray)

rmsynth2d(→ numpy.ndarray)

1D RMSynth

rmsynth3d(→ numpy.ndarray)

1D RMSynth

rmsynth_1d(→ numpy.ndarray)

1D RMSynth

simple_clean(→ numpy.ndarray)

Simple clean

class arrakis.wsclean_rmsynth.RMSynthParams[source]

Bases: NamedTuple

ays: numpy.ndarray[source]
fwhm: float[source]
lsq: numpy.ndarray[source]
lsq_0: float[source]
phis: numpy.ndarray[source]
phis_double: numpy.ndarray[source]
rmsf: numpy.ndarray[source]
arrakis.wsclean_rmsynth._clean_loop(phis: numpy.ndarray, rmsf: numpy.ndarray, fdf_residual: numpy.ndarray, fdf_clean: numpy.ndarray, cc_vec: numpy.ndarray, idx_max_rmsf: int, n_phi_pad: int, fwhm: float, cutoff: float, gain: float, max_iter: int)[source]
arrakis.wsclean_rmsynth._gauss(x: numpy.ndarray, amp: float, mu: float, sigma: float) numpy.ndarray[source]

Gaussion function

Parameters:
  • x (np.ndarray) – X values

  • amp (float) – Maximum value

  • mu (float) – Mean

  • sigma (float) – Standard deviation

Returns:

Gaussian data

Return type:

np.ndarray

arrakis.wsclean_rmsynth.deconvolve(residual: numpy.ndarray, model: numpy.ndarray, psf: numpy.ndarray, meta: dict)[source]
arrakis.wsclean_rmsynth.get_rmsynth_params(freqs: numpy.ndarray, weights: numpy.ndarray, nsamp: int = 10) RMSynthParams[source]

Get parameters for RMSynth

Parameters:
  • freqs (np.ndarray) – Frequencies in Hz

  • weights (np.ndarray) – Weights

Returns:

RMSynth parameters

Return type:

RMSynthParams

arrakis.wsclean_rmsynth.proper_rm_clean(phis: numpy.ndarray, phis_double: numpy.ndarray, fdf_dirty: numpy.ndarray, rmsf: numpy.ndarray, ays: numpy.ndarray, fwhm: float, cutoff: float = 0.1, gain: float = 0.1, max_iter: int = 1000) numpy.ndarray[source]
arrakis.wsclean_rmsynth.rmsynth2d(stokes_q: numpy.ndarray, stokes_u: numpy.ndarray, weights: numpy.ndarray, ays: numpy.ndarray, phis: numpy.ndarray) numpy.ndarray[source]

1D RMSynth

Parameters:
  • stokes_q (np.ndarray) – Stokes Q [nchan, pix]

  • stokes_u (np.ndarray) – Stokes U [nchan, pix]

  • weights (np.ndarray) – Weights [nchan]

  • ays (np.ndarray) – Lsq - Lsq_0 [nchan]

  • phis (np.ndarray) – Faraday depths [nphi]

Returns:

FDF [nphi, y, x]

Return type:

np.ndarray

arrakis.wsclean_rmsynth.rmsynth3d(stokes_q: numpy.ndarray, stokes_u: numpy.ndarray, weights: numpy.ndarray, ays: numpy.ndarray, phis: numpy.ndarray) numpy.ndarray[source]

1D RMSynth

Parameters:
  • stokes_q (np.ndarray) – Stokes Q [nchan, y, x]

  • stokes_u (np.ndarray) – Stokes U [nchan, y, x]

  • weights (np.ndarray) – Weights [nchan]

  • ays (np.ndarray) – Lsq - Lsq_0 [nchan]

  • phis (np.ndarray) – Faraday depths [nphi]

Returns:

FDF [nphi, y, x]

Return type:

np.ndarray

arrakis.wsclean_rmsynth.rmsynth_1d(stokes_q: numpy.ndarray, stokes_u: numpy.ndarray, weights: numpy.ndarray, ays: numpy.ndarray, phis: numpy.ndarray) numpy.ndarray[source]

1D RMSynth

Parameters:
  • stokes_q (np.ndarray) – Stokes Q

  • stokes_u (np.ndarray) – Stokes U

  • weights (np.ndarray) – Weights

  • ays (np.ndarray) – Lsq - Lsq_0

  • phis (np.ndarray) – Faraday depths

Returns:

FDF

Return type:

np.ndarray

arrakis.wsclean_rmsynth.simple_clean(phis: numpy.ndarray, fdf: numpy.ndarray, ays: numpy.ndarray, fwhm: float) numpy.ndarray[source]

Simple clean

Parameters:
  • phis (np.ndarray) – Faraday depths

  • fdf (np.ndarray) – FDF

  • ays (np.ndarray) – Lsq - Lsq_0

  • fwhm (float) – FWHM

Returns:

Spectrum

Return type:

np.ndarray