Skip to main content

Python f2py extension wrapping eebls.f by Kovacs et al. 2002.

Project description

This is a module that wraps Geza Kovacs’ eebls.f. Taken from Daniel Foreman-Mackey’s python-bls module, and broken out for easier use by other packages. This is used by the astrobase module.

eebls.f

python-bls

pyeebls

Installation

This package is available from PyPI: https://pypi.python.org/pypi/pyeebls

You’ll need numpy installed, along with a Fortran compiler:

(venv)$ pip install numpy # in a virtualenv
# or use dnf/yum/apt install numpy to install systemwide

## you'll need a Fortran compiler to install pyeebls!         ##
## on Linux: dnf/yum/apt install gcc gcc-gfortran             ##
## on OSX (using homebrew): brew install gcc && brew link gcc ##

Then, install pyeebls using pip (preferably in a virtualenv or use the –user flag):

(venv)$ pip install pyeebls

Or download the tarball from PyPI, extract the files, and run setup.py:

(venv)$ python setup.py install

Documentation

There’s only one function to use in this module.

def pyeebls.eebls(times, mags, workarr_u, workarr_v,
                  nfreq, freqmin, stepsize,
                  nbins, minduration, maxduration):

Calculates the BLS spectrum for the input times and mags arrays.

Parameters

times : ndarray
A numpy array containing the times of the measurements.
mags : ndarray
A numpy array containing the mags or fluxes to use as measurements.
workarr_u, workarr_v : ndarray
Numpy arrays that must be the same size as times, used as temp workspaces by the Fortran function.
nfreq : int
The number of frequencies to search for the best period.
freqmin : float
The minimum frequency to use.
stepsize : float
The stepsize in frequency units to use while searching.
nbins : int
The number of bins to use when phasing up the light curve at a single test period.
minduration : float
The minimum transit duration in phase units to consider when testing for a transit.
maxduration : float
The minimum transit duration in phase units to consider when testing for a transit.

Returns

A sequence of results:

(power, bestperiod, bestpower, transdepth,
 transduration, transingressbin, transegressbin)
power : ndarray
A numpy array containing the values of the BLS spectrum at each tested frequency.
bestperiod : float
The period at the highest peak in the frequency spectrum.
bestpower : float
The power at the highest peak in the frequency spectrum.
transdepth : float
The depth of the transit at the best period.
transduration : float
The length of the transit as a fraction of the phase. This is the so-called ‘q’ parameter.
transingressbin : int
The phase bin index for the start of the transit.
transegressbin : int
The phase bin index for the end of the transit.

See Also

  • the comments at the top of eebls.f in this package
  • the kbls module in astrobase for a high-level serial and parallelized interface to this module

License

The license for the Python files is the MIT License. eebls.f is provided by G. Kovacs; it appears to be re-distributable, but please make sure to cite Kovacs, et al. 2002 if you use this implementation.

Project details


Release history Release notifications

This version
History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pyeebls-0.1.6-cp27-cp27m-macosx_10_12_intel.whl (620.5 kB) Copy SHA256 hash SHA256 Wheel cp27 Jan 5, 2018
pyeebls-0.1.6-cp27-cp27m-manylinux1_x86_64.whl (347.4 kB) Copy SHA256 hash SHA256 Wheel cp27 Dec 21, 2017
pyeebls-0.1.6-cp27-cp27mu-manylinux1_x86_64.whl (347.4 kB) Copy SHA256 hash SHA256 Wheel cp27 Dec 21, 2017
pyeebls-0.1.6-cp27-cp27m-win_amd64.whl (207.5 kB) Copy SHA256 hash SHA256 Wheel cp27 Dec 25, 2017
pyeebls-0.1.6-cp34-cp34m-manylinux1_x86_64.whl (348.6 kB) Copy SHA256 hash SHA256 Wheel cp34 Dec 21, 2017
pyeebls-0.1.6-cp35-cp35m-manylinux1_x86_64.whl (349.6 kB) Copy SHA256 hash SHA256 Wheel cp35 Dec 21, 2017
pyeebls-0.1.6-cp36-cp36m-macosx_10_12_x86_64.whl (622.8 kB) Copy SHA256 hash SHA256 Wheel cp36 Jan 5, 2018
pyeebls-0.1.6-cp36-cp36m-manylinux1_x86_64.whl (349.0 kB) Copy SHA256 hash SHA256 Wheel cp36 Dec 21, 2017
pyeebls-0.1.6-cp36-cp36m-win_amd64.whl (208.8 kB) Copy SHA256 hash SHA256 Wheel cp36 Dec 25, 2017
pyeebls-0.1.6.tar.gz (6.2 kB) Copy SHA256 hash SHA256 Source None Jul 13, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page