Skip to main content

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:

$ 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. For a full list of contributors please see the CONTRIBUTORS file.

Metadata

Release files for bagpuss 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bagpuss 0.2.0
File Size Uploaded
bagpuss-0.2.0.tar.gz 278.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bagpuss 0.2.0
File Interpreter ABI Platform
bagpuss-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 360.2 kB

Release files / bagpuss-0.2.0.tar.gz

Download URL bagpuss-0.2.0.tar.gz
Size 278.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2c77a71be9e3218c4226a366dc6c1b607fff20b361427db2e154f1edc23f1cd7
BLAKE2b-256 checksum
How to use checksums
36d7b82b243f516e69dc8c2dd2a6e322d152e094587d90a5dce0c1cc25608f05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / bagpuss-0.2.0-py3-none-any.whl

Download URL bagpuss-0.2.0-py3-none-any.whl
Size 81.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0262654891adc8a9222896b26cf9e975eaee9126e6f2eab188246f45ac27bf1
BLAKE2b-256 checksum
How to use checksums
d59699b026dbbd6576652f213964febe497542e227b368f70c7af450099b77a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page