From 1947fffba78c7b287594851c99cbd0dff4d22bfa Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 22 Dec 2018 23:34:39 +0800 Subject: clusters/halo: Update is_genuine() to return flux factor also --- fg21sim/extragalactic/clusters/halo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fg21sim') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 5580c14..e1e5e2e 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -520,6 +520,9 @@ class RadioHalo: Returns ------- genuine : bool + Whether the radio halo is genuine? + factor : float + Acceleration factor of the flux. """ haloem = HaloEmission(gamma=self.gamma, n_e=n_e, B=self.B_obs, radius=self.radius, @@ -530,7 +533,8 @@ class RadioHalo: haloem.n_e = ne_fiducial flux_fiducial = haloem.calc_flux(self.fiducial_freq) - return flux >= flux_fiducial * self.fiducial_factor + factor = flux / flux_fiducial + return (flux >= self.fiducial_factor, factor) def fp_injection(self, gamma, t=None): """ -- cgit v1.2.2