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 |
from a reconstruction |
|
reads otswap’s complete displacement file, the randoms and the mask, and searches it with |
from mean displacements |
|
reads otswap’s mean displacement file, the randoms and the mask, and searches it as one realization with |
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 |
|---|---|---|---|
|
|
required |
all |
|
the tracers |
required |
pipeline |
|
3 columns, right ascension, declination and observed redshift: names, or 0-based indices in ASCII |
required |
pipeline |
|
an integer column, not one of |
none: the row |
pipeline |
|
|
required |
all |
|
the randoms; they describe the survey: its footprint, its redshift distribution and every systematic. At least |
required |
all |
|
3 columns, as |
required |
all |
|
one character, for the ASCII tracer, random and bias files |
|
all |
|
the footprint: a full-sky HEALPix map, a pixel is observed when its value is greater than 0; a |
required |
all |
|
the closed range of observed redshift of the run, either bound alone; |
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 |
|---|---|---|---|
|
|
|
all |
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
otswap’s complete displacement file, as |
— |
its run |
|
otswap’s mean displacement file, as |
— |
its run |
|
a divergence file, as |
none: the search builds its own grid |
|
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 |
|---|---|---|---|
|
in (0, 1] |
required |
pipeline |
|
positive |
required |
pipeline |
|
the dark energy equation of state |
|
pipeline |
Reconstruction¶
Read by otswap; otswap’s executable page explains them.
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
realizations of the reconstruction, at least 1 |
|
pipeline |
|
convergence, strictly between 0 and 1 |
|
pipeline |
|
unsigned; 0 draws one, recorded in the files |
|
pipeline |
|
cell of the neighbour search, in mps, positive; changes the speed only |
|
pipeline |
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
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 |
|
|
|
pipeline |
|
the longest run of unobserved pixels a displacement may cross in a row; a displacement crossing a longer run is rejected |
|
pipeline, with |
Void finder¶
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
width of the Gaussian smoothing, non-negative; 0 for none |
|
all |
|
|
|
all |
|
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, |
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 |
|---|---|---|---|
|
|
|
pipeline |
|
the linear bias of the tracers against redshift: two columns, redshift and bias, read with |
required |
pipeline, with |
|
the randoms of the second reconstruction: |
|
pipeline, with |
|
the randoms of the second reconstruction, built for the real-space sample, with the columns of |
required |
pipeline, with |
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
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 |
|
|
|
pipeline, with |
|
|
|
pipeline, with |
|
|
|
pipeline, with |
Output¶
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
a directory, created if missing |
required |
all |
|
the name in every file name, with no |
required |
all |
|
|
|
all |
|
otswap’s mean and complete displacement files of each reconstruction |
|
pipeline |
|
the divergence file: the divergence and the weight of each cell, also smoothed with sigma > 0 |
|
all |
|
the galaxies file: where each tracer ended up |
|
all |
|
the overdense basins file |
|
all |
Key |
Value |
Default |
Runs |
|---|---|---|---|
|
the mps(z) profile of each reconstruction; written only when |
|
pipeline |
Output files¶
Written after the run, in this order, each into output_dir with the name
<stem>_<output_file>.<output_format>:
otswap’s files, pipeline only: with
perform_recons,displacement_mean_zspace_anddisplacement_complete_zspace_of the first reconstruction, orMPS_zspace_withprintMps; thendisplacement_mean_anddisplacement_complete_of the reconstruction the voids come from, orMPS_; thenreconstructed_catalogue_; each as itsprintkey asks. In ASCII, each displacement file comes with two twin files,<stem>.mps.datand<stem>.distances.dat, holding its mps(z) profile and its distance table.With
save_zspace_voids, the redshift-space pass:voids_zspace_,overdense_basins_zspace_,divergence_zspace_,galaxies_zspace_.The voids:
voids_always, thenoverdense_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>