Added 3d hole generation support

This commit is contained in:
Guilhem Lavaux 2014-10-10 12:05:45 +02:00
parent d58c617e63
commit 8003d5e15f
2 changed files with 10 additions and 9 deletions

View file

@ -46,7 +46,7 @@ class KSZ_Profile(object):
class KSZ_Isothermal(KSZ_Profile):
sigma_FP=160e3 #m/s
R_innergal = 0.226
R_innergal = 0.030
def __init__(self, Lgal, x, y=0.0):
"Support for Isothermal profile"
@ -71,15 +71,15 @@ class KSZ_Isothermal(KSZ_Profile):
Q = np.zeros(r.size)
cond = r <= rInner
cond = (r>=0)*(r <= rInner)
D['r'] = r[cond]
ne.evaluate('rho0*2/(Mpc*r) * arctan(sqrt( (rGalaxy/r)**2 -1 ) - arctan(sqrt( (rInner/r)**2 - 1 ))',
local_dict=D, out=Q[cond])
Q[cond] = ne.evaluate('rho0*2/(Mpc*r) * (arctan(sqrt( (rGalaxy/r)**2 -1 )) - arctan(sqrt( (rInner/r)**2 - 1 )))',
local_dict=D)
cond = (r > rInner)*(r <= rGalaxy)
D['r'] = r[cond]
ne.evaluate('rho0*2/(Mpc*r) * arctan(sqrt( (rGalaxy/r)**2 -1 ))',
local_dict=D, out=Q[cond])
Q[cond] = ne.evaluate('rho0*2/(Mpc*r) * arctan(sqrt( (rGalaxy/r)**2 -1 ))',
local_dict=D)
return Q,np.where(r<rInner)[0]