rm_lite.tools_1d.rmclean

RM-CLEAN on 1D data

Attributes

Classes

RMClean1DResults

Resulting arrays from RM-synthesis

Functions

run_rmclean_from_synth(→ RMClean1DResults)

Run RM-CLEAN on the results of RM-synth.

Module Contents

class rm_lite.tools_1d.rmclean.RMClean1DResults

Bases: NamedTuple

Resulting arrays from RM-synthesis

clean_parameters: polars.DataFrame

RMClean parameters

fdf_arrs: polars.DataFrame

RMClean arrays

fdf_parameters: polars.DataFrame

FDF parameters

rm_lite.tools_1d.rmclean.run_rmclean_from_synth(rm_synth_1d_results: rm_lite.tools_1d.rmsynth.RMSynth1DResults, auto_mask: float = 7, auto_threshold: float = 1, max_iter: int = 100000, gain: float = 0.1, mask_arr: numpy.typing.NDArray[numpy.bool_] | None = None, moment_threshold_snr: float = 5.0, multiscale: bool = False, multiscale_scales: numpy.typing.NDArray[numpy.float64] | None = None, multiscale_n_scales: int | None = None, multiscale_kernel: Literal['tapered_quad', 'gaussian'] = 'tapered_quad', multiscale_max_iter_sub_minor: int = 10000, multiscale_sub_minor_fraction: float = 0.5, multiscale_selection_margin: float = 0.08) RMClean1DResults

Run RM-CLEAN on the results of RM-synth.

Parameters:
  • rm_synth_1d_results (RMSynth1DResults) – Results from RM-synth.

  • auto_mask (float, optional) – Masking threshold in SNR. Defaults to 7.

  • auto_threshold (float, optional) – Cleaning threshold in SNR. Defaults to 1.

  • max_iter (int, optional) – Maximum CLEAN iterations. Defaults to 10_000.

  • gain (float, optional) – CLEAN gain. Defaults to 0.1.

  • mask_arr (NDArray[np.bool_] | None, optional) – Optional mask array. Defaults to None.

  • moment_threshold_snr (float, optional) – SNR cut (times the theoretical FDF noise) applied to the clean FDF amplitudes before computing the Faraday moments. Defaults to 5.0.

  • multiscale (bool, optional) – Use multiscale RM-CLEAN (recovers Faraday-thick structure). Defaults to False.

  • multiscale_scales (NDArray[np.float64] | None, optional) – Explicit scales (RMSF FWHM units); None auto-selects from the RMSF max scale.

  • multiscale_n_scales (int | None, optional) – Cap on the auto scale count.

  • multiscale_kernel ("tapered_quad" | "gaussian", optional) – Scale kernel. Defaults to “tapered_quad”.

  • multiscale_max_iter_sub_minor (int, optional) – Max sub-minor iterations per scale. Defaults to 10_000.

  • multiscale_sub_minor_fraction (float, optional) – Sub-minor re-selection fraction. Defaults to 0.5.

  • multiscale_selection_margin (float, optional) – Hybrid scale-selection parsimony margin in [0, 1). Among scales within this fraction of the best matched-filter score the smallest is chosen, keeping points on the delta scale. Defaults to 0.08.

Returns:

RM-CLEAN results: fdf_parameters, fdf_arrs, clean_parameters.

Return type:

RMClean1DResults

rm_lite.tools_1d.rmclean.rmclean_arrs_schema
rm_lite.tools_1d.rmclean.rmclean_arrs_schema_df
rm_lite.tools_1d.rmclean.rmclean_scalar_schema
rm_lite.tools_1d.rmclean.rmclean_scalar_schema_df