mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
changed voronoi plotting to take void index rather than ID
This commit is contained in:
parent
ad2d3722cc
commit
b79046ac22
2 changed files with 9 additions and 17 deletions
|
@ -305,7 +305,7 @@ def plotVoidCells(catalog,
|
|||
|
||||
# -----------------------------------------------------------------------------
|
||||
def plotVoronoi(catalog,
|
||||
voidID,
|
||||
voidIndex=-1,
|
||||
figDir="./",
|
||||
plotName="voronoi",
|
||||
plotCenter = (0,0,0),
|
||||
|
@ -314,7 +314,7 @@ def plotVoronoi(catalog,
|
|||
|
||||
# plots the voronoi cells belonging to a void (or a slice if no void given)
|
||||
# catalog: void catalog
|
||||
# voidID: ID of void to plot (-1 to use all particles)
|
||||
# voidIndec: index of void to plot (-1 to use all particles)
|
||||
# figDir: output directory for figures
|
||||
# plotName: name to prefix to all outputs
|
||||
|
||||
|
@ -327,7 +327,7 @@ def plotVoronoi(catalog,
|
|||
|
||||
|
||||
print(" Selecting particles...")
|
||||
if (voidID == -1):
|
||||
if (voidIndex == -1):
|
||||
xmin = plotCenter[0]-plotWidth[0]/2.
|
||||
xmax = plotCenter[0]+plotWidth[0]/2.
|
||||
ymin = plotCenter[1]-plotWidth[1]/2.
|
||||
|
@ -348,9 +348,10 @@ def plotVoronoi(catalog,
|
|||
#ax.set_ylim(ymin,ymax)
|
||||
#ax_set.zlim(zmin,zmax)
|
||||
else:
|
||||
voidID = catalog.voids[voidIndex].voidID
|
||||
partList = getVoidPart(catalog, voidID)
|
||||
plotCenter = catalog.voids[voidID].macrocenter
|
||||
plotRadius = catalog.voids[voidID].radius
|
||||
plotCenter = catalog.voids[voidIndex].macrocenter
|
||||
plotRadius = catalog.voids[voidIndex].radius
|
||||
|
||||
xmin = plotCenter[0]-plotRadius
|
||||
xmax = plotCenter[0]+plotRadius
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue