fast_lisa_subtraction.simulation.subtraction module

class fast_lisa_subtraction.simulation.subtraction.SubtractionAlgorithm(catalog_path, tdi_data_path, use_gpu=True, verbose=True, **gbgpu_kwargs)[source]

Bases: SourceCatalog

Local subtraction algorithm for Galactic binary catalogues.

Parameters:
  • catalog_path (str or os.PathLike) – Path to the source catalogue.

  • tdi_data_path (str or os.PathLike) – Path to the AET data catalogue.

  • use_gpu (bool, optional) – If True, attempt to use GPU acceleration.

  • verbose (bool, optional) – If True, enable progress and status logging.

  • **gbgpu_kwargs (dict) – Additional keyword arguments forwarded to the GBGPU backend.

icloop(**kwargs)

Execute the wrapped plotting function with LaTeX rcParams.

Parameters:
  • *args (tuple) – Positional arguments forwarded to plot_func.

  • **kwargs (dict) – Keyword arguments forwarded to plot_func.

Returns:

Return value of plot_func.

Return type:

object

local_subtraction(**kwargs)

Execute the wrapped plotting function with LaTeX rcParams.

Parameters:
  • *args (tuple) – Positional arguments forwarded to plot_func.

  • **kwargs (dict) – Keyword arguments forwarded to plot_func.

Returns:

Return value of plot_func.

Return type:

object

property metadata

Return the current AET metadata dictionary.

Returns:

AET data and metadata.

Return type:

dict

plot_catalogues(**kwargs)

Execute the wrapped plotting function with LaTeX rcParams.

Parameters:
  • *args (tuple) – Positional arguments forwarded to plot_func.

  • **kwargs (dict) – Keyword arguments forwarded to plot_func.

Returns:

Return value of plot_func.

Return type:

object

psd_smooth_moving_average(PSD, Nsegments=300, methoduse='median', extra_smooth='convolution', **kwargs)[source]

Smooth the PSD using a moving average or median.

Parameters:
  • PSD (dict) – Instrumental noise PSD per channel.

  • Nsegments (int, optional) – Segment length used for smoothing.

  • methoduse (str, optional) – Smoothing method: "mean" or "median".

  • extra_smooth (str, optional) – Additional smoothing method: "none", "convolution", "whittaker", "savgol", or "gaussian_kernel".

  • **kwargs (dict) – Additional parameters forwarded to smoothing routines.

Returns:

Smoothed PSD per channel.

Return type:

dict

static read_aet_data(tdi_data_path)[source]

Read an AET waveform catalogue from HDF5.

Parameters:

tdi_data_path (str or os.PathLike) – Path to the AET HDF5 file.

Returns:

Dictionary of AET arrays keyed by channel.

Return type:

dict

run(**run_kwargs)[source]

Run the local subtraction algorithm (alias for icloop).

Parameters:

**run_kwargs (dict) – Keyword arguments forwarded to icloop().

Returns:

(AET, PSD) after subtraction.

Return type:

tuple

update_metadata()[source]

Update the AET metadata after subtraction.

Return type:

None

fast_lisa_subtraction.simulation.subtraction.convergence(S0, S1, tol)[source]

Check convergence between two PSD estimates.

Parameters:
  • S0 (dict) – Previous PSD estimate keyed by channel ("A", "E", "T").

  • S1 (dict) – Current PSD estimate keyed by channel ("A", "E", "T").

  • tol (float) – Relative tolerance threshold for convergence.

Returns:

True if all channels satisfy the relative tolerance.

Return type:

bool