PyBORG root module
PyBORG is a complete binding of the borg machine to python. The borg module can be imported either from a normal python interpret or from the embedded python in hades_python.
Be aware that you cannot import directly any of the native modules. To import
all borg facilities, it is required and sufficient to just execute import aquila_borg
.
It will provide all the modules such as aquila_borg.cosmo or aquila_borg.samplers.
Note: The borg module may be installed as an alias to aquila_borg. However the package name is the same as the one used by BorgBackup. Thus there may be clashes between these two softwares. It is advised to use aquila_borg to avoid conflicts.
-
aquila_borg.
borgConsole
(original=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) Setup a clean redirection of BORG output, notably in presence of MPI4PY.
- Keyword Arguments
original (file-like) – Where to send the console to (default:
sys.stdout
)
-
aquila_borg.
buildDefaultChain
(box, cosmo_pars, a_init, model) Build a default BORG chain from a model. This remove the hastle of setting up a primordial fluctuation generator, and the cosmological parameters.
- Parameters
box (borg.forward.BoxModel) – the specification of the box for the simulation
cosmo_pars (borg.cosmo.CosmologicalParameters) – the cosmology chosen
a_init (float) – the starting scale factor for model
model (borg.forward.BORGForwardModel) – the model to be chained with
- Returns
a newly built chain for cosmology
- Return type
borg.forward.BORGForwardModel
-
class
aquila_borg.
Console
This is the Console class. It allows doing pretty printing of the message from the borg system. It dispatches the message to the appropriate log files and the adequate level asked by the user. The Console object cannot be constructed from Python. To get a Console object use aquila_borg.console.
-
outputToFile
(self: aquila_borg._borg.Console, arg0: str) → None - Parameters
filename (str) – the filename to output the full log to
-
printStackTrace
(self: aquila_borg._borg.Console) → None
-
print_debug
(self: aquila_borg._borg.Console, arg0: str) → None
-
print_error
(self: aquila_borg._borg.Console, arg0: str) → None
-
print_std
(self: aquila_borg._borg.Console, arg0: str) → None Prints a message to the console
- Parameters
message (str) – the message to be printed at the Standard level
-
print_warning
(self: aquila_borg._borg.Console, arg0: str) → None
-
setVerboseLevel
(self: aquila_borg._borg.Console, level: int = 2) → None
-
-
aquila_borg.
console
() → aquila_borg._borg.Console This function returns the valid already created Console object.
-
aquila_borg.
memoryReport
() → Dict[str, aquila_borg._borg._memoryDetail]
Cosmology computations
This module includes the basic components to describe and to do cosmological computations.
Class that holds the values of all cosmological parameters relevant to the BORG framework. |
|
Class to compute different quantities for an homogeneous universe and given cosmological parameters |
|
Construct a new CosmoPower object from the given cosmological parameters. |
|
Builds a new object ClassCosmo. |
Likelihood and associated structures
This module includes the basic components to use BORG likelihoods and develop new likelihoods to mesh with the existing framework.
Create a new MCMC dictionnary. |
|
Base class to represent 3d likelihoods in BORG. |
|
Samplers and sampler algorithms
This module includes the basic components to generate new samplers in a block sampling strategy.
PyBaseSampler class to implement MarkovSampler object from python. |
|
|
Basic slice_sampler implementation. |
This is a sampler that will run a slice sampler for each bias parameter of catalog. |
|
A sampler that sample bias parameters using the borg forward model strategy. |
|
Build a new HMC based density sampler. |
|
Build a new model params sampler. |
|
Build a new sigma8 sampler. |
|
Build a new sampler for altair |
BORG forward model
This module includes the basic components to manipulate forward models.
Enumeration to specify the preferred Input/Output of a forward model |
|
Base class for all forward models. |
|
Special abstract class to provide an API to access to particles used in the forward computation of certain models. |
|
Base class for implementing new forward model in python |
|
This is a forward model to chain several others. |
Standard BORG forward models
This module includes direct access to a number of fundamental forward models.
Enforce the hermiticity of the input complex field. |
|
Forward model to apply a transfer function (not necessarily isotropic) to the input field |
|
Do nothing but Eulerian linear perturbation scaling |
|
Applies an exponential transform to the real space field. |
|
This class binds the borg LPT forward model (CIC mass assignment). |
|
This class binds the borg LPT forward model (CIC/OpenMP mass assignment). |
|
This class binds the borg LPT forward model (NGP double mass assignment). |
|
This class binds the borg LPT forward model (NGP quad mass assignment). |
|
This class binds the borg LPT forward model (Smooth NGP quad mass assignment). |
|
|
|
|
|
|
Builds a new forward model object from its named. |
List the available forward models using their internal name. |
Velocity field computations
This module includes the components to compute velocity field from result of forward models.
This is the base class for models that compute velocity field from a forward model output. |
|
ParticleBasedModel is the base class for the computation of velocity field from forward model that are particle based (such as aquila_borg.forward.models.BorgLpt or aquila_borg.forward.models.BorgPm). |
|
This class implements the Cloud-In-Cell (CIC) model for velocity field computation. |
|
This class implements Simplex-In-Cell (SIC) model for the velocity field computation. |