GWRemnantCalculator
- class gw_remnant.gw_remnant_calculator.GWRemnantCalculator(time, h_dict, q, chi1=None, chi2=None, e_ref=None, E_initial=None, L_initial=None, M_initial=1, use_filter=False)[source]
Bases:
GWPlotter,PeakLuminosityCalculator,AngularMomentumCalculator,TrajectoryCalculator,LinearMomentumCalculator,RemnantMassCalculator,InitialEnergyMomentaCalculator for remnant properties of binary black hole mergers.
This class computes remnant properties and time evolution of physical quantities from gravitational waveform data. It combines functionality from multiple calculator classes to provide comprehensive analysis of binary black hole mergers.
Computed quantities include: - Energy flux and radiated energy - Linear momentum and kick velocity evolution - Angular momentum and spin evolution - Final remnant mass, spin, and kick velocity - Peak luminosity
All calculations are performed in geometric units where G=c=1, with masses in units of total mass M and time in units of M.
- Parameters:
time (
ndarray) – Array of time values in geometric units (M)h_dict (
dict[tuple[int,int],ndarray]) – Dictionary of complex waveform modes with (l,m) tuple keys, e.g., {(2,2): h_22(t), (3,3): h_33(t), …}q (
float) – Mass ratio q = m1/m2, where m1 >= m2chi1 (
ndarray|list[float] |None) – Spin vector [sx, sy, sz] for primary black hole at the start of the waveform, in dimensionless units. Default is Nonechi2 (
ndarray|list[float] |None) – Spin vector [sx, sy, sz] for secondary black hole at the start of the waveform, in dimensionless units. Default is Nonee_ref (
float|None) – Eccentricity at the reference time. User must provide accurate value; code does not validate. Default is NoneE_initial (
float|None) – Initial energy of the binary in units of total mass M. If None, computed using PN expressions. Set to 0 to inspect energy changes relative to reference. Set to known value (e.g., from NR simulation) for absolute tracking. Default is NoneL_initial (
float|None) – Initial angular momentum of the binary in units of M^2. If None, computed using PN expressions. Set to 0 to inspect angular momentum changes relative to reference. Set to known value (e.g., from NR simulation) for absolute tracking. Default is NoneM_initial (
float) – Initial total mass in units of M. Default is 1use_filter (
bool) – Whether to apply filtering to computed quantities. Default is False
- E_dot
Energy flux as a function of time
- Type:
np.ndarray
- Eoft
Cumulative radiated energy as a function of time
- Type:
np.ndarray
- Moft
Binary mass as a function of time
- Type:
np.ndarray
- P_dot
Time derivative of linear momentum vector [3 x N_times]
- Type:
np.ndarray
- Poft
Linear momentum vector as a function of time [3 x N_times]
- Type:
np.ndarray
- voft
Center of mass velocity vector as a function of time [3 x N_times]
- Type:
np.ndarray
- kickoft
Kick velocity magnitude as a function of time
- Type:
np.ndarray
- remnant_kick_vector
Final kick velocity vector (3,) in units of c
- Type:
np.ndarray
- J_dot
Time derivative of angular momentum vector [3 x N_times]
- Type:
np.ndarray
- Joft
Angular momentum vector as a function of time [3 x N_times]
- Type:
np.ndarray
- spinoft
Dimensionless spin z-component as a function of time
- Type:
np.ndarray
- spin_vector_oft
Dimensionless spin vector [3 x N_times] (x, y, z)
- Type:
np.ndarray
- remnant_spin_vector
Final remnant dimensionless spin vector (3,)
- Type:
np.ndarray
- xoft
Center-of-mass displacement vector [N_times x 3] in units of M
- Type:
np.ndarray
- remnant_displacement
Final center-of-mass displacement vector (3,)
- Type:
np.ndarray
- Inherits From:
GWPlotter: Plotting utilities for visualizing results PeakLuminosityCalculator: Peak luminosity calculations AngularMomentumCalculator: Angular momentum evolution TrajectoryCalculator: Center-of-mass trajectory LinearMomentumCalculator: Linear momentum and kick velocity RemnantMassCalculator: Mass and energy calculations InitialEnergyMomenta: Initial condition calculations
Example
>>> import numpy as np >>> time = np.arange(-1000, 100, 0.1) >>> h_dict = {(2,2): h_22_data, (3,3): h_33_data} >>> calc = GWRemnantCalculator(time, h_dict, q=2.0, ... chi1=[0, 0, 0.5]) >>> calc.print_remnants() >>> calc.plot_mass_energy()
- get_remnant_properties()[source]
Return remnant properties as a dictionary.
- Returns:
- Dictionary containing:
’mass_ratio’: Mass ratio q = m1/m2
’M_initial’: Initial total mass
’E_rad’: Total radiated energy
’L_peak’: Peak luminosity
’remnant_mass’: Final remnant mass
’remnant_spin’: Final dimensionless spin (z-component)
’remnant_spin_x’: Final dimensionless spin x-component
’remnant_spin_y’: Final dimensionless spin y-component
’remnant_spin_z’: Final dimensionless spin z-component
’remnant_kick’: Final kick velocity in units of c
’remnant_kick_kmps’: Final kick velocity in km/s
’remnant_kick_x/y/z’: Final kick velocity vector components in units of c
’peak_kick’: Peak kick velocity in units of c
- ’remnant_displacement_x/y/z’: Final center-of-mass displacement
components in units of M
- Return type: