V2 API

Zobov.__init__

vast.vsquared.zobov.Zobov.__init__(self, configfile, stages=[0, 1, 2, 3], save_intermediate=True, visualize=False, periodic=False, num_cpus=1, xyz=False, capitalize_colnames=False, verbose=0)
Parameters:
configfilestr

Configuration file path, for a config file in INI format.

stageslist of integers

0=generate catalog, 1=generate tesselation, 2=generate zones, 3=generate voids, Example: stages=[1,2,3] will attempt to load a previously pickled catalog object from a previous run with save_intermediate=True, and then run the tesselation, zones creation, and voids creation stages stages=[2,3] will attempt to load a previously pickled tesselation object and then run the zones and voids creation Default stages=[0,1,2,3] to run all four stages.

save_intermediatebool

If true, pickle and save intermediate outputs.

visualizebool

If True, tell the Zones class to create the output data necessary to visualize the V^2 output using the VAST/VoidRender OpenGL tool.

periodicbool

Use periodic boundary conditions. In Periodic mode, galaxy coordinates currently must be provided in cartesian/xyz format. In non-periodic mode, provide them in ra/dec/redshift

num_cpusint

number of cpus to leverage for computations

xyzbool

Use rectangular 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, zone_linking_cut=0.2, central_density_cut=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.

zone_linking_cutfloat

Density cut for linking zones using VIDE method.

central_density_cutfloat

Density cut for filtering voids from the final catalog.

Zobov.saveVoids

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

Output calculated voids to a FITS file [catalogname]_V2_[pruning method]_Output.fits

Zobov.saveZones

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

Output calculated zones to a FITS file [catalogname]_V2_[pruning method]_Output.fits

Zobov.preViz

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

Pre-computations needed for zone and void visualizations. Outputs to a FITS file [catalogname]_V2_[pruning method]_Output.fits

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: