mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
Merge branch 'master' of https://bitbucket.org/cosmicvoids/vide_public
This commit is contained in:
commit
4ad245d62f
2 changed files with 3 additions and 2 deletions
|
@ -196,7 +196,7 @@ def loadPartVel(sampleDir):
|
||||||
def getPartTree(catalog):
|
def getPartTree(catalog):
|
||||||
|
|
||||||
sample = catalog.sampleInfo
|
sample = catalog.sampleInfo
|
||||||
partData = catalog.partData
|
partData = catalog.partPos
|
||||||
boxLen = catalog.boxLen
|
boxLen = catalog.boxLen
|
||||||
|
|
||||||
periodicLine = getPeriodic(sample)
|
periodicLine = getPeriodic(sample)
|
||||||
|
|
|
@ -67,7 +67,7 @@ def buildProfile(catalog, rMin, rMax):
|
||||||
shiftedPart = shiftPart(localPart, center, periodicLine, catalog.ranges)
|
shiftedPart = shiftPart(localPart, center, periodicLine, catalog.ranges)
|
||||||
|
|
||||||
dist = np.sqrt(np.sum(shiftedPart[:,:]**2, axis=1))
|
dist = np.sqrt(np.sum(shiftedPart[:,:]**2, axis=1))
|
||||||
thisProfile, radii = np.histogram(dist, bins=nBins, range=(0,rMaxProfile))
|
thisProfile, radii = np.histogram(dist, bins=10, range=(0,rMaxProfile))
|
||||||
deltaV = 4*np.pi/3*(radii[1:]**3-radii[0:(radii.size-1)]**3)
|
deltaV = 4*np.pi/3*(radii[1:]**3-radii[0:(radii.size-1)]**3)
|
||||||
thisProfile = np.float32(thisProfile)
|
thisProfile = np.float32(thisProfile)
|
||||||
thisProfile /= deltaV
|
thisProfile /= deltaV
|
||||||
|
@ -75,6 +75,7 @@ def buildProfile(catalog, rMin, rMax):
|
||||||
allProfiles.append(thisProfile)
|
allProfiles.append(thisProfile)
|
||||||
binCenters = 0.5*(radii[1:] + radii[:-1])
|
binCenters = 0.5*(radii[1:] + radii[:-1])
|
||||||
|
|
||||||
|
nVoid = len(voidsToStack)
|
||||||
stackedProfile = np.std(allProfiles, axis=0) / np.sqrt(nVoids)
|
stackedProfile = np.std(allProfiles, axis=0) / np.sqrt(nVoids)
|
||||||
sigmas = np.std(allProfiles, axis=0) / np.sqrt(nVoids)
|
sigmas = np.std(allProfiles, axis=0) / np.sqrt(nVoids)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue