Lightcone executable

bitvf runs a void search from a parameter file, with no code to write: from the tracers on (a pipeline run), or from a file written earlier. It is built and installed with the C++ library (bin/bitvf under the install prefix); it is not in the Python package.

bitvf <parameter-file>

--help prints the usage, the two options and the address of the documentation of the keys, --version prints bitvf <version>; both go to stdout. Any other argument that starts with -- is refused with the usage line; a parameter file whose name starts with -- is given as ./--name. Without an argument, or with more than one, the program prints the usage line to stderr and exits with 1.

The parameter file has otswap’s syntax: one key = value per line, # for comments, double quotes around a value that holds spaces. A key left out takes the library’s default; a key with no default must be set. key =, with no value, means “none” for the keys that accept it, the same as leaving the key out. A key that is unknown, or that does not apply to the run, is an error: a key of the other geometry is reported as “does not apply to a box” or “does not apply to a lightcone”, a key of another kind of run or whose switch is off as “does not apply to a run …”, naming the key that decides.

The commented file at the end of this page lists every key that applies to its run.

What bitvf runs

The input keys choose the kind of run; at most one of them is given.

Run

Input key

What it does

pipeline

none

reads the tracers, the randoms and the mask, builds the distance table from the cosmology, and runs bitvf::runLightcone(): the reconstruction; with perform_recons = true, the correction of redshift-space distortions and a second reconstruction; then the search

from a reconstruction

displacement_file

reads otswap’s complete displacement file, the randoms and the mask, and searches it with bitvf::findVoidsLightcone()

from mean displacements

displacement_mean_file

reads otswap’s mean displacement file, the randoms and the mask, and searches it as one realization with bitvf::findVoidsLightcone(), recording the file’s NRECMEAN

A displacement file holds the tracers, the redshift cut, the cosmology and the mps(z) profile of its reconstruction, so a run from one takes none of the tracer, cut, cosmology and reconstruction keys. It still needs the randoms, which set the extent of the grid and the expected counts of delta2Mps, and the mask: pass those of the reconstruction.

The keys of bitvf

In the tables below, “Default” is the library’s, as the commented file lists it; “none” means that the library computes or skips the value, and “required” that the key must be set in every run it applies to. “Runs” lists the runs the key applies to: “all”, “pipeline”, or the input key of the run; “with <key>” names the switch the key needs. In any other run the key is an error.

Run and input

Key

Value

Default

Runs

geometry

lightcone

required

all

tracer_file

the tracers

required

pipeline

column_tracer

3 columns, right ascension, declination and observed redshift: names, or 0-based indices in ASCII

required

pipeline

id_column

an integer column, not one of column_tracer, with no value twice

none: the row

pipeline

units

degrees or radians, of the right ascension and declination of every catalogue read

required

all

random_file

the randoms; they describe the survey: its footprint, its redshift distribution and every systematic. At least Nrec times as many as the tracers; 30 times, the minimum with the default Nrec of 30, is a reasonable start

required

all

column_random

3 columns, as column_tracer

required

all

delimiter, comment

one character, for the ASCII tracer, random and bias files

" ", "#"

all

veto_mask_filename

the footprint: a full-sky HEALPix map, a pixel is observed when its value is greater than 0; a .fits.gz file is read as it is

required

all

z_min, z_max

the closed range of observed redshift of the run, either bound alone; z_max not below z_min

none: no bound

pipeline

Tracers on unobserved pixels or outside the redshift range keep their row and take no part; randoms there are removed.

Key

Value

Default

Runs

verbosity

silent, normal or detailed: every step of the run, the reconstruction, the correction and the search

normal

all

Key

Value

Default

Runs

displacement_file

otswap’s complete displacement file, as printDisplComplete writes it

—

its run

displacement_mean_file

otswap’s mean displacement file, as printDisplMean writes it

—

its run

divergence_file

a divergence file, as printDiv writes it, whose grid the search reuses: the same cells, and their mean particle separation

none: the search builds its own grid

displacement_file, displacement_mean_file

Cosmology

The redshift-distance table of the run, which converts the redshifts into comoving distances; coordinates and lengths are then in Mpc/h.

Key

Value

Default

Runs

Omega_matter

in (0, 1]

required

pipeline

little_h

positive

required

pipeline

w0, wa

the dark energy equation of state

-1, 0

pipeline

Reconstruction

Read by otswap; otswap’s executable page explains them.

Key

Value

Default

Runs

Nrec

realizations of the reconstruction, at least 1

30

pipeline

threshold

convergence, strictly between 0 and 1

1e-3

pipeline

seed

unsigned; 0 draws one, recorded in the files

0

pipeline

mesh_cellsize

cell of the neighbour search, in mps, positive; changes the speed only

4

pipeline

Key

Value

Default

Runs

bins

the redshift bins of the mps(z) profile, at least 1; each bin needs enough tracers, so a small sample needs fewer bins

required

pipeline

reject_mask_crossings

true or false: reject a displacement that crosses unobserved pixels

true

pipeline

max_unobserved_pixels_crossed

the longest run of unobserved pixels a displacement may cross in a row; a displacement crossing a longer run is rejected

0

pipeline, with reject_mask_crossings

Void finder

Key

Value

Default

Runs

sigma

width of the Gaussian smoothing, non-negative; 0 for none

1

all

sigma_unit

mps or coordinate

mps

all

cell_size

side of the divergence cell, in mps, positive

none: min(1, (20 / R)^(1/3)), R the realizations searched, 1 from a mean displacement file

pipeline, displacement_file, displacement_mean_file; not with divergence_file

Correction of redshift-space distortions

With perform_recons = true the tracers are corrected in redshift, reconstructed again and searched in real space, on the grid of the first reconstruction. The other keys of this section apply only then.

Key

Value

Default

Runs

perform_recons

true or false

false

pipeline

bias_file

the linear bias of the tracers against redshift: two columns, redshift and bias, read with delimiter and comment

required

pipeline, with perform_recons

random_recons_mode

the randoms of the second reconstruction: resample gives the randoms given the redshift distribution of the corrected tracers; none keeps them as they are; external takes random_file_recons

resample

pipeline, with perform_recons

random_file_recons

the randoms of the second reconstruction, built for the real-space sample, with the columns of column_random and the units

required

pipeline, with random_recons_mode = external

Key

Value

Default

Runs

rsd_smoothing_scale

width of the neighbour average of the displacements, in coordinate units, non-negative; 0 for none. For coordinates in Mpc/h, 10 is a reasonable start

required

pipeline, with perform_recons

rsd_weight_by_realizations

true or false: weight each neighbour of the average by its count of valid realizations as well

false

pipeline, with perform_recons

save_zspace_voids

true or false: also search the voids of the first, redshift-space, reconstruction

false

pipeline, with perform_recons

printRecCat

true or false: write the corrected catalogue

false

pipeline, with perform_recons

Output

Key

Value

Default

Runs

output_dir

a directory, created if missing

required

all

output_file

the name in every file name, with no /

required

all

output_format

dat (ASCII) or fits

dat

all

printDisplMean, printDisplComplete

otswap’s mean and complete displacement files of each reconstruction

false

pipeline

printDiv

the divergence file: the divergence and the weight of each cell, also smoothed with sigma > 0

false

all

printGal

the galaxies file: where each tracer ended up

false

all

printOverdense

the overdense basins file

false

all

Key

Value

Default

Runs

printMps

the mps(z) profile of each reconstruction; written only when printDisplMean and printDisplComplete are both false, since a displacement file already holds it

false

pipeline

Output files

Written after the run, in this order, each into output_dir with the name <stem>_<output_file>.<output_format>:

  1. otswap’s files, pipeline only: with perform_recons, displacement_mean_zspace_ and displacement_complete_zspace_ of the first reconstruction, or MPS_zspace_ with printMps; then displacement_mean_ and displacement_complete_ of the reconstruction the voids come from, or MPS_; then reconstructed_catalogue_; each as its print key asks. In ASCII, each displacement file comes with two twin files, <stem>.mps.dat and <stem>.distances.dat, holding its mps(z) profile and its distance table.

  2. With save_zspace_voids, the redshift-space pass: voids_zspace_, overdense_basins_zspace_, divergence_zspace_, galaxies_zspace_.

  3. The voids: voids_ always, then overdense_basins_, divergence_, galaxies_, as asked.

In ASCII, each divergence file comes with its twin <stem>.mps.dat, the mps(z) profile of the grid. Their columns and keywords are on the lightcone file formats page. An existing file is overwritten.

Exit status and messages

A run that succeeds exits with 0. The library’s report lines start with bitvf: ; at normal and detailed, each file written is reported as bitvf: wrote <path>.

Every error is one line on stderr, bitvf: error: <message>, and exit status 1. Errors in the parameter file name the file, and the line of the key when it is given: run.ini:7: key 'Nrec': '8.0' is not an integer. A missing key has no line: run.ini: key 'output_dir' is missing. Unknown keys and keys that do not apply are reported all at once, one line each, before anything is read. Apart from those of the parameter file, an error raised by otswap starts otswap: . When a writer fails, the files already written stay.

The commented parameter file

examples/executable/lightcone.ini runs bitvf on the lightcone tracers of the examples, with the correction of redshift-space distortions, and searches both passes. From the repository root:

bitvf examples/executable/lightcone.ini
# A lightcone run of bitvf: optimal-transport reconstruction of tracers observed
# in redshift space on a part of the sky, correction of the redshift-space
# distortions, a second reconstruction in real space, and the void search on
# both passes. Run from the repository root:
#
#   bitvf examples/executable/lightcone.ini
#
# Syntax: one "key = value" per line, "#" starts a comment. Every key that
# applies to this run is listed below; where the run needs another value than
# the library's default, the default is in the comment. A key left out of a
# file takes the default. "key =" (no value) means "none", as leaving the key
# out. Keys without a default (the paths, the columns, the units, the number of
# bins, the cosmology, the output name, and the correction's bias table and
# width) must be set. A key that does not apply to the run is an error, so the
# commented-out lines must stay so unless their switch is set. Every key is
# described at https://simosartori.github.io/bitvf/lightcone/executable.html

