scri.rotations

Functions

align_decomposition_frame_to_modes(w, t_fid)

Fix the attitude of the corotating frame.

get_alignment_of_decomposition_frame_to_modes(w, ...)

Find the appropriate rotation to fix the attitude of the corotating frame.

rotate_decomposition_basis(W, R_basis)

Rotate a Waveform in place

rotate_physical_system(W, R_phys)

Rotate a Waveform in place

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

Transform waveform (in place) to a coprecessing frame

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

Transform waveform (in place) to a corotating frame

to_inertial_frame(W)

scri.rotations.align_decomposition_frame_to_modes(w, t_fid, nHat_t_fid=quaternion(0, 1, 0, 0), ell_max=None)[source]

Fix the attitude of the corotating frame.

The corotating frame is only defined up to some constant rotor R_eps; if R_corot is corotating, then so is R_corot*R_eps. This function uses that freedom to ensure that the frame is aligned with the Waveform modes at the fiducial time. In particular, it ensures that the Z axis of the frame in which the decomposition is done is along the dominant eigenvector of the <LL> matrix (suggested by O’Shaughnessy et al.), and the phase of the (2,2) mode is zero.

If ell_max is None (default), all ell modes are used.

Parameters:
w: WaveformModes

Object to be aligned

t_fid: float

Fiducial time at which the alignment should happen

nHat_t_fid: quaternion (optional)

The approximate direction of nHat at t_fid; defaults to x

ell_max: int

Highest ell mode to use in computing the <LL> matrix

scri.rotations.get_alignment_of_decomposition_frame_to_modes(w, t_fid, nHat_t_fid=quaternion(0, 1, 0, 0), ell_max=None)[source]

Find the appropriate rotation to fix the attitude of the corotating frame.

This function simply finds the rotation necessary to align the corotating frame to the waveform at the fiducial time, rather than applying it. This is called by AlignDecompositionFrameToModes and probably does not need to be called directly; see that function’s documentation for more details.

Parameters:
w: WaveformModes

Object to be aligned

t_fid: float

Fiducial time at which the alignment should happen

nHat_t_fid: quaternion (optional)

The approximate direction of nHat at t_fid; defaults to x

ell_max: int

Highest ell mode to use in computing the <LL> matrix

scri.rotations.rotate_decomposition_basis(W, R_basis)[source]

Rotate a Waveform in place

This function takes a Waveform object W and either a quaternion or array of quaternions R_basis. It applies that rotation to the decomposition basis of the modes in the Waveform. The change in basis is also recorded in the Waveform’s frame data.

For more information on the analytical details, see http://moble.github.io/spherical_functions/SWSHs.html#rotating-swshs

scri.rotations.rotate_physical_system(W, R_phys)[source]

Rotate a Waveform in place

This just rotates the decomposition basis by the inverse of the input rotor(s). See rotate_decomposition_basis.

For more information on the analytical details, see http://moble.github.io/spherical_functions/SWSHs.html#rotating-swshs

scri.rotations.to_coprecessing_frame(W, RoughDirection=array([0., 0., 1.]), RoughDirectionIndex=None, transition_times=None)[source]

Transform waveform (in place) to a coprecessing frame

Parameters:
W: waveform

Waveform object to be transformed in place.

RoughDirection: 3-array [defaults to np.array([0.0, 0.0, 1.0])]

Vague guess about the preferred initial axis, to choose the sign of the eigenvectors.

RoughDirectionIndex: int or None [defaults to None]

Time index at which to apply RoughDirection guess.

transition_times2-tuple or None [defaults to None]

If a 2-tuple of floats is given, these will be interpreted as the beginning and ending times (respectively) to transition from using the coprecessing frame to stopping rotation altogether. This can be helpful for ensuring that the frame doesn’t fluctuate wildly during ringdown.

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

Transform waveform (in place) to a corotating frame

Parameters:
W: waveform

Waveform object to be transformed in place

R0: quaternion [defaults to 1]

Initial value of frame when integrating angular velocity

tolerance: float [defaults to 1e-12]

Absolute tolerance used in integration of angular velocity

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 waveform in the corotating 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.

truncate_log_frame: bool [defaults to False]

If True, set bits of log(frame) with lower significance than tolerance to zero, and use exp(truncated(log(frame))) to rotate the waveform. Also returns log_frame along with the waveform (and optionally omega)

scri.rotations.to_inertial_frame(W)[source]