diff options
author | Aaron LI <aly@aaronly.me> | 2017-10-24 16:34:52 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-10-24 16:34:52 +0800 |
commit | 56f662057317331a59cfee37b0b7005dc2913bb0 (patch) | |
tree | 1ab4c841e66004f7f179a530169cfc657a0f5eb0 | |
parent | e3fb2c4c3fc3f616295ee57bb03a7c739b5cf73c (diff) | |
download | fg21sim-56f662057317331a59cfee37b0b7005dc2913bb0.tar.bz2 |
clusters/halo: Change zbegin/zend to tstart/tsop (use cosmic time)
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 575decd..4016fe6 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -378,38 +378,39 @@ class RadioHalo: Ke = term1 * term2 / term3 # [cm^-3 Gyr^-1] return Ke - def calc_electron_spectrum(self, zbegin=None, zend=None, n0_e=None): + def calc_electron_spectrum(self, tstart=None, tstop=None, n0_e=None): """ Calculate the relativistic electron spectrum by solving the Fokker-Planck equation. Parameters ---------- - zbegin : float, optional - The redshift from where to solve the Fokker-Planck equation. - Default: ``self.z_merger``. - zend : float, optional - The redshift where to stop solving the Fokker-Planck equation. - Default: ``self.z_obs``. + tstart : float, optional + The (cosmic) time from when to solve the Fokker-Planck equation + for relativistic electrons evolution. + Default: ``self.age_merger``. + Unit: [Gyr] + tstop : float, optional + The (cosmic) time when to derive final relativistic electrons + spectrum for synchrotron emission calculations. + Default: ``self.age_obs``. + Unit: [Gyr] n0_e : 1D `~numpy.ndarray`, optional - The initial electron number distribution. - Unit: [cm^-3]. - Default: accumulated constantly injected electrons until zbegin. + The initial electron spectrum (number distribution). + Default: accumulated constantly injected electrons until + ``tstart``. + Unit: [cm^-3] Returns ------- electron_spec : float 1D `~numpy.ndarray` - The solved electron spectrum at ``zend``. + The solved electron spectrum at ``tstop``. Unit: [cm^-3] """ - if zbegin is None: - tstart = COSMO.age(self.z_merger) - else: - tstart = COSMO.age(zbegin) - if zend is None: - tstop = COSMO.age(self.z_obs) - else: - tstop = COSMO.age(zend) + if tstart is None: + tstart = self.age_merger + if tstop is None: + tstop = self.age_obs if n0_e is None: # Accumulated constantly injected electrons until ``tstart``. n_inj = self.fp_injection(self.gamma) |