flip (Field Level Inference Package) is a Python package designed for the analysis of velocity and density fields in cosmology. The package provides tools for fitting the growth rate of structures using different methodological approaches.
The full description of the core concepts of this package is given in Ravoux et al. 2025.
The package is decomposed into several subpackages. Some are common modules shared across all methods, while others implement specific methodological approaches to deal with velocity and density fields.
These modules are shared across all methods:
- :py:mod:`flip.power_spectra` — Power spectrum generation using various Boltzmann solver engines (CLASS, cosmoprimo, pyccl). See Power Spectra.
- :py:mod:`flip.data_vector` — Data vector classes for handling velocity, density, and joint data. See Data Vectors.
- :py:mod:`flip.data` — Built-in test data and loading utilities.
The package currently supports or plans to support the following approaches:
- Likelihood-based field-level inference (:py:mod:`flip.covariance`) — The core method of the package, using covariance matrices built from model power spectra and object coordinates. See Covariance method.
- Forward modeling simulation (:py:mod:`flip.simulation`) — A simulation-based approach currently under construction. See Simulation method.
- Field comparison — A direct field comparison method, not yet implemented. See Field comparison method.
The full description of the core concepts of this package is given in Ravoux et al. 2025. This package was started on the previous work of Carreres et al. 2023. Please cite both papers when using the package.