Names side by side¶
The two APIs are one library. A C++ name in camelCase is the Python name in
snake_case; a C++ configuration struct is a Python class of the same name,
passed as config=; a flat std::vector<double> of 3 * N entries becomes
a NumPy array of shape (N, 3). The types of otswap pass between the two
packages as they are: an otswap.Result from otswap.reconstruct_box goes
straight into bitvf.find_voids_box. The rows below differ from that rule,
or are listed for completeness.
Errors¶
C++ |
Python |
Notes |
|---|---|---|
|
|
C++ records the throw location: |
|
|
the message starts |
— |
|
Ctrl+C, at the next report line of a search |
Configuration¶
C++ |
Python |
Notes |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
— |
Python prints to |
|
|
the nested configurations read as references into the |
|
|
|
|
|
also a pair |
|
|
|
|
|
|
|
|
|
|
|
also a pair |
Lightcone inputs¶
C++ |
Python |
Notes |
|---|---|---|
sky arrays in radians, flat |
arrays of shape (N, 3) in |
|
|
— |
Python converts at the call, from |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the bias of |
Functions¶
C++ |
Python |
Notes |
|---|---|---|
|
|
|
|
|
an |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sky arrays in |
|
|
an |
|
|
|
|
|
|
|
|
|
|
|
|
Results¶
C++ |
Python |
Notes |
|---|---|---|
|
the same names |
read-only; no constructor |
|
|
|
per-cell arrays of a box grid, |
shape (nx, ny, nz), C order |
|
per-cell arrays of |
the shape of the field |
|
a cell row stored as a value ( |
a flat row |
|
flags, |
|
inputs accept |
|
|
0, 1 or 2 |
|
|
|
|
|
angles in |
|
|
a new copy on each access |
|
|
|
|
|
|
angles in a lightcone result or grid (radians) |
the |
|
per-cell arrays of a lightcone grid |
flat, |
|
|
|
NaN in a box |
|
|
shape (0,) in a box and in a grid read from a file |
|
|
|
|
|
shape (0,) in a box |
|
|
empty in C++, |
|
|
null in C++, |
|
|
no cut in C++, |
|
|
0 in a box |
|
|
|
|
|
Files¶
C++ |
Python |
Notes |
|---|---|---|
|
|
|
|
|
|
|
|
the same files, byte for byte |
|
|
|
|
|
|
a path, |
|