From eda5af38162a9cd5d4fb101964d00b52f1ec2d09 Mon Sep 17 00:00:00 2001 From: haukekoehn <136069487+haukekoehn@users.noreply.github.com> Date: Mon, 7 Aug 2023 18:48:19 +0200 Subject: [PATCH] Fix bug from redshift datatype conversion the luminosity_distance_to_redshift function does not return astropy quantity objects, thus it has no value attribute. Needs to be removed from previous commit --- nmma/joint/conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmma/joint/conversion.py b/nmma/joint/conversion.py index 739a0315..33e92512 100644 --- a/nmma/joint/conversion.py +++ b/nmma/joint/conversion.py @@ -48,7 +48,7 @@ def source_frame_masses(converted_parameters, added_keys): distance_grid = cosmology.luminosity_distance(zgrid).value converted_parameters["redshift"] = np.interp(distance, distance_grid, zgrid).value else: - converted_parameters["redshift"] = luminosity_distance_to_redshift(distance).value + converted_parameters["redshift"] = luminosity_distance_to_redshift(distance) added_keys = added_keys + ["redshift"] if "mass_1_source" not in converted_parameters.keys():