scri.mode_calculations

Functions

LLComparisonMatrix(W1, W2)

Calculate the <LL> quantity with respect to the modes of two Waveforms

LLDominantEigenvector(W[, RoughDirection, ...])

Calculate the principal axis of the LL matrix

LLMatrix(W)

Calculate the <LL> quantity with respect to the modes

LVector(W1, W2)

Calculate the <L> quantity with respect to the modes

LdtVector(W)

Calculate the <Ldt> quantity with respect to the modes

angular_velocity(W[, include_frame_velocity])

Angular velocity of Waveform

corotating_frame(W[, R0, tolerance, ...])

Return rotor taking current mode frame into corotating frame

inner_product(t, abar, b[, axis, ...])

Perform a time-domain complex inner product between two waveforms <a, b>.

scri.mode_calculations.LLComparisonMatrix(W1, W2)[source]

Calculate the <LL> quantity with respect to the modes of two Waveforms

The matrix is given in the (possibly rotating) mode frame (X,Y,Z), rather than the inertial frame (x,y,z).

<LL>^{ab} = sum_{ell,m,m’} bar{f}^{ell,m’} < ell,m’ | L_a L_b | ell,m > g^{ell,m}

scri.mode_calculations.LLDominantEigenvector(W, RoughDirection=array([0., 0., 1.]), RoughDirectionIndex=0)[source]

Calculate the principal axis of the LL matrix

param Lmodes L modes to evaluate (optional) param RoughDirection Vague guess about the preferred initial (optional)

If Lmodes is empty (default), all L modes are used. Setting Lmodes to [2] or [2,3,4], for example, restricts the range of the sum.

Ell is the direction of the angular velocity for a PN system, so some rough guess about that direction allows us to choose the direction of the eigenvectors output by this function to be more parallel than anti-parallel to that direction. The default is to simply choose the z axis, since this is most often the correct choice anyway.

The vector is given in the (possibly rotating) mode frame (X,Y,Z), rather than the inertial frame (x,y,z).

scri.mode_calculations.LLMatrix(W)[source]

Calculate the <LL> quantity with respect to the modes

The matrix is given in the (possibly rotating) mode frame (X,Y,Z), rather than the inertial frame (x,y,z).

This quantity is as prescribed by O’Shaughnessy et al. <http://arxiv.org/abs/1109.5224>, except that no normalization is imposed, and this operates on whatever type of data is input.

<LL>^{ab} = Re { sum_{ell,m,m’} bar{f}^{ell,m’} < ell,m’ | L_a L_b | ell,m > f^{ell,m} }

scri.mode_calculations.LVector(W1, W2)[source]

Calculate the <L> quantity with respect to the modes

The vector is given in the (possibly rotating) mode frame (X,Y,Z), rather than the inertial frame (x,y,z).

<L>^{a} = sum_{ell,m,m’} bar{f}^{ell,m’} < ell,m’ | L_a | ell,m > g^{ell,m}

scri.mode_calculations.LdtVector(W)[source]

Calculate the <Ldt> quantity with respect to the modes

The vector is given in the (possibly rotating) mode frame (X,Y,Z), rather than the inertial frame (x,y,z).

<Ldt>^{a} = sum_{ell,m,m’} bar{f}^{ell,m’} < ell,m’ | L_a | ell,m > (df/dt)^{ell,m}

scri.mode_calculations.angular_velocity(W, include_frame_velocity=False)[source]

Angular velocity of Waveform

This function calculates the angular velocity of a Waveform object from its modes. This was introduced in Sec. II of “Angular velocity of gravitational radiation and the corotating frame” <http://arxiv.org/abs/1302.2919>. Essentially, this is the angular velocity of the rotating frame in which the time dependence of the modes is minimized.

The vector is given in the (possibly rotating) mode frame (X,Y,Z), which is not necessarily equal to the inertial frame (x,y,z).

scri.mode_calculations.corotating_frame(W, R0=quaternion(1, 0, 0, 0), tolerance=1e-12, z_alignment_region=None, return_omega=False)[source]

Return rotor taking current mode frame into corotating frame

This function simply evaluates the angular velocity of the waveform, and then integrates it to find the corotating frame itself. This frame is defined to be the frame in which the time-dependence of the waveform is minimized — at least, to the extent possible with a time-dependent rotation. This frame is only unique up to a single overall rotation, which is passed in as an optional argument to this function.

Parameters:
W: Waveform
R0: quaternion [defaults to 1]

Value of the output rotation at the first output instant

tolerance: float [defaults to 1e-12]

Absolute tolerance used in integration

z_alignment_region: None or 2-tuple of floats [defaults to None]

If not None, the dominant eigenvector of the <LL> matrix is aligned with the z axis, averaging over this portion of the data. The first and second elements of the input are considered fractions of the inspiral at which to begin and end the average. For example, (0.1, 0.9) would lead to starting 10% of the time from the first time step to the max norm time, and ending at 90% of that time.

return_omega: bool [defaults to False]

If True, return a 2-tuple consisting of the frame (the usual returned object) and the angular-velocity data. That is frequently also needed, so this is just a more efficient way of getting the data.

scri.mode_calculations.inner_product(t, abar, b, axis=None, apply_conjugate=False)[source]

Perform a time-domain complex inner product between two waveforms <a, b>.

This is implemented using spline interpolation, calling quaternion.calculus.spline_definite_integral

Parameters:
tarray_like

Time samples for waveforms abar and b.

abararray_like

The conjugate of the ‘a’ waveform in the inner product (or simply a, if apply_conjugate=True is been passed). Must have the same shape as b.

barray_like

The ‘b’ waveform in the inner product. Must have the same shape as a.

axisint, optional

When abar and b are multidimensional, the inner product will be computed over this axis and the result will be one dimension lower. Default is None, will be inferred by spline_definite_integral.

apply_conjugatebool, optional

Whether or not to conjugate the abar argument before computing. True means inner_product will perform the conjugation for you. Default is False, meaning you have already performed the conjugation.

Returns:
inner_productndarray

The integral along ‘axis’