Skip to main content

BAGLE (Bayesian Analysis of Gravitational Lensing Events) is a package to model and fit microlensing events.

Project description

BAGLE: Bayesian Analysis of Gravitational Lensing Events

BAGLE allows modeling of gravitational microlensing events both photometrically and astrometrically. Supported microlensing models include:

  • PSPL: point-source, point-lens with (and without) parallax
  • BSPL: binary-point-source, point-lens
  • PSBL: point-source, binary-point-lens
  • FSPL: finite-source, point-lens (minimal support... not well tested yet)

All models support fitting data with single or multi-band photometry only, astrometry only, or joint fitting of photometry and astrometry (recommended).

Documentation

The documentation to the BAGLE code can be found here

Installation Instructions

Install required modules:

Before you can use BAGLE, you will need to install the following modules:

pip install numpy
pip install astropy
pip install matplotlib 
pip install celerite 
pip install ephem
pip install pymultinest
pip install Pyerfa
pip install pytest 
pip install joblib

Install BAGLE from pip or conda (users) or GitHub (developers)

Preferred (on conda-forge):

conda install BAGLE

or

pip install BAGLE

or

git clone https://github.com/ninjab3381/BAGLE_Microlensing.git

Test your install by opening python and running:

import bagle

Tutorial

A Jupyter Notebook tutorial to see some examples of how to use the code can be found here

Developers

After installation of BAGLE source, navigate to the BAGLE_Microlensing folder:

cd BAGLE_Microlensing/      

Then run the tests using the following commands in the BAGLE_Microlensing folder:

python3 -m pytest tests

or you can run the testing scripts individually:

python3 -m pytest tests/test_model.py
python3 -m pytest tests/test_model_fitter.py
python3 -m pytest tests/testingmodels.py

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

bagle-1.0.1rc1.tar.gz (332.5 kB view details)

Uploaded Source

Built Distribution

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

bagle-1.0.1rc1-py3-none-any.whl (280.9 kB view details)

Uploaded Python 3

File details

Details for the file bagle-1.0.1rc1.tar.gz.

File metadata

  • Download URL: bagle-1.0.1rc1.tar.gz
  • Upload date:
  • Size: 332.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for bagle-1.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 3fcc970797bff22cd0ca450e7725bd93d20a198ee9bd090d32ab39628dbd5f5d
MD5 98d0982faf889ed272f4f1bc4ca74f65
BLAKE2b-256 273818fd662f079cd6cc669c2089c28bb3144c17e7c4e96d5cc7bb5255a60a33

See more details on using hashes here.

File details

Details for the file bagle-1.0.1rc1-py3-none-any.whl.

File metadata

  • Download URL: bagle-1.0.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 280.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for bagle-1.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f81e502bef0523b229bf94d814866f65b3d39b3d0b8b2446d212d8b223a54dc
MD5 77940018165a1503322283b9d02e166f
BLAKE2b-256 f9ba1d8f10ccc367c4ea74bdd0671b84b8c919757737177c34d47b6306913b85

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