Skip to main content

A reference implementation of box least squares in Python

Project description

An efficient reference implementation of the box least squares algorithm for transiting exoplanet search in Python. This will eventually be submitted as a pull request to the core AstroPy package, but we’re making it available here for now to make it easy to use right away.

Prerequisites

To install and run this package, you will need to have NumPy, Cython, and AstroPy installed. The recommended installation method is:

conda install numpy cython astropy

Installation

To install, clone this repository and build the extension as follows:

git clone https://github.com/dfm/bls.py.git
cd bls.py
python setup.py install

or, install using pip:

pip install bls.py

OpenMP support: This algorithm can optionally be parallelized using OpenMP. To enable this feature, you must compile with a compiler that supports OpenMP and the relevant flags. On macOS, this can be achieved by installing a recent llvm:

brew install llvm

and then building using the following flags:

CC=/usr/local/opt/llvm/bin/clang \
 LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -liomp5" \
 CFLAGS="-I/usr/local/opt/llvm/include -fopenmp" \
 python setup.py install

On other platforms, a command like the following might be sufficient:

CFLAGS="-lgomp -fopenmp" python setup.py install

Usage

See tutorial.ipynb for a demonstration of how to use the code.

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

bls.py-0.1.1.tar.gz (56.7 kB view details)

Uploaded Source

File details

Details for the file bls.py-0.1.1.tar.gz.

File metadata

  • Download URL: bls.py-0.1.1.tar.gz
  • Upload date:
  • Size: 56.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bls.py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4055154edaefa3b4794ec626a31f684e14621294a5735d4ff0b2bad61f5dadd5
MD5 bbbd9fc651beb8e437a27c9ceb86bba6
BLAKE2b-256 aabcc751125fee7bf389f74d0c01ff48280b0366c5743c7a969267ba25895642

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