Skip to main content

Python module for handling angles and celestial coordinates

Project description

https://github.com/LSSTDESC/Coord/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/LSSTDESC/Coord/branch/main/graph/badge.svg

Coord is a Python module that provides basic functionality related to angles and celestial coordinates.

It is similar in functionality to the astropy.coordinates module, but with more of an emphasis on efficiency. Some functions are more than 100 times faster than the corresponding functionality in astropy. On the other hand, the API is somewhat more restrictive than the API used by astropy, so the appropriate module to use will depend on your needs.

Notable functionality:

  • Spherical geometric calculations of the distance between two points, angles in spherical triangles, and areas of spherical triangles.

  • Tangent-plane projection of a coordinate relative to a given center point of the projection.

  • Deprojection back into spherical coordinates.

  • Analytic calculation of the jacobian of the tangent projection.

  • Precession calculations between different epochs.

  • Conversion to galactic and ecliptic coordinate systems (and back).

The code was originally written by Mike Jarvis for TreeCorr and then also used in GalSim. It has been republished here as a stand-alone module to enable others (within the LSST DESC or not) to have easier access to these functions.

One missing feature (for which pull requests would be welcome) is conversion between FK5 and ICRS systems (or even FK4). If you care about the slight differences between these systems, then you should probably stick to astropy, which does handle these distinctions.

Aside: The module was used as a pedagogical tool at the LSST DESC DE School on July 9, 2017. A video of the lesson can be viewed here.

Licence

The code is licensed under the MIT License, which basically means you can use it in any way you want, so long as you keep the copyright notice at the top of each source file and/or include the accompanying LICENSE file with the distribution.

Installation

You can install Coord with pip:

$ pip install LSSTDESC.Coord --user

or if you have root access, you might prefer:

$ sudo pip install LSSTDESC.Coord

or possibly with neither sudo nor --user if your Python distro is in a writable directory.

If you use anaconda you can install from conda forge:

$ conda install -c conda-forge lsstdesc.coord

If you prefer to download or clone the repo and install manually, you can install with setup.py using one of the usual variants:

$ python setup.py install --prefix={prefix}

or:

$ sudo python setup.py install

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

LSSTDESC.Coord-1.3.0.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

LSSTDESC.Coord-1.3.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file LSSTDESC.Coord-1.3.0.tar.gz.

File metadata

  • Download URL: LSSTDESC.Coord-1.3.0.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for LSSTDESC.Coord-1.3.0.tar.gz
Algorithm Hash digest
SHA256 50da8ff1e19472dec63ec92e8d8b3fb8bec984894c0f1ac82aa16b2051df66be
MD5 f0434cede3fe21c2a0d76328da080fd6
BLAKE2b-256 a94c64f152ca8326c715436ece7734293f899dd6c7a5cf1a7361554ff8eefeb9

See more details on using hashes here.

File details

Details for the file LSSTDESC.Coord-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for LSSTDESC.Coord-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c19933fc5599cd5e0d4384da145c8fa5eb07d4c74fda06937e403a28533e3b0b
MD5 bd5eddda7cc06b4f76be8e7c48b9516e
BLAKE2b-256 ba91ccd7ab056e64b093aca88f814e9ad39c97c0bb59884c8ab89c73a2616ede

See more details on using hashes here.

Supported by

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