# waveformtools.simulations

Data container for Numerical Relativity data

Classes

`sim`([aliases, multipoles, mass_multipoles, ...]) | A data container for simulation data.

class waveformtools.simulations.sim(aliases=None, multipoles=None, mass_multipoles=None, spin_multipoles=None, mass1=None, mass2=None, mass3=None, delta_t=None, merger_ind=None, actmerger_time=None, timeaxis=None, dinit=None, distance=None, ROOTDIR=None, WAVDIR=None, simdir=None, data_dir='data/primary/', data_length=None, dist_data_length=None, comm_data_length=None, strain_dir='output/', strain=None, strain_phase=None, strain_frequency=None, strain_amplitude=None, strain_indexshifts=None, indexjn=None, distjn=None, areal_radii={}, log_deltamultipoles2=None, log_multipoles2=None, log_deltamultipoles=None, log_multipoles=None, ref_multipoles=None, indjn=None, NP_1d=None)

  A data container for simulation data.

  Attributes:
    `chirpmass`

      Compute and return the chirp mass of the simulations.

    `comm_data_duration`

      Compute and return the duration of the common data (multipole and Bhdiag/distance) of the simulations.

    `data_duration`

      Compute and return the data duration of the simulations.

    `massratio`

      Compute and return the massratio of the simulations.

    `merger_distance`

      Compute and return the distance at the merger index of the simulations.

    `merger_time`

      Compute and return the cctk_time stamp at the merger for the simulations.

    `pm_data_duration`

      Compute and return the duration of post-merger data present in the simulations.

    `pm_data_length`

      Compute and return the post merger data length avaialable for all simulations.

    `sampling_f`

      Compute and return the sampling frequency of the simulations.

    `totalmass`

      Compute and return the total mass of the simulations.

    `true_merger_distance`

      Compute and return the true (i.e.

  Methods

  `calc_ref_multipoles`() | Compute and assign the reference (l=2) multuipoles to sim.ref_multipoles of the simulations.
  `calc_log_multipoles`() | Compute and assign the natural logarithm of the (l=2) multipoles to sim.log_multipoles of the simulations.
  `calc_delta_multipoles`() | Compute and return the delta multipoles (w.r.t.
  `calc_amp_phase`() | Extract the amplitude and the phase from strain data.
  `load_data`() | Load data of the simulations.
  `load_strain`([start_index]) | Method to load the shear data of simulations.
  `ret_horizon_radii`() | Retrieve the radius of the common horizon at the time of formation.
  `_resize_multipoles`() | Private method to resize the (l=2) multipole data.
  `_ifreversal`() | Private method to reverse the (l=2) multipole data if mass2>mass1.

  load_shears | Load the shear data at a pole of respective horizons of the simulations from waveform directories. Assignes/Updates: * shear. * shear_amp. * shear_phase. * shear_shift.

  calc_amp_phase()

    Extract the amplitude and the phase from strain data.

  calc_delta_multipoles()

    Compute and return the delta multipoles (w.r.t. reference (l=2) multipoles)

  calc_delta_multipoles2()

    Compute and return the delta multipoles (w.r.t. reference (l=2) multipoles)

  calc_junkend(tjn=200.0)

    Compute the indices and the starting distances of the system at timestamp t = 200.

    Parameters:
      tjn: float

        The definition of time end of junk radiation. Default is 200.

    Notes

    Computes:

    self.indjn: dict

      A dictionary containing the index location corresponding to timestamp tjn.

    self.distjn: dict

      A dictionary containing the normalized co-ordinate distance between the two BHs at tjn.

  calc_log_multipoles()

    Compute and assign the natural logarithm of the (l=2) multipoles to sim.log_multipoles of the simulations.

  calc_log_multipoles2()

    Compute and assign the natural logarithm of the (l=2) multipoles to sim.log_multipoles of the simulations.

  calc_ref_multipoles()

    Compute and assign the reference (l=2) multuipoles to sim.ref_multipoles of the simulations.

  property chirpmass

    Compute and return the chirp mass of the simulations.

  property comm_data_duration

    Compute and return the duration of the common data (multipole and Bhdiag/distance) of the simulations.

  property data_duration

    Compute and return the data duration of the simulations.

  get_BH_locations(alias=None)

    Get the co-ordinate locations of the BHs.

    Parameters:
      alias str, optional.

        The simulation label. If not specified, then all available simulationswill be processed.

    Returns:
  get_CoM_locations(alias=None)

    Get the CoM location of the given simulation.

    Parameters:
      alias str, optional.

        The simulation label. If not specified, then all available simulationswill be processed.

    Returns:
      self.CoM_locations dict

        A dictionary of lists containing CoM locations of the simulations.

    Notes

    This fetches the location of the BHs from data files.

  get_CoM_mean_motion(alias=None)

    Get the mean motion of the CoM.

    Parameters:
      alias str, optional.

        The simulation label. If not specified, then all available simulationswill be processed.

    Returns:
      alpha dict

        A dictionary containing the mean CoM displacement array.

      beta dict

        A dictionary containing the mean CoM velocity array.

  load_NP_1d_data(np_qty='sigma', source='qlm')

    Load the 1d NP quantities.

  load_data()

    Load data of the simulations.

    Notes

    Data is assigned to

    > multipoles: list mass_multipoles: list spin_multipoles: list timeaxis: list mass1: float mass2: float mass3: float delta_t: float distance: list merger_ind: int actmerger_time: float dinit: float data_length: int dist_data_length: int

  load_strain(start_index=0)

    Method to load the shear data of simulations.

  property massratio

    Compute and return the massratio of the simulations.

  property merger_distance

    Compute and return the distance at the merger index of the simulations.

  property merger_time

    Compute and return the cctk_time stamp at the merger for the simulations.

  property pm_data_duration

    Compute and return the duration of post-merger data present in the simulations.

  property pm_data_length

    Compute and return the post merger data length avaialable for all simulations.

  ret_horizon_radii()

    Retrieve the radius of the common horizon at the time of formation.

  property sampling_f

    Compute and return the sampling frequency of the simulations.

  property totalmass

    Compute and return the total mass of the simulations.

  property true_merger_distance

    Compute and return the true (i.e. non-normalized) distance at merger for the simulations.