Skip to content
Snippets Groups Projects
Commit 8a6dd0d6 authored by Colm Talbot's avatar Colm Talbot
Browse files

flake/python 2 compatibility

parent 8ac80d31
No related branches found
No related tags found
1 merge request!271Improve cosmology use
Pipeline #45856 failed
......@@ -264,8 +264,8 @@ def convert_to_lal_binary_neutron_star_parameters(parameters):
tilt = 'tilt_{}'.format(idx)
if tilt in original_keys:
converted_parameters['chi_{}'.format(idx)] = (
converted_parameters[mag] *
np.cos(converted_parameters[tilt]))
converted_parameters[mag] *
np.cos(converted_parameters[tilt]))
else:
converted_parameters['chi_{}'.format(idx)] = (
converted_parameters[mag])
......
......@@ -129,13 +129,13 @@ class TestConvertToLALParams(unittest.TestCase):
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.component_tidal_parameters, **self.component_mass_pars)
conversion.lambda_1_lambda_2_to_lambda_tilde(**self.all_component_pars)
self.tidal_parameters['delta_lambda'] = \
conversion.lambda_1_lambda_2_to_delta_lambda(
**self.component_tidal_parameters, **self.component_mass_pars)
conversion.lambda_1_lambda_2_to_delta_lambda(**self.all_component_pars)
def tearDown(self):
del self.search_keys
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment