# SelfiSys: Assess the Impact of Systematic Effects in Galaxy Surveys

SelfiSys is a Python package designed to address the issue of model misspecification in field-based, implicit likelihood cosmological inference.

It leverages the inferred initial matter power spectrum, enabling a thorough diagnosis of systematic effects in large-scale spectroscopic galaxy surveys.

## Key Features

- Custom hidden-box forward models

    We provide a HiddenBox class to simulate realistic spectroscopic galaxy surveys. It accommodates fully non-linear gravitational evolution, and incorporates multiple systematic effects observed in real-world survey, e.g., misspecified galaxy bias, survey mask, selection functions, dust extinction, line interlopers, or inaccurate gravity solver.

- Diagnosis of systematic effects

    Diagnose the impact of systematic effects using the inferred initial matter power spectrum, prior to performing cosmological inference.

- Cosmological inference

    Perform inference of cosmological parameters using Approximate Bayesian Computation (ABC) with a Population Monte Carlo (PMC) sampler.

For practical examples demonstrating how to use SelfiSys, visit the SelfiSys Examples Repository.

## References

If you use the SelfiSys package in your research, please cite the following paper and feel free to contact the authors for feedback, collaboration opportunities, or other inquiries.

Diagnosing Systematic Effects Using the Inferred Initial Power Spectrum Hoellinger, T. and Leclercq, F., arXiv e-prints, 2024 arXiv:2412.04443 [astro-ph.CO] [ADS] [pdf]

## Contributors

- Tristan Hoellinger tristan.hoellinger@iap.fr

  Principal developer and maintainer, Institut d’Astrophysique de Paris (IAP).

## License

This software is distributed under the GPLv3 Licence. Please review the LICENSE file in the repository to understand the terms of use and ensure compliance. By downloading and using this software, you agree to the terms of the licence.

## Requirements

The code is written in Python 3.10 and depends on the following packages:

- pySELFI: Python implementation of the Simulator Expansion for Likelihood-Free Inference.

- Simbelmynë: A hierarchical probabilistic simulator for generating synthetic galaxy survey data.

- ELFI: A statistical software package for likelihood-free inference, implementing Approximate Bayesian Computation (ABC) with a Population Monte Carlo (PMC) sampler.

A comprehensive list of dependencies, along with installation instructions, will be provided in a future release.

API Documentation

- hiddenbox
  - `HiddenBox`
- normalise_hb
  - `define_normalisation()`
  - `worker_normalisation()`
  - `worker_normalisation_public()`
  - `worker_normalisation_wrapper()`
- prior
  - `get_summary()`
  - `logposterior_hyperparameters_parallel()`
  - `perform_prior_optimisation_and_plot()`
  - `planck_prior`
  - `worker_class()`
- selection_functions
  - `LognormalSelection`
- selfi_interface
  - `PrintMessage()`
  - `indent()`
  - `unindent()`
- sbmy_interface
  - `compute_Phi()`
  - `generate_white_noise_Field()`
  - `get_power_spectrum_from_cosmo()`
  - `handle_time_stepping()`
  - `setup_sbmy_parfiles()`
- grf
  - `primordial_grf()`
- selfisys.utils package
  - Submodules
  - selfisys.utils.examples_utils module
  - selfisys.utils.logger module
  - selfisys.utils.low_level module
  - selfisys.utils.parser module
  - selfisys.utils.path_utils module
  - selfisys.utils.plot_examples module
  - selfisys.utils.plot_params module
  - selfisys.utils.plot_utils module
  - selfisys.utils.timestepping module
  - selfisys.utils.tools module
  - selfisys.utils.workers module
  - Module contents

Contribute

- Contributing to SelfiSys
  - Reporting Issues
  - Submitting Contributions
  - Style Guidelines
  - Questions?

References

- References