aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-10-25 11:36:38 +0800
committerAaron LI <aly@aaronly.me>2018-10-25 11:36:38 +0800
commitee0ec86428846515325e70e6b2250fcde6fc8b58 (patch)
tree4e261aa13beca1ae5577993c74f123e0da3cb556 /fg21sim/extragalactic/clusters
parentf663daf132a803677262a4be774aa0b74e463902 (diff)
downloadfg21sim-ee0ec86428846515325e70e6b2250fcde6fc8b58.tar.bz2
clusters/halo: Fix a wrong variable in a logging message
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index 4a1811e..a94eb84 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -462,15 +462,13 @@ class RadioHalo:
if n0_e is None:
n0_e = self.electron_spec_init
- # When the evolution time is too short, decrease the time step
- # to improve the results.
- # XXX: is this necessary???
+ # Decrease the time step when the evolution time is short.
+ # (necessary?)
nstep_min = 20
- if (tstop - tstart) / self.time_step < nstep_min:
- tstep = (tstop - tstart) / nstep_min
+ if tstop - tstart < self.time_step * nstep_min:
+ self.fpsolver.tstep = (tstop - tstart) / nstep_min
logger.debug("Decreased time step: %g -> %g [Gyr]" %
(self.time_step, self.fpsolver.tstep))
- self.fpsolver.tstep = tstep
self.electron_spec = self.fpsolver.solve(u0=n0_e, tstart=tstart,
tstop=tstop)