Skip to main content

Time-dependent functions of spin-weighted spherical harmonics

Project description

Test and deploy Documentation Status PyPI Version Conda Version MIT License DOI

Scri

Python/numba code for manipulating time-dependent functions of spin-weighted spherical harmonics

Citing this code

If you use this code for academic work (I can't actually imagine any other use for it), please cite the latest version that you used in your publication. The DOI is:

Also please cite the papers for/by which it was produced:

Bibtex entries for these articles can be found here. It might also be nice of you to provide a link directly to this source code.

Quick start

Assuming you have the anaconda distribution of python (the preferred distribution for scientific applications), installation is as simple as

conda update -y --all
conda install -c conda-forge scri

If you need to install anaconda first, it's very easy and doesn't require root permissions. Just download and follow the instructions — particularly setting your PATH. Also, make sure PYTHONPATH and PYTHONHOME are not set. Ensure that it worked by running python --version. It should say something about anaconda; if not, you probably forgot to set your PATH. Now just run the installation command above.

Then, in python, you can check to make sure installation worked with

import scri
w = scri.WaveformModes()

Now, w is an object to contain time and waveform data, as well as various related pieces of information -- though it is trivial in this case, because we haven't given it any data. For more information, see the docstrings of scri, scri.WaveformModes, etc.

Dependencies

The dependencies should be taken care of automatically by the quick installation instructions above. However, if you run into problems (or if you foolishly decide not to use anaconda to install things), it may be because you are missing some or all of these:

All these dependencies are installed automatically when you use the conda command described above. The anaconda distribution can co-exist with your system python with no trouble -- you simply add the path to anaconda before your system executables. In fact, your system python probably needs to stay crusty and old so that your system doesn't break, while you want to use a newer version of python to actually run fancy new code like this. This is what anaconda does for you. It installs into your home directory, so it doesn't require root access. It can be uninstalled easily, since it exists entirely inside its own directory. And updates are trivial.

"Manual" installation

The instructions in the "Quick Start" section above should be sufficient, as there really is no good reason not to use anaconda. You will occasionally hear people complain about it not working; these people have not installed it correctly, and have other python-related environment variables that shouldn't be there. You don't want to be one of those people.

Nonetheless, it is possible to install these packages without anaconda -- in principle. The main hurdle to overcome is numba. Maybe there are nice ways to install numba without anaconda. I don't know. I don't care. But if you're awesome enough to do that, you're awesome enough to install all the other dependencies without advice from me. But in short, you can either use the setup.py files as usual, or just use pip:

pip install git+git://github.com/moble/spinsfast
pip install git+git://github.com/moble/quaternion
pip install git+git://github.com/moble/spherical_functions
pip install git+git://github.com/moble/scri

And since you're just soooo cool, you already know that the --user flag is missing from those commands because you're presumably using a virtual environment, hotshot.

(If you're really not that cool, and aren't using virtualenv, you might think you should sudo those commands. But there's no need if you just use the --user flag instead. That installs packages into your user directory, which is usually a better idea.)

Note that spinsfast depends (for both building and running) on fftw. If you run into build problems with spinsfast, it probably can't find the header or library for fftw. See the documentation of my copy of spinsfast here for suggestions on solving that problem. Of course, with conda, fftw is installed in the right place from my channel automatically.

Continuous Integration

Tests are run automatically on Azure Pipelines. If changes need to be made to the requirements or anything else in recipe/meta.yaml, run

conda smithy rerender -c auto
git push

Documentation

Tutorials and automatically generated API documentation are available on Read the Docs: scri.

Acknowledgments

This code is, of course, hosted on github; because it is an open-source project, the hosting is free, and all the wonderful features of github are available, including free wiki space and web page hosting, pull requests, a nice interface to the git logs, etc.

Every change in this code is auomatically tested on Travis-CI. This is a free service (for open-source projects like this one), which integrates beautifully with github, detecting each commit and automatically re-running the tests. The code is downloaded and installed fresh each time, and then tested, on both versions of python (2 and 3). This ensures that no change I make to the code breaks either installation or any of the features that I have written tests for.

Every change to this code is also recompiled automatically, bundled into a conda package, and made available for download from anaconda.org. Again, because this is an open-source project all those nice features are free.

The work of creating this code was supported in part by the Sherman Fairchild Foundation and by NSF Grants No. PHY-1306125 and AST-1333129.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

scri-2022.0.0.0.tar.gz (118.0 kB view details)

Uploaded Source

Built Distribution

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

scri-2022.0.0.0-py3-none-any.whl (129.8 kB view details)

Uploaded Python 3

File details

Details for the file scri-2022.0.0.0.tar.gz.

File metadata

  • Download URL: scri-2022.0.0.0.tar.gz
  • Upload date:
  • Size: 118.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure

File hashes

Hashes for scri-2022.0.0.0.tar.gz
Algorithm Hash digest
SHA256 c8a365622c8d9d5d8fbdbde4f934e66ac49cac7c1e5368530d1f402f64a4e93d
MD5 2f1ac53ebd7aa18df7856504b01076b5
BLAKE2b-256 55087260435d3f5753f150367f5e37cd2a9804f973d1c3fcb88bb6991d36396c

See more details on using hashes here.

File details

Details for the file scri-2022.0.0.0-py3-none-any.whl.

File metadata

  • Download URL: scri-2022.0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 129.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure

File hashes

Hashes for scri-2022.0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 124f36eb57cfe7ca7cea41eb4c247dd94ef89569cf9044f300d373aa3ae99ef7
MD5 0f852ec234a2f3c76e28931446221cac
BLAKE2b-256 92c1a7d8e951d8b56ed8d48808037da69d0bc7f1a5538bdd462c24043b736cf9

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