V2 API

Zobov.__init__

vast.vsquared.zobov.Zobov.__init__(self, configfile, start=0, end=3, save_intermediate=True, visualize=False, periodic=False, capitalize_colnames=False)

Initialization of the ZOnes Bordering on Voids (ZOBOV) algorithm.

Parameters:
configfilestr

Configuration file, in INI format.

startint

Analysis stages: 0=generate catalog, 1=load catalog, 2=load tesselation, 3=load zones, 4=load voids.

endint

Ending point: 0=generate catalog, 1=generate tesselation, 2=generate zones, 3=generate voids, 4=load voids.

save_intermediatebool

If true, pickle and save intermediate outputs.

visualizebool

Create visualization.

periodicbool

Use periodic boundary conditions.

capitalize_colnamesbool

If True, column names in ouput file are capitalized. If False, column names are lowercase

Zobov.sortVoids

vast.vsquared.zobov.Zobov.sortVoids(self, method=0, minsig=2, dc=0.2)

Sort voids according to one of several methods.

Parameters:
methodint or string

0 or VIDE or vide = VIDE method (arXiv:1406.1191); link zones with density <1/5 mean density, and remove voids with density >1/5 mean density. 1 or ZOBOV or zobov = ZOBOV method (arXiv:0712.3049); keep full void hierarchy. 2 or ZOBOV2 or zobov2 = ZOBOV method; cut voids over a significance threshold. 3 = not available 4 or REVOLVER or revolver = REVOLVER method (arXiv:1904.01030); every zone below mean density is a void.

minsigfloat

Minimum significance threshold for selecting voids.

dcfloat

Density cut for linking zones using VIDE method.

Zobov.saveVoids

vast.vsquared.zobov.Zobov.saveVoids(self)

Output calculated voids to an ASCII file [catalogname]_zonevoids.dat.

Zobov.saveZones

vast.vsquared.zobov.Zobov.saveZones(self)

Output calculated zones to an ASCII file [catalogname]_galzones.dat.

Zobov.preViz

vast.vsquared.zobov.Zobov.preViz(self)

Pre-computations needed for zone and void visualizations. Produces an ASCII file [catalogname]_galviz.dat.

util.toCoord

vast.vsquared.util.toCoord(z, ra, dec, H0, Om_m)[source]

Convert redshift, RA, and Dec to comoving coordinates.

Parameters:
zlist or ndarray

Object redshift.

ralist or ndarray

Object right ascension, in decimal degrees.

declist or ndarray

Object declination, in decimal degrees.

H0float

Hubble’s constant in km/s/Mpc.

Om_mfloat

Value of matter density.

Returns:
cslist

Comoving xyz-coordinates, assuming input cosmology.

util.toSky

vast.vsquared.util.toSky(cs, H0, Om_m, zstep)[source]

Convert redshift, RA, and Dec to comoving coordinates.

Parameters:
csndarray

Comoving xyz-coordinates table [x,y,z], assuming input cosmology.

H0float

Hubble’s constant in km/s/Mpc.

Om_mfloat

Value of matter density.

zstepfloat

Redshift step size for converting distance to redshift.

Returns:
zfloat

Object redshift.

rafloat

Object right ascension, in decimal degrees.

decfloat

Object declination, in decimal degrees.

util.inSphere

vast.vsquared.util.inSphere(cs, r, coords)[source]

Checks if a set of comoving coordinates are within a sphere.

Parameters:
cslist or ndarray

Center of sphere.

rfloat

Sphere volume.

coordslist or ndarray

Comoving xyz-coordinates.

Returns:
inSpherebool

True if abs(coords - cs) < r.

util.getBuff

vast.vsquared.util.getBuff(cin, idsin, cmin, cmax, buff, n)[source]

Identify tracers contained in buffer shell around periodic boundary.

Parameters:
cinndarray

Array of tracer positions.

idsinndarray

Array of tracer IDs.

cminndarray

Array of coordinate minima.

cmaxndarray

Array of coordinate maxima.

bufffloat

Width of buffer shell.

nint

Number of buffer shell.

Returns:
coutlist

List of buffer tracer positions.

idsoutndarray

Array of tracer IDs in the original periodic box.

util.wCen

vast.vsquared.util.wCen(vols, coords)[source]

Find the weighted center of tracers’ Voronoi cells.

Parameters:
volsndarray

Array of Voronoi volumes.

coordsndarray

Array of cells’ positions.

Returns:
wCenndarray

Weighted center of tracers’ Voronoi cells.

util.getSMA

vast.vsquared.util.getSMA(vrad, coords)[source]

Convert tracers and void effective radius to ellipsoid semi-major axes.

Parameters:
vradndarray

List of void radii.

coordsndarray

Array of void coordinates.

Returns:
smandarray

Ellipsoid semi-major axes for voids.

util.P

vast.vsquared.util.P(r)[source]

Calculate probability that void is fake.

Parameters:
rfloat or ndarray

Void radius or radii.

Returns:
probfloat or ndarray

Probability that void is fake.

util.flatten

vast.vsquared.util.flatten(l)[source]

Recursively flattens a list.

Parameters:
llist

List to be flattened

Returns: