Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALSimulation 6.2.0.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lalsimulation.gwsignal.core.utils Namespace Reference

Functions

def from_lal_value (val)
 Read and return a value from LALDict. More...
 
def to_lal_dict (d)
 Convert Python dictionary to LALDict object readble by LAL. More...
 
def from_lal_dict (ldict)
 Convert LALDict object to a Python dictionary. More...
 
def check_dict_parameters (waveform_dict, generic_param_dict=None)
 Checks the parameters used in the waveform generation routine. More...
 
def add_params_units (waveform_dict, units_sys='S.I.', generic_param_dict=None)
 Add units or convert to desired units system to the waveform parameters dictionary. More...
 
def CheckDeterminationOfMasses (waveform_dict)
 Check mass parameters are consistent and enough to fully characterize the binary masses. More...
 
def CheckDeterminationOfSpins (waveform_dict)
 Check spin parameters are consistent and enough to fully characterize the binary spins. More...
 

Function Documentation

◆ from_lal_value()

def lalsimulation.gwsignal.core.utils.from_lal_value (   val)

Read and return a value from LALDict.

Parameters

val : lal.DictValues value Output from a lal.DictValues

Returns

lal.Value'(val) :

Definition at line 22 of file utils.py.

◆ to_lal_dict()

def lalsimulation.gwsignal.core.utils.to_lal_dict (   d)

Convert Python dictionary to LALDict object readble by LAL.

Parameters

d : dict Python dictionary of input parameters

Returns

ldict : LALDict LALDict object readable by LAL

Definition at line 66 of file utils.py.

◆ from_lal_dict()

def lalsimulation.gwsignal.core.utils.from_lal_dict (   ldict)

Convert LALDict object to a Python dictionary.

Parameters

d : LALDict LALDict object

Returns

d : dict Python dictionary

Definition at line 106 of file utils.py.

◆ check_dict_parameters()

def lalsimulation.gwsignal.core.utils.check_dict_parameters (   waveform_dict,
  generic_param_dict = None 
)

Checks the parameters used in the waveform generation routine.

Parameters

waveform_dict (dict): The dictionary of parameters used to generate the template.

generic_param_dict (dict,optional): Dictionary of extra parameter names to be accepted in order to generate non-standard waveforms. It should not include standard waveform parameters as they will be ignored. The form should be parameter_name:parameter_units and the values should be just added in the waveform_dict.

Raises

AssertionError: If a parameter has the wrong units. TypeError: If a parameter is not available to use or a dimensional parameter is passed as dimensionless.

Definition at line 145 of file utils.py.

◆ add_params_units()

def lalsimulation.gwsignal.core.utils.add_params_units (   waveform_dict,
  units_sys = 'S.I.',
  generic_param_dict = None 
)

Add units or convert to desired units system to the waveform parameters dictionary.

Parameters

waveform_dict (dict): The dictionary of parameters used to generate the template. units_sys (:obj:str, optional): System of units chosen for the given parameters. Defaults to None. If a unit system is given, try to convert and provide units to the parameters in waveform_dict. If default checks the parameters in waveform_dict have the appropriate units. generic_param_dict (dict,optional): Dictionary of extra parameter names to be accepted in order to generate non-standard waveforms. It should not include standard waveform parameters as they will be ignored. The form should be parameter_name:parameter_units and the values should be just added in the waveform_dict.

Returns

A dict the corresponding conversions to the specified units_sys system.

Raises

AssertionError: If a parameter has wrong units

Definition at line 208 of file utils.py.

◆ CheckDeterminationOfMasses()

def lalsimulation.gwsignal.core.utils.CheckDeterminationOfMasses (   waveform_dict)

Check mass parameters are consistent and enough to fully characterize the binary masses.

Parameters

waveform_dict (dict): The dictionary of parameters used to generate the template.

Raises

TypeError: whenever mass parameters are over or underspecified

Definition at line 253 of file utils.py.

◆ CheckDeterminationOfSpins()

def lalsimulation.gwsignal.core.utils.CheckDeterminationOfSpins (   waveform_dict)

Check spin parameters are consistent and enough to fully characterize the binary spins.

Parameters

waveform_dict (dict): The dictionary of parameters used to generate the template.

Raises

TypeError: whenever spin parameters are over or underspecified or system of coordinates is mixed

Definition at line 296 of file utils.py.