Utilities

lisatools.utils.utility.get_array_module(arr: ndarray) object

Return array library of an array (np/cp).

Parameters:

arr – Numpy or Cupy array.

lisatools.utils.utility.generate_noise_fd(N: int, df: float, *sensitivity_args: Any, func: Callable | None = None, **sensitivity_kwargs: Any) ndarray[float]

Generate noise directly in the Frequency Domain.

Parameters:
  • N – Number of points in frequency domain waveform assuming frequencies greater than or equal to zero.

  • df – Frequency domain bin size (1 / (N * dt)).

  • sensitivity_args – Arguments for func.

  • func – Function for generating the sensitivity curve as a function of frequency. (default: lisatools.sensitivity.get_sensivity())

  • sensitivity_kwargs – Keyword arguments for func.

Returns:

An instance of generated noise in the frequency domain.

lisatools.utils.utility.AET(X: float | ndarray, Y: float | ndarray, Z: float | ndarray) Tuple[float | ndarray, float | ndarray, float | ndarray]

Transform to AET from XYZ

\[A = (Z - X) / \sqrt(2)\]
\[E = (X - 2Y + Z) / \sqrt(6)\]
\[T = (X + Y + Z) / \sqrt(3)\]
Parameters:
  • X – X-channel information.

  • Y – Y-channel information.

  • Z – Z-channel information.

Returns:

A, E, T Channels.