Ensure the point at r=0 has correct value and not nan
This commit is contained in:
parent
83324fdbd1
commit
00d8d619ef
2 changed files with 6 additions and 2 deletions
|
@ -71,7 +71,10 @@ class KSZ_Isothermal(KSZ_Profile):
|
|||
|
||||
Q = np.zeros(r.size)
|
||||
|
||||
cond = (r>=0)*(r <= rInner)
|
||||
cond = (r<=0)
|
||||
Q[cond] = rho0*2/Mpc * (rGalaxy-rInner)/(rGalaxy*rInner)
|
||||
|
||||
cond = (r>0)*(r <= rInner)
|
||||
D['r'] = r[cond]
|
||||
Q[cond] = ne.evaluate('rho0*2/(Mpc*r) * (arctan(sqrt( (rGalaxy/r)**2 -1 )) - arctan(sqrt( (rInner/r)**2 - 1 )))',
|
||||
local_dict=D)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue