Skip to main content

so3g

GitHub Workflow Status (branch) Documentation Status https://coveralls.io/repos/github/simonsobs/so3g/badge.svg?branch=master https://img.shields.io/badge/dockerhub-latest-blue PyPI Package

Glue functions and new classes for SO work in the spt3g paradigm.

Installation from Binary Packages

If you are just “using” so3g and not actively modifying the source, simply install the binary wheels from PyPI:

pip install so3g

Building from Source

When developing the so3g code, you will need to build from source. There are two methods documented here: (1) using a conda environment to provide python and all compiled dependencies and (2) using a virtualenv for python and OS packages for compiled dependencies. In both cases, the compiled dependencies include:

  • A C++ compiler supporting the c++17 standard

  • BLAS / LAPACK

  • Boost (at least version 1.87 for numpy-2 compatibility)

  • GSL

  • libFLAC

Building with Conda Tools

This method is the most reliable, since we will be using a self-consistent set of dependencies and the same compilers that were used to build those. First, ensure that you have a conda base environment that uses the conda-forge channels. The easiest way to get this is to use the “mini-forge” installer (https://github.com/conda-forge/miniforge).

Once you have the conda “base” environment installed, create a new environment for Simons Observatory work. We force the python version to 3.12, since the default (3.13) is still missing some of our dependencies:

conda create -n simons python==3.12 # <- Only do this once
conda activate simons

Now install all of our dependencies (except for spt3g):

conda install --file conda_dev_requirements.txt

Next, choose how to install spt3g.

Bundled SPT3G

If you are just testing a quick change, you can use pip to install so3g. This will download a copy of spt3g and bundle it into the the installed package. The downside is that every time you run pip, it will re-build all of spt3g and so3g under the hood with cmake:

pip install -vv .

Separate SPT3G

If you are going to be developing so3g and repeatedly building it, you probably want to install spt3g once. See the instructions from that package to download and install. When building, you can install into your conda environment like this:

cd spt3g_software
mkdir -p build
cd build
cmake \
    -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
    -DCMAKE_C_COMPILER=${CC} \
    -DCMAKE_CXX_COMPILER=${CXX} \
    -DPython_ROOT_DIR=${CONDA_PREFIX} \
    ..
make -j 4 install
# Copy the python package into place
cp -r ./spt3g ${CONDA_PREFIX}/lib/python3.12/site-packages/

When building so3g against a stand-alone version of spt3g, you need to use cmake directly:

cd so3g
mkdir -p build
cd build
cmake \
    -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
    -DCMAKE_C_COMPILER=${CC} \
    -DCMAKE_CXX_COMPILER=${CXX} \
    -DPython_ROOT_DIR=${CONDA_PREFIX} \
    -DBLAS_LIBRARIES='-L${CONDA_PREFIX}/lib -lopenblas -fopenmp' \
    ..
make -j 4 install

Building with OS Packages

Another option is to use a virtualenv for python packages and use the compilers and libraries from your OS to provide so3g dependencies. Install dependencies, for example:

apt install \
    libboost-all-dev \
    libopenblas-openmp-dev \
    libflac-dev \
    libgsl-dev \
    libnetcdf-dev

Then activate your virtualenv. Next you should install to someplace in your library search path. Note that the commands below will not work unless you change the install prefix to a user-writable directory (or make install with sudo). You should decide where you want to install and make sure that the location is in your PATH and LD_LIBRARY_PATH:

cd spt3g_software
mkdir -p build
cd build
cmake \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    ..
make -j 4 install
# Copy the python package into place
cp -r ./spt3g ${CONDA_PREFIX}/lib/python3.12/site-packages/

And similarly for so3g:

cd so3g
mkdir -p build
cd build
cmake \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DBLAS_LIBRARIES='-lopenblas -fopenmp' \
    ..
make -j 4 install

Testing

The unit tests are not installed with the so3g package, so in order to run them you must have a git checkout of so3g (even if you installed so3g from a pre-built wheel).

After installing the so3g package, you can run the unit tests by passing the path to the test directory to the pytest command:

pytest /path/to/so3g/test

You can run specific tests by calling them directly:

python3 -m unittest /path/to/so3g/test/test_indexed

Metadata

Release files for so3g 0.2.9

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

Built distributions (wheels)

Table of built distributions (wheels) for so3g 0.2.9
File
so3g-0.2.9-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
so3g-0.2.9-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details
so3g-0.2.9-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
so3g-0.2.9-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details
so3g-0.2.9-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
so3g-0.2.9-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details
so3g-0.2.9-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
so3g-0.2.9-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details
so3g-0.2.9-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
so3g-0.2.9-cp310-cp310-macosx_15_0_arm64.whl CPython 3.10 CPython 3.10 macOS 15.0+ ARM64 Details

Total release size: 329.2 MB

Release files / so3g-0.2.9-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL so3g-0.2.9-cp314-cp314-manylinux_2_28_x86_64.whl
Size 32.8 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d9a391509038e59a5731356bd6eab9f563480960223df533a58f2995ef986377
BLAKE2b-256 checksum
How to use checksums
85874ac97a5acea9133efb59b11235fa513eb189ab01a808b236aa0a85352df9
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp314-cp314-macosx_15_0_arm64.whl

Download URL so3g-0.2.9-cp314-cp314-macosx_15_0_arm64.whl
Size 32.9 MB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
c66fc26fc8ed78afbdb2908c1d8902f49c778d3520fae1e4590808eb8bb0bc40
BLAKE2b-256 checksum
How to use checksums
41927ecec97093649400bd9dff1effaa37def0f07bc707dbf4ca967b68f45886
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL so3g-0.2.9-cp313-cp313-manylinux_2_28_x86_64.whl
Size 32.8 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
de7a7a3148c1a6620dc98780032341c9e08db84aca3886fdf393950d19f8d87f
BLAKE2b-256 checksum
How to use checksums
f743afad8237901609d2543927c4b672815ca4845ee1f4d3223f5b52cfdb2ccf
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp313-cp313-macosx_15_0_arm64.whl

Download URL so3g-0.2.9-cp313-cp313-macosx_15_0_arm64.whl
Size 32.9 MB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
ce250cae4d696012a82307b8adcc229f63b075ee320b174b2be55ec0814a0f49
BLAKE2b-256 checksum
How to use checksums
7809bdda20f91c2c7438fd4bfb0abc529c4d3ad7967883a002dbe79686420cad
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL so3g-0.2.9-cp312-cp312-manylinux_2_28_x86_64.whl
Size 32.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
253c3da2497c449082bcb979f668c790873941e4d36465f0b1a55c5905884cca
BLAKE2b-256 checksum
How to use checksums
063128e5d3b21e4269c974d575d87a7668adb284eb30188eb14f2e459be86dd8
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp312-cp312-macosx_15_0_arm64.whl

Download URL so3g-0.2.9-cp312-cp312-macosx_15_0_arm64.whl
Size 32.9 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
08fe06c51a50bd24f275cbe90abf931b34117c0eeb496f3edc23ca9b87561bd4
BLAKE2b-256 checksum
How to use checksums
d31d34f4753e3cc312d46644a9d62408c3844d652aeca8e7e384de4423e4a919
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL so3g-0.2.9-cp311-cp311-manylinux_2_28_x86_64.whl
Size 33.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
782995f02d6c9231f5c441a91ebd8ff5286845896ada2b1471e28583daf5467f
BLAKE2b-256 checksum
How to use checksums
530cb37abbac7f26211cd5d54eaec03e5d7317960cf10a88b68fc93f28fc323d
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp311-cp311-macosx_15_0_arm64.whl

Download URL so3g-0.2.9-cp311-cp311-macosx_15_0_arm64.whl
Size 33.1 MB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
778ad791855737bc04ee971f2daa3d2f780940682e1fcb7d88af08fc64310508
BLAKE2b-256 checksum
How to use checksums
9634fc6e33f3936e38b6f9c02188e42486731fdb6fcd8e80dfe2a0d17b8fecff
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL so3g-0.2.9-cp310-cp310-manylinux_2_28_x86_64.whl
Size 33.0 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1c3633ee379ea0af6387ff7c50d1a915da2454d786e1b30b19287835bc5f2c77
BLAKE2b-256 checksum
How to use checksums
2f3474972950c4a98f203342500fc22341fcf9f54a4822b063e563676e77116c
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 Sep 17, 2026.

Transparency log

Release files / so3g-0.2.9-cp310-cp310-macosx_15_0_arm64.whl

Download URL so3g-0.2.9-cp310-cp310-macosx_15_0_arm64.whl
Size 33.1 MB
Tags CPython 3.10 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
008cfd74105e4cd031fa149bde152b30e406adcb5dfc3ada53cf8530a08f102f
BLAKE2b-256 checksum
How to use checksums
b7c0ecdf7d9cd79dc221c0c7ab04c49b1b3826f21d26ee780b83d64fa3d5be50
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 Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.9 This release

10 release files

0.2.7

12 release files

0.2.6

12 release files

0.2.5

12 release files

0.2.4

11 release files

0.2.0

11 release files

0.1.17

7 release files

0.1.16

7 release files

0.1.15

7 release files

0.1.13

8 release files

0.1.11

8 release files

0.1.9

8 release files

0.1.8

8 release files

0.1.7

5 release files

0.1.6

8 release files

0.1.5

4 release files

0.1.4

8 release files

0.1.3

8 release files

0.1.2

8 release files

0.1.1

8 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