From 3b48fecfd1313b08b3492af97ae3f498a16559ae Mon Sep 17 00:00:00 2001 From: plasky <paul.lasky@monash.edu> Date: Sun, 2 Sep 2018 21:49:04 +1000 Subject: [PATCH] enables one to make posterior plots with the added CBC parameters --- tupak/core/result.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tupak/core/result.py b/tupak/core/result.py index a35d95db6..133cbbeaf 100644 --- a/tupak/core/result.py +++ b/tupak/core/result.py @@ -370,16 +370,29 @@ class Result(dict): """ Construct widely used derived parameters of CBCs """ self.posterior['mass_chirp'] = (self.posterior.mass_1 * self.posterior.mass_2) ** 0.6 / ( self.posterior.mass_1 + self.posterior.mass_2) ** 0.2 + self.search_parameter_keys.append('mass_chirp') + self.parameter_labels.append('$\mathcal{M}$') + self.posterior['q'] = self.posterior.mass_2 / self.posterior.mass_1 + self.search_parameter_keys.append('q') + self.parameter_labels.append('$q$') + self.posterior['eta'] = (self.posterior.mass_1 * self.posterior.mass_2) / ( self.posterior.mass_1 + self.posterior.mass_2) ** 2 + self.search_parameter_keys.append('eta') + self.parameter_labels.append('$\eta$') self.posterior['chi_eff'] = (self.posterior.a_1 * np.cos(self.posterior.tilt_1) + self.posterior.q * self.posterior.a_2 * np.cos(self.posterior.tilt_2)) / ( 1 + self.posterior.q) + self.search_parameter_keys.append('chi_eff') + self.parameter_labels.append('$\chi_{\mathrm eff}$') + self.posterior['chi_p'] = np.maximum(self.posterior.a_1 * np.sin(self.posterior.tilt_1), (4 * self.posterior.q + 3) / (3 * self.posterior.q + 4) * self.posterior.q * self.posterior.a_2 * np.sin(self.posterior.tilt_2)) + self.search_parameter_keys.append('chi_p') + self.parameter_labels.append('$\chi_{\mathrm p}$') def check_attribute_match_to_other_object(self, name, other_object): """ Check attribute name exists in other_object and is the same -- GitLab