Skip to content

Commit

Permalink
Merge pull request #75 from DESI-UR/periodic
Browse files Browse the repository at this point in the history
Documentation corrections
  • Loading branch information
QuiteAFoxtrot authored May 6, 2022
2 parents 21ae692 + c6a411b commit 98e4be0
Show file tree
Hide file tree
Showing 13 changed files with 320 additions and 146 deletions.
2 changes: 1 addition & 1 deletion doc/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors:
- name: Kelly A. Douglass
orcid: 0000-0002-9540-546X
affiliation: 1
- name: Dylan Veyrat
- name: Dahlia Veyrat
orcid: 0000-0001-8101-2836
affiliation: 1
- name: Stephen W. O'Neill, Jr.
Expand Down
7 changes: 7 additions & 0 deletions doc/source/Vsquared_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ V\ :sup:`2` API



``util.getBuff``
=============

.. autofunction:: vast.vsquared.util.getBuff



``util.wCen``
=============

Expand Down
3 changes: 2 additions & 1 deletion doc/source/Vsquared_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Introduction
voids based on the ZOBOV (ZOnes Bordering On Voidness) algorithm by
`Neyrinck (2008) <https://arxiv.org/abs/0712.3049>`_, which uses the gradient of
the volume of adjacent voronoi cells to flow multiple cells into larger void
regions.
regions. Voids can be found both in observational surveys and simulations with
periodic boundary conditions.

**VAST** contains the package, as well as an example script for automatically
running all steps of the algorithm. To import the main void-finding class of
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# -- Project information -----------------------------------------------------

project = 'VAST'
copyright = "2022, Kelly A. Douglass, D. Veyrat, Stephen W. O'Neill Jr., Segev BenZvi, Fatima Zaidouni, Michaela Guzzetti"
author = "Kelly A. Douglass, D. Veyrat, Stephen W. O'Neill Jr., Segev BenZvi, Fatima Zaidouni, Michaela Guzzetti"
copyright = "2022, Kelly A. Douglass, Dahlia Veyrat, Stephen W. O'Neill Jr., Segev BenZvi, Fatima Zaidouni, Michaela Guzzetti"
author = "Kelly A. Douglass, Dahlia Veyrat, Stephen W. O'Neill Jr., Segev BenZvi, Fatima Zaidouni, Michaela Guzzetti"

# The short X.Y version
version = re.match(r"v?(\d+\.\d+)", vast._version.__version__).group(1)
Expand Down
9 changes: 9 additions & 0 deletions example_scripts/DR7_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ radius_min = 10.0
nside = 32
#Step size for comoving-distance-to-redshift lookup table
redshift_step = 5e-5
#Periodic limits (Mpc/h)
x_min = -50.
y_min = -50.
z_min = -50.
x_max = 50.
y_max = 50.
z_max = 50.
#Periodic buffer shell width (Mpc/h)
buffer = 5.
23 changes: 15 additions & 8 deletions example_scripts/Gadget_VoidFinder_periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#-------------------------------------------------------------------------------
import numpy as np

from vast.voidfinder import find_voids
from vast.voidfinder import find_voids, wall_field_separation

from vast.voidfinder.preprocessing import load_data_to_Table
################################################################################
Expand Down Expand Up @@ -54,20 +54,27 @@
# Read in data
#-------------------------------------------------------------------------------
# Read in the simulated data
wall_coords_xyz = load_data_to_Table(sim_filename)
coords_xyz = load_data_to_Table(sim_filename)

#-------------------------------------------------------------------------------
# Restructure the data for the find_voids function
#-------------------------------------------------------------------------------
x = wall_coords_xyz['x']
y = wall_coords_xyz['y']
z = wall_coords_xyz['z']
x = coords_xyz['x']
y = coords_xyz['y']
z = coords_xyz['z']

num_gal = x.shape[0]

wall_coords_xyz = np.concatenate((x.reshape(num_gal,1),
y.reshape(num_gal,1),
z.reshape(num_gal,1)), axis=1)
coords_xyz = np.concatenate((x.reshape(num_gal,1),
y.reshape(num_gal,1),
z.reshape(num_gal,1)), axis=1)
#-------------------------------------------------------------------------------


#-------------------------------------------------------------------------------
# Remove isolated galaxies
#-------------------------------------------------------------------------------
wall_coords_xyz, field_coords_xyz = wall_field_separation(coords_xyz)
#-------------------------------------------------------------------------------
################################################################################

Expand Down
22 changes: 14 additions & 8 deletions example_scripts/Gadget_VoidFinder_xyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#-------------------------------------------------------------------------------
import numpy as np

from vast.voidfinder import find_voids
from vast.voidfinder import find_voids, wall_field_separation

from vast.voidfinder.preprocessing import load_data_to_Table
################################################################################
Expand Down Expand Up @@ -54,20 +54,26 @@
# Read in data
#-------------------------------------------------------------------------------
# Read in the simulated data
wall_coords_xyz = load_data_to_Table(galaxies_filename)
coords_xyz = load_data_to_Table(galaxies_filename)

#-------------------------------------------------------------------------------
# Restructure the data for the find_voids function
#-------------------------------------------------------------------------------
x = wall_coords_xyz['x']
y = wall_coords_xyz['y']
z = wall_coords_xyz['z']
x = coords_xyz['x']
y = coords_xyz['y']
z = coords_xyz['z']

num_gal = x.shape[0]

wall_coords_xyz = np.concatenate((x.reshape(num_gal,1),
y.reshape(num_gal,1),
z.reshape(num_gal,1)), axis=1)
coords_xyz = np.concatenate((x.reshape(num_gal,1),
y.reshape(num_gal,1),
z.reshape(num_gal,1)), axis=1)
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Remove isolated galaxies
#-------------------------------------------------------------------------------
wall_coords_xyz, field_coords_xyz = wall_field_separation(coords_xyz)
#-------------------------------------------------------------------------------
################################################################################

Expand Down
5 changes: 4 additions & 1 deletion example_scripts/vsquared.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
help='Enable void visualization.')
p.add_argument('-w', '--save_intermediate', action='store_true', default=False,
help='Save intermediate files in void calculation.')
p.add_argument('-p', '--periodic', action='store_true', default=False,
help='Use periodic boundary contitions.')

req = p.add_argument_group('required named arguments')
req.add_argument('-c', '--config', dest='config_file', required=True, default="DR7_config.ini",
Expand All @@ -25,7 +27,8 @@

newZobov = Zobov(args.config_file, args.method, 3,
save_intermediate=args.save_intermediate,
visualize=args.visualize)
visualize=args.visualize
periodic=args.periodic)

newZobov.sortVoids(method=args.method)

Expand Down
Loading

0 comments on commit 98e4be0

Please sign in to comment.