def setUp(self): self.search_keys = [] self.parameters = dict() self.component_mass_pars = dict(mass_1=1.4, mass_2=1.4) self.mass_parameters = self.component_mass_pars.copy() self.mass_parameters[ "mass_ratio"] = conversion.component_masses_to_mass_ratio( **self.component_mass_pars) self.mass_parameters[ "symmetric_mass_ratio"] = conversion.component_masses_to_symmetric_mass_ratio( **self.component_mass_pars) self.mass_parameters[ "chirp_mass"] = conversion.component_masses_to_chirp_mass( **self.component_mass_pars) self.mass_parameters[ "total_mass"] = conversion.component_masses_to_total_mass( **self.component_mass_pars) self.component_tidal_parameters = dict(lambda_1=300, lambda_2=300) self.all_component_pars = self.component_tidal_parameters.copy() self.all_component_pars.update(self.component_mass_pars) self.tidal_parameters = self.component_tidal_parameters.copy() self.tidal_parameters[ "lambda_tilde"] = conversion.lambda_1_lambda_2_to_lambda_tilde( **self.all_component_pars) self.tidal_parameters[ "delta_lambda_tilde"] = conversion.lambda_1_lambda_2_to_delta_lambda_tilde( **self.all_component_pars)
def test_lambda_1_lambda_2_to_delta_lambda_tilde(self): delta_lambda_tilde = \ conversion.lambda_1_lambda_2_to_delta_lambda_tilde( self.lambda_1, self.lambda_2, self.mass_1, self.mass_2) self.assertTrue((self.delta_lambda_tilde - delta_lambda_tilde) < 1e-5)