Skip to main content

pulsar_spectra

pulsar_spetra logo

tests documentation

A simple interface to record pulsar's flux density measurements for a large number of papers and perform fitting of spectral models.

Installation

For Users

From PyPI

The latest stable release can be installed from PyPI using pip:

pip install pulsar-spectra

or using uv:

uv pip install pulsar-spectra

From Docker Hub

There is a Docker container that you can install with:

docker pull nickswainston/pulsar_spectra

For Publishers

If you plan to publish your results in a scientific journal, it is important that you use a specific version/tag of pulsar_spectra and keep the Python dependencies as similar to that version as possible. To do this, we recommend that you either use the uv lock file (which defines specific Python dependency versions) or the Docker container (which has specific Python dependency versions already installed).

To check what versions are available, you can either browse the GitHub release page or, in the repository, run the command:

git tag

The most recent version is likely what you will need. Replace <version> in the following commands with the version you have chosen.

From Docker Hub

There is a Docker container that you can install with:

docker pull nickswainston/pulsar_spectra:<version>

From source

If you are installing the package from source, we recommend first reverting the repository to a specific version. This can be done using following command:

git checkout tags/<version>

You can then install that version by following the instructions in the "For Developers" section below.

For Developers

To install the package from source, first clone the repository and move into the repository directory. You can then install the package using either uv or pip, as described below.

The package can be installed in a new virtual environment using uv, which will ensure a consistent development environment. This can be done with the command:

uv sync --locked

By default, this will install the dependencies in the dev group but no other groups. If you are developing documentation, then include the docs group:

uv sync --locked --group docs

Then activate the virtual environment:

source .venv/bin/activate

Using pip

Alternatively, you can install the package into your working environment using pip. In the repository directory, run:

pip install .

To install the development dependencies, run:

pip install --group dev .

To install the documentation dependencies, run:

pip install --group docs .

Help

The documentation can be found here

Credit

If you use pulsar_spectra for your research please give credit by citing Swainston et al 2022, PASA, 39, e056 and the publications of the data used in your spectral fits.

Until there is a more appropriate method for crediting software development and maintainance, please also consider including me as a co-author on publications which rely on pulsar_spectra.

Catalogue data

The catalogue comprises YAML files containing pulsar flux density measurements for each paper the repository has included. You should not assume that this repository has all flux density measurements for a pulsar you are interested in. Instead, you should search through the literature to find all papers that contain flux density measurements of the pulsar and confirm all of those papers are in the catalogue. You can find a list of the papers in the catalogue here

If you would like to add a new paper to the catalogue read the guide

Metadata

Release files for pulsar-spectra 2.1.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 pulsar-spectra 2.1.0
File Size Uploaded
pulsar_spectra-2.1.0.tar.gz 192.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pulsar-spectra 2.1.0
File Interpreter ABI Platform
pulsar_spectra-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 438.2 kB

Release files / pulsar_spectra-2.1.0.tar.gz

Download URL pulsar_spectra-2.1.0.tar.gz
Size 192.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f1df4f4ca2f71b4e0b6d91b0c2b9056299063ab067f6241f5cf51e65b4370328
BLAKE2b-256 checksum
How to use checksums
245f60488dbdfba261817f6e6fad90bac65e9ac44c07cfc9b17dd1f088a371a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / pulsar_spectra-2.1.0-py3-none-any.whl

Download URL pulsar_spectra-2.1.0-py3-none-any.whl
Size 246.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dced3521a3176a28fc1068543dcfe7a4147286140708804abbbd5b045e23a1f
BLAKE2b-256 checksum
How to use checksums
5f0c1f8040dac65363aad833f034bc84d3904cfbc4f8e5a747e58b129bcd5e75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.4

2 release files

2.0.3

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0

1 release file

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