waveformtools.transforms — waveformtools 2022-05-03 documentation

# waveformtools.transforms

Methods to transform the waveform

Functions

`Yslm`(spin_weight, ell, emm, theta, phi) | Spin-weighted spherical harmonics data defined as a function of zeta and phi, for qlm data decomposition.
`Yslm_pres`(spin_weight, ell, emm, theta, phi) | Spin-weighted spherical harmonics data defined as a function of zeta and phi, for qlm data decomposition.
`Yslm_vec`(spin_weight, ell, emm, theta_grid, ...) | Spin-weighted spherical harmonics data defined as a function of zeta and phi, for qlm data decomposition.
`compute_fft`(udata_x, delta_x) | Find the FFT of the samples in time-space, and return with the frequencies.
`compute_ifft`(utilde, delta_f) | Find the inverse FFT of the samples in frequency-space, and return with the time axis.
`set_fft_conven`(utilde_orig) | Make a numppy fft consistent with the chosen conventions.
`unset_fft_conven`(utilde_conven) | Make an actual conventional fft consistent with numpy's conventions.

waveformtools.transforms.Yslm(spin_weight, ell, emm, theta, phi)

  Spin-weighted spherical harmonics data defined as a function of zeta and phi, for qlm data decomposition.

  Returns:
    Yslmfloat

      The value of Yslm at :math:`theta, phi’.

waveformtools.transforms.Yslm_pres(spin_weight, ell, emm, theta, phi, pres=16)

  Spin-weighted spherical harmonics data defined as a function of zeta and phi, for qlm data decomposition.

waveformtools.transforms.Yslm_vec(spin_weight, ell, emm, theta_grid, phi_grid)

  Spin-weighted spherical harmonics data defined as a function of zeta and phi, for qlm data decomposition.

  Returns:
    Yslmfloat

      The value of Yslm at :math:`theta, phi’.

waveformtools.transforms.compute_fft(udata_x, delta_x)

  Find the FFT of the samples in time-space, and return with the frequencies.

  Parameters:
    udata_x: 1d array

      The samples in time-space.

    delta_x: float

      The stepping delta_x

  Returns:
    freqs: 1d array

      The frequency axis, shifted approriately.

    utilde: 1d array

      The samples in frequency space, with conventions applied.

waveformtools.transforms.compute_ifft(utilde, delta_f)

  Find the inverse FFT of the samples in frequency-space, and return with the time axis.

  Parameters:
    utilde1d array

      The samples in frequency-space.

    delta_f: float

      The frequency stepping

  Returns:
    time_axis: 1d array

      The time axis.

    udata_time: 1d array

      The samples in time domain.

waveformtools.transforms.set_fft_conven(utilde_orig)
  Make a numppy fft consistent with the chosen conventions.

    This takes care of the zero mode factor and array position. Also, it shifts the negative frequencies using numpy’s fftshift.

  Parameters:
    utilde_orig: 1d array

      The result of a numpy fft.

  Returns:
    utilde_conven: 1d array

      The fft with set conventions.

waveformtools.transforms.unset_fft_conven(utilde_conven)
  Make an actual conventional fft consistent with numpy’s conventions.

    The inverse of set_conv.

  Parameters:
    utilde_conven: 1d array

      The conventional fft data vector.

  Returns:
    utilde_np