geometry = lightcone
verbosity = detailed                # silent, normal or detailed; default normal

# ---------------------------------------------------------------------------
# Input: the tracers and the randoms, as RA, Dec and the observed redshift
# ---------------------------------------------------------------------------

tracer_file = examples/data/lightcone_tracers.dat
column_tracer = 0 1 2               # RA, Dec, z: 0-based indices in ASCII, names in FITS
id_column =                         # integer identity of each tracer; none: the row
delimiter = " "
comment = "#"
units = degrees                     # of RA and Dec in both files: degrees or radians; no default

# The randoms describe the survey: they must carry its footprint and redshift
# distribution, and every systematic belongs in them. At least Nrec times as
# many as the tracers are needed; 30 times, the minimum with the default Nrec
# of 30, is a good start.
random_file = examples/data/lightcone_randoms.dat
column_random = 0 1 2

# The footprint: a full-sky HEALPix map, a pixel observed when its value is
# greater than 0; a gzip-compressed .fits.gz file is read as it is. Tracers on
# unobserved pixels keep their row and take no part.
veto_mask_filename = examples/data/lightcone_mask.fits.gz

# The closed redshift range of the run; a tracer outside keeps its row and
# takes no part, a random outside is removed. None: no cut.
z_min = 0.885
z_max = 1.10

# ---------------------------------------------------------------------------
# Cosmology: the redshift-distance table
# ---------------------------------------------------------------------------

Omega_matter = 0.286                # no default
little_h = 0.7                      # no default
w0 = -1
wa = 0

# ---------------------------------------------------------------------------
# Reconstruction (otswap), for both passes
# ---------------------------------------------------------------------------

Nrec = 8                            # realizations; default 30
threshold = 1e-2                    # convergence; default 1e-3
seed = 12345                        # 0, the default: drawn, and recorded in the files
mesh_cellsize = 4                   # neighbour-search cell, in mps: speed only
bins = 30                           # redshift bins of the mps(z) profile; no default.
                                    #   Each needs enough tracers: reduce it for a small sample
reject_mask_crossings = true        # reject a displacement that crosses unobserved pixels
max_unobserved_pixels_crossed = 0   # the longest run of them it may cross in a row

# ---------------------------------------------------------------------------
# Void finder, on both passes
# ---------------------------------------------------------------------------

sigma = 1                           # Gaussian smoothing width; 0 for none
sigma_unit = mps                    # mps or coordinate
cell_size =                         # divergence cell, in mps; none: min(1, cbrt(20 / Nrec))

# ---------------------------------------------------------------------------
# Correction of redshift-space distortions: with perform_recons = true the
# tracers are corrected in redshift, reconstructed again and searched in real
# space. The keys below apply only then; those marked "no default" must be
# chosen.
# ---------------------------------------------------------------------------

perform_recons = true               # default false
bias_file = examples/data/lightcone_bias.dat   # linear bias against redshift: z b; no default
rsd_smoothing_scale = 10            # in coordinate units (Mpc/h), 0 for none; no default
rsd_weight_by_realizations = false
# Randoms of the second reconstruction: resample gives them the redshift
# distribution of the corrected tracers; none keeps the observed one; external
# takes the file random_file_recons, with the columns of column_random.
random_recons_mode = resample       # none, resample or external; default resample
# random_file_recons = randoms_real_space.dat   # with external only
save_zspace_voids = true            # also search the redshift-space pass; default false
printRecCat = false                 # the corrected catalogue

# ---------------------------------------------------------------------------
# Starting from files instead of the tracers (at most one of the two; each
# makes the tracer, reconstruction and correction keys errors, and the file
# holds the redshift cut, the cosmology and the mps profile; random_file,
# units and veto_mask_filename stay required). column_random, delimiter,
# comment, sigma, sigma_unit, divergence_file, cell_size (an error when
# divergence_file is set) and the output keys stay.
# ---------------------------------------------------------------------------

# displacement_file = displacement_complete_lightcone.fits   # otswap's printDisplComplete
# displacement_mean_file = displacement_mean_lightcone.fits  # otswap's printDisplMean
# divergence_file =                 # with either: a divergence file whose grid is reused

# ---------------------------------------------------------------------------
# Output: voids_<output_file> is always written; with save_zspace_voids, the
# redshift-space pass writes the same files with zspace_ in their names
# ---------------------------------------------------------------------------

output_dir = examples/executable/output
output_file = lightcone
output_format = dat                 # dat (ASCII) or fits
printDisplMean = false              # otswap's mean displacements
printDisplComplete = false          # otswap's complete displacements
printMps = false                    # the mps(z) profile of each pass, MPS_[zspace_]<output_file>;
                                    # written only when printDisplMean and printDisplComplete are false
printDiv = true                     # divergence_<output_file>; default false
printGal = false                    # galaxies_<output_file>: where each tracer ended up
printOverdense = false              # overdense_basins_<output_file>