waveformtools.spherical_array

Classes

SphericalArray([label, time_axis, ...])

A class for handling waveforms on a sphere.

class waveformtools.spherical_array.SphericalArray(label=None, time_axis=None, frequency_axis=None, data=None, data_len=None, data_dir=None, file_name=None, Grid=None, spin_weight=-2, ell_max=8)[source]

A class for handling waveforms on a sphere.

Attributes:
label: str

The label of the waveform data.

time_axis: 1d array

The time axis of the data.

frequency_axis: 1d array

The frequency axis if the data is represented in frequency domain.

Grid: UniformGrid

An instance of the UniformGrid class.

data_len: int

The length of the data along the time axis.

Methods

delta_t:

Fetch the time stepping delta_t.

to_modes_array:

Find the waveform expressed in the SWSH basis.

boost:

Boost the waveform.

supertranslate:

Supertranslate the waveform.

Notes

The modes array has the axis in the form (flattened_modes_1d, *shape of extra modes, )

property Grid
boost(conformal_factor, Grid=None)[source]

Boost the waveform given the unboosted waveform and the boost conformal factor.

Parameters:
self: spherical_array

A class instance of spherical array.

conformal_factor: 2d array

The conformal factor for the Lorentz transformation. It may be a single floating point number or an array on a spherical grid. The array will be of dimensions [ntheta, nphi]

Grid: class instance

The class instance that contains the properties of the spherical grid.

Returns:
boosted_waveform: sp_array

The class instance sp_array that contains the boosted waveform.

property data
property data_dir
property data_len

Returns the length of the time/frequency axis.

Returns:
data_len: int

The length of the time/frequency axis.

delta_t(value=None)[source]

Sets and returns the value of time stepping \(dt\).

Parameters:
value: float, optional

The value of \(dt\) to set to the attribute.

Returns:
delta_t: float

Sets the attribute.

property ell_max
property file_name
property frequency_axis
property label
load_qlm_data(data_dir=None, Grid=None, bh=0, variable='sigma')[source]

Load the 2D shear data from h5 files.

Parameters:
file_name: str

The name of the file containing data.

data_dir: str

The name of the directory containing data.

Grid: class instance

An instance of the Grid class.

bh: int

The black hole number (0, 1 or 2)

property spin_weight
supertranslate(supertransl_alpha_sp, order=1)[source]

Supertranslate the \(\Psi_{4\ell m}\) waveform modes, given the, the supertranslation parameter and the order.

Parameters:
supertransl_alpha_modes: modes_array

The modes_array containing the supertranslation mode coefficients.

Grid: class instance

The class instance that contains the properties of the spherical grid using which the computations are carried out.

order: int

The number of terms to use to approximate the supertranslation.

Returns:
Psi4_supertransl: modes_array

A class instance containg the modes of the supertranslated waveform:math:Psi_4.

property time_axis
to_modes_array(Grid=None, spin_weight=None, ell_max=8)[source]

Decompose a given spherical array function on a sphere into Spin Weighted Spherical Harmonic modes.

Parameters:
spin_weight: int, optional

The spin weight of the waveform. It defaults to -2 for a gravitational waveform.

ell_max: int, optional

The maximum value of the \(\ell\) polar quantum number. Defaults to 8.

Grid: class instance

The class instance that contains the properties of the spherical grid.

Returns:
waveforms_modes: modes_array

An instance of the modes_array class containing the decomposed modes.

Notes

  1. Assumes that the sphere on which this decomposition is carried out is so far out that the coordinate system is spherical polar on a round sphere.

  2. Assumes that the poper area is the same as its co-ordinate area.

  3. Ensure that the label of the input spherical array indicates whether it is a time domain data or frequency domain data.

to_shear_modes_array(Grid=None, spin_weight=None, ell_max=8)[source]

Decompose a given spherical array function on a sphere into Spin Weighted Spherical Harmonic modes.

Parameters:
spin_weight: int, optional

The spin weight of the waveform. It defaults to -2 for a gravitational waveform.

ell_max: int, optional

The maximum value of the \(\ell\) polar quantum number. Defaults to 8.

Grid: class instance

The class instance that contains the properties of the spherical grid.

Returns:
waveforms_modes: modes_array

An instance of the modes_array class containing the decomposed modes.

Notes

  1. Assumes that the sphere on which this decomposition is carried out is so far out that the coordinate system is spherical polar on a round sphere.

  2. Assumes that the poper area is the same as its co-ordinate area.

  3. Ensure that the label of the input spherical array indicates whether it is a time domain data or frequency domain data.