mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
+ radial profiles now full actual density from survey volume, not zobov normalization
+ getVolNorm provides both zobov normalization and average density from survey volume for observations + significant update and cleanup to plotting routines
This commit is contained in:
parent
b79046ac22
commit
326756b2bc
8 changed files with 73 additions and 61 deletions
|
@ -27,13 +27,15 @@ from voidUtil import getArray
|
|||
|
||||
def computeXcor(catalog,
|
||||
figDir="./",
|
||||
namePrefix="",
|
||||
Nmesh = 256,
|
||||
Nbin = 100
|
||||
Nbin = 100,
|
||||
):
|
||||
|
||||
# Computes and plots void-void and void-matter(galaxy) correlations
|
||||
# catalog: catalog to analyze
|
||||
# figDir: where to place plots
|
||||
# namePrefix: prefix to add to file names
|
||||
# Nmesh: number of grid cells in cic mesh-interpolation
|
||||
# Nbin: number of bins in final plots
|
||||
|
||||
|
@ -84,18 +86,18 @@ def computeXcor(catalog,
|
|||
plt.xlabel(r'$x \;[h^{-1}\mathrm{Mpc}]$')
|
||||
plt.ylabel(r'$y \;[h^{-1}\mathrm{Mpc}]$')
|
||||
plt.title(r'Dark matter')
|
||||
plt.savefig(figDir+'/dm.eps', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/dm.pdf', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/dm.png', bbox_inches="tight")
|
||||
#plt.savefig(figDir+'/dm.eps', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/'+namePrefix+'dm.pdf', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/'+namePrefix+'dm.png', bbox_inches="tight")
|
||||
plt.clf()
|
||||
|
||||
plt.imshow(np.sum(dv[:,:,:]+1,2)/Nmesh,extent=[0,Lbox,0,Lbox],aspect='equal',cmap='YlGnBu_r',interpolation='gaussian')
|
||||
plt.xlabel(r'$x \;[h^{-1}\mathrm{Mpc}]$')
|
||||
plt.ylabel(r'$y \;[h^{-1}\mathrm{Mpc}]$')
|
||||
plt.title(r'Voids')
|
||||
plt.savefig(figDir+'/dv.eps', bbox_inches="tight") #, dpi=300
|
||||
plt.savefig(figDir+'/dv.pdf', bbox_inches="tight") #, dpi=300
|
||||
plt.savefig(figDir+'/dv.png', bbox_inches="tight") #, dpi=300
|
||||
#plt.savefig(figDir+'/dv.eps', bbox_inches="tight") #, dpi=300
|
||||
plt.savefig(figDir+'/'+namePrefix+'dv.pdf', bbox_inches="tight") #, dpi=300
|
||||
plt.savefig(figDir+'/'+namePrefix+'dv.png', bbox_inches="tight") #, dpi=300
|
||||
plt.clf()
|
||||
|
||||
|
||||
|
@ -116,10 +118,11 @@ def computeXcor(catalog,
|
|||
plt.yscale('log')
|
||||
plt.xlim(kmin,kmax)
|
||||
plt.ylim(10**np.floor(np.log10(abs(Pvm[1:]).min()))/margin, max(10**np.ceil(np.log10(Pmm.max())),10**np.ceil(np.log10(Pvv.max())))*margin)
|
||||
plt.legend([pa, pb, pc],['tt', 'vt', 'vv'],'best',prop={'size':12})
|
||||
plt.savefig(figDir+'/power.eps', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/power.pdf', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/power.png', bbox_inches="tight")
|
||||
plt.legend([pa, pb, pc],['tt', 'vt', 'vv'])
|
||||
#plt.legend([pa, pb, pc],['tt', 'vt', 'vv'],'best',prop={'size':12})
|
||||
#plt.savefig(figDir+'/power.eps', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/'+namePrefix+'power.pdf', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/'+namePrefix+'power.png', bbox_inches="tight")
|
||||
plt.clf()
|
||||
|
||||
pa ,= plt.plot(rm, Xmm, 'k-o', ms=0.8*ms, mew=mew)
|
||||
|
@ -137,10 +140,11 @@ def computeXcor(catalog,
|
|||
plt.yscale('log')
|
||||
plt.xlim(rmin,rmax)
|
||||
plt.ylim(min(10**np.floor(np.log10(abs(Xvm).min())),10**np.floor(np.log10(abs(Xmm).min())))/margin, max(10**np.ceil(np.log10(Xmm.max())),10**np.ceil(np.log10(Xvv.max())))*margin)
|
||||
plt.legend([pa, pb, pc],['tt', 'vt', 'vv'],'best',prop={'size':12})
|
||||
plt.savefig(figDir+'/correlation.eps', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/correlation.pdf', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/correlation.png', bbox_inches="tight")
|
||||
plt.legend([pa, pb, pc],['tt', 'vt', 'vv'])
|
||||
#plt.legend([pa, pb, pc],['tt', 'vt', 'vv'],'best',prop={'size':12})
|
||||
#plt.savefig(figDir+'/correlation.eps', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/'+namePrefix+'correlation.pdf', bbox_inches="tight")
|
||||
plt.savefig(figDir+'/'+namePrefix+'correlation.png', bbox_inches="tight")
|
||||
plt.clf()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue