Metadata-Version: 2.5
Name: bagpuss
Version: 0.2.0
Summary: Simulated galaxy and gravitational-wave catalogues for cosmological inference testing
License: MIT License
        
        Copyright (c) 2026 Daniel Williams
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: astropy>=6.0
Requires-Dist: click>=8.1
Requires-Dist: h5py>=3.10
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=1.26
Requires-Dist: pyyaml>=6.0
Requires-Dist: scipy>=1.11
Requires-Dist: zarr>=3.2.1
Provides-Extra: detection
Requires-Dist: igwn-ligolw>=2.1; extra == 'detection'
Requires-Dist: ligo-skymap>=2.0; extra == 'detection'
Requires-Dist: minke>=2.2.1; extra == 'detection'
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pyright>=1.1; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: kentigern>=0.3.0; extra == 'docs'
Requires-Dist: sphinx-autoapi>=3.0; extra == 'docs'
Requires-Dist: sphinx>=7.0; extra == 'docs'
Description-Content-Type: text/markdown

# Bagpuss

Bagpuss is a lightweight python package for making simulated galaxy catalogues based on simulated universes.
Fake cats created with bagpuss are intended for testing cosmological inference pipelines, and aren't directly designed to be realistic.

## What's in a name?

> Wake up, be bright, be golden and light

Bagpuss is the name of a beloved toy cat from a classic 1970s British children's television show.

## How Bagpuss works

Bagpuss starts by simulating a Universe according to both a cosmological model, a galaxy formation model, and a luminosity model.
Galaxies are then drawn from the distribution defined by that simulation to create a set of galaxies.

The observed galaxy catalogue is then created by applying a suitable selection function to that set of galaxies.
This provides a fake catalogue of galaxies.

We can then create a fake gravitational-wave catalogue for our universe.
To do this we simulate the population of binary black holes (BBHs) to the total galaxy set.
We perform injections of the gravitational-wave signals from these BBHs into noise (either real or simulated) to determine which of these events would be observed by a given gravitational-wave detector network.
We then need to perform a selection on these events to determine the observed galaxy catalogue.

We then perform parameter estimation on the final set of super-threshold observed events to produce posterior probability distributions for each event, and skymaps.

These data products can then be ingested by an inference pipeline to perform cosmological inference.

## How can I learn more?

You can read more about how bagpuss works in its documentation.

## How can I use it?

Bagpuss is licensed under the MIT License, and is available on PyPI.

You can install bagpuss with pip:

```console
$ pip install bagpuss
```

## Who made this?

Bagpuss was created by researchers at the Institute for Gravitational Research at the University of Glasgow.
The development of Bagpuss is led by [Daniel Williams](https://www.github.com/transientlunatic).
For a full list of contributors please see the [CONTRIBUTORS](CONTRIBUTORS.md) file.