Skip to main content

Tools for Simons Observatory work with spt3g_software

Project description

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

so3g-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl (32.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

so3g-0.2.8-cp313-cp313-macosx_15_0_x86_64.whl (38.8 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

so3g-0.2.8-cp313-cp313-macosx_15_0_arm64.whl (32.9 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

so3g-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl (32.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

so3g-0.2.8-cp312-cp312-macosx_15_0_x86_64.whl (38.8 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

so3g-0.2.8-cp312-cp312-macosx_15_0_arm64.whl (32.9 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

so3g-0.2.8-cp311-cp311-manylinux_2_28_x86_64.whl (33.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

so3g-0.2.8-cp311-cp311-macosx_15_0_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

so3g-0.2.8-cp311-cp311-macosx_15_0_arm64.whl (33.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

so3g-0.2.8-cp310-cp310-manylinux_2_28_x86_64.whl (33.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

so3g-0.2.8-cp310-cp310-macosx_15_0_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.10macOS 15.0+ x86-64

so3g-0.2.8-cp310-cp310-macosx_15_0_arm64.whl (33.1 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file so3g-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 98138b1f494c8ffa88703aebc19af564544bb9b8e22547eb9c687e5662a6d99e
MD5 5014f357a2b181a3bdbe2105ef3c296e
BLAKE2b-256 af3ffeddb07d3f04c1ad1fbe4eae3e9b4bdf00263c1371df80396120e02ad29f

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 b6d9919233fa815c3619fa0239fe172ade8ab9b8ac6eebeef3085f5c1d27ea10
MD5 05bcc6295d2c5b53742585764ac5a07b
BLAKE2b-256 68e287055e897367d6b203085c2aa952cdd42a6a894c051c12ce37cfab6efb19

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp313-cp313-macosx_15_0_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 354adbc4c7c6de21172e1dff789a359f7a59030f98e859ce8b3de0101d10b575
MD5 42a7ec8b4545cced5b7d91f26a8ec209
BLAKE2b-256 61fd6566e774c0637bd0d708d1914c3616f62b2e2f3550e430d51814b4b31ff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 108933fe28b9b69ca0d80b723889cef23c1f3aa1eae38eb88a3e15ff68d39a76
MD5 0f4f26c9b644c9c28e888d564d39a324
BLAKE2b-256 d4fceaf466e1ffe0fb6478d502b0f89c640e2c052ffbbac2b060044d3133bdea

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 ecebd682f6e702b6717859c42d76421147cd5ad20ed771ae8d3ddb4f2edd0b03
MD5 fa6051d9a7b99b0783f477e9de5dd585
BLAKE2b-256 494d89922f8b27c0c463ed86d2f4f7d53de32d20118f5ec7fdc62d395e24eb58

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp312-cp312-macosx_15_0_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 baec62bc0b2d6d2210f690ec9e0a068a0ac25ac1216e2f556513171579bcaf1e
MD5 31d48d7f4e0daff87e891ad4625b87d0
BLAKE2b-256 c684273e44a55c939551da4214465a04936ad331cc8fbef7a4aeca6dfa0eb773

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8cc1d2e099b38cda6b6d567f413fbf8d7522fc7f0d0eb4e53092b6ce2ff71313
MD5 562aa7348f52b78b264b3c30f13069a2
BLAKE2b-256 932578cc414ca8cf4fab1b644b042553245d3c1d4aee25fe65b433df721666e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp311-cp311-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 6ace4ba9483ecdf838205aaa981416ade6e873fac40312a7c454506f62065985
MD5 36efb6a3ed4b60b365339f3d50756f39
BLAKE2b-256 df5d4c51f5fcdeadd56439ddb26d16fe47a63a853b2eaed9030e7300aaa2fb57

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp311-cp311-macosx_15_0_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 413ab2b9a7dfc2196129b45b25a9c391ec29e502d7913e75cea7309af5f93669
MD5 16a20dcc538050449361bf716adc0f8e
BLAKE2b-256 6f4db369b48169b3775ebcead5068564a7623e79fd7b3c3d4f3021423210a845

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3702a185034ac5971b3dbe31f68c84d2720ca499cfe8ab444ab6a8d6b7ee5019
MD5 93878d0efb30d63ed254bcae8ec05b17
BLAKE2b-256 dbf6e05c06d7e983593797c6d156a9c4e3dd2f10d01985cc4f1a18c5c2c67a18

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp310-cp310-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp310-cp310-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 df00d5c697ddbff6a495d1d04dc4639f09ce0e00950a37b15b4267192d9a8780
MD5 1080a4e114cd5294c16fe6cb0b0d30fd
BLAKE2b-256 9e8e41e4daf958ae0f03f06f700464c5bad9f2daa631711bf2ebd6c5522d02c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp310-cp310-macosx_15_0_x86_64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file so3g-0.2.8-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for so3g-0.2.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 eaba1baf68966ac0c2b9d021c37973d39760e0a28a873abb32a3bdecdc5d6202
MD5 e89cd31b5c97c1b03dc1c3ddae8e5649
BLAKE2b-256 610736acfd7bdd640a3c6294a242b23ba1449c9e02533ab89fd142b295e5e010

See more details on using hashes here.

Provenance

The following attestation bundles were made for so3g-0.2.8-cp310-cp310-macosx_15_0_arm64.whl:

Publisher: wheels.yml on simonsobs/so3g

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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