Skip to main content

PySM generates full-sky simulations of Galactic emissions in intensity and polarization

Project description

CI Tests Documentation Status PyPI Conda Astropy JOSS

PySM 3

PySM generates full-sky simulations of Galactic emissions in intensity and polarization relevant to CMB experiments. It is a large refactor of PySM 2 focused on reducing memory usage, improving performance and run in parallel with MPI.

See the documentation at https://pysm3.readthedocs.io

Contributor guidelines, coding standards, and testing expectations are documented in AGENTS.md (Repository Guidelines).

See changes in CHANGES.rst in the repository.

Install

See the documentation

  • Install with pip install . or with pip install .[test] to also install the requirements for running tests

  • Optionally, if you have an MPI environment available and you would like to test the MPI capabilities of PySM, install mpi4py and libsharp, check the documentation link above for more details.

  • This repository uses Git LFS for Jupyter notebook files (*.ipynb). Ensure Git LFS is installed and run git lfs pull after cloning to fetch large files.

  • Check code style with uv run flake8 src/pysm3 --count --max-line-length=100

  • Test with uv run pytest -v

  • Building docs requires pandoc, not the python package, the actual pandoc command line tool, install it with conda or your package manager

  • Build docs locally with uv run --extra docs sphinx-build -W -b html docs docs/_build/html

Support

For any question or issue with the software open an issue.

Release

  1. Review CHANGES.rst and move the entries you want to ship out of the Unreleased section into a dated <version> (<YYYY-MM-DD>) heading. Commit the changelog update (and any other release-related changes).

  2. Ensure the working tree is clean and up to date with git status and git pull.

  3. Create or refresh a local environment using uv:

    uv venv .venv
    uv pip install --python .venv/bin/python pip hatch
    uv pip install --python .venv/bin/python -e .[test]

    Activate it for the remaining steps with source .venv/bin/activate.

  4. Run the test suite (at least pytest) to verify the release build.

  5. Create the annotated release tag, e.g. git tag -a 3.4.3 -m "Release 3.4.3".

  6. Confirm Hatch picks up the tagged version:

    hatch version

    The output should match the tag (no .dev suffix).

  7. Build the distribution artifacts:

    hatch build
  8. Publish to PyPI using your API token. Hatch reads credentials from ~/.pypirc (username __token__). Alternatively export HATCH_INDEX_USER=__token__ and HATCH_INDEX_AUTH=<pypi-token> before running:

    hatch publish --no-prompt
  9. Push the tag (and any commits) to GitHub:

    git push --tags
  10. Draft the GitHub release notes referencing the matching CHANGES.rst entry and announce the release as needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysm3-3.4.4.tar.gz (58.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysm3-3.4.4-py3-none-any.whl (75.1 kB view details)

Uploaded Python 3

File details

Details for the file pysm3-3.4.4.tar.gz.

File metadata

  • Download URL: pysm3-3.4.4.tar.gz
  • Upload date:
  • Size: 58.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.11 HTTPX/0.28.1

File hashes

Hashes for pysm3-3.4.4.tar.gz
Algorithm Hash digest
SHA256 44c4aac3d5e0e56edbe9c5b9ab0650ccb325d36c7651db144563d2459f65d456
MD5 8154442caffd5a988c99516ce76bf8e9
BLAKE2b-256 1bcfdcd86530ab534a59d5106c336770f838b70aaa6651d66bc1646ae71c6be5

See more details on using hashes here.

File details

Details for the file pysm3-3.4.4-py3-none-any.whl.

File metadata

  • Download URL: pysm3-3.4.4-py3-none-any.whl
  • Upload date:
  • Size: 75.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.11 HTTPX/0.28.1

File hashes

Hashes for pysm3-3.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 892903e189372f3dc001c26d2567a5c54e702ad9ef6384bcdbf55c51cef5ad3c
MD5 c4d4ceadbdd710398ea3d7d6e7e9787d
BLAKE2b-256 4588b3d94c3c71f1e64a3741742aa6ba5af15278d3395ac7d97196b147008a5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page