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.





This package is available from PyPI:

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

(venv)$ python install


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.



A numpy array containing the times of the measurements.


A numpy array containing the mags or fluxes to use as measurements.

workarr_u, workarr_vndarray

Numpy arrays that must be the same size as times, used as temp workspaces by the Fortran function.


The number of frequencies to search for the best period.


The minimum frequency to use.


The stepsize in frequency units to use while searching.


The number of bins to use when phasing up the light curve at a single test period.


The minimum transit duration in phase units to consider when testing for a transit.


The minimum transit duration in phase units to consider when testing for a transit.


A sequence of results:

(power, bestperiod, bestpower, transdepth,
 transduration, transingressbin, transegressbin)

A numpy array containing the values of the BLS spectrum at each tested frequency.


The period at the highest peak in the frequency spectrum.


The power at the highest peak in the frequency spectrum.


The depth of the transit at the best period.


The length of the transit as a fraction of the phase. This is the so-called ‘q’ parameter.


The phase bin index for the start of the transit.


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


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

Download files

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

Source Distribution

pyeebls-0.1.6.tar.gz (6.2 kB view hashes)

Uploaded source

Built Distributions

pyeebls-0.1.6-cp36-cp36m-win_amd64.whl (208.8 kB view hashes)

Uploaded cp36

pyeebls-0.1.6-cp27-cp27m-win_amd64.whl (207.5 kB view hashes)

Uploaded cp27

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page