Skip to main content

Data generator for hierarchically modeling strongly-lensed systems with Bayesian neural networks

Project description

baobab

Build Status Documentation Status

Training data generator for hierarchically modeling strong lenses with Bayesian neural networks

Installation

  1. You'll need a Fortran compiler, which you can get on a debian system by running
sudo apt-get install gfortran
  1. Virtual environments are strongly recommended, to prevent dependencies with conflicting versions. Create a conda virtual environment and activate it.
conda create -n baobab python=3.6 -y
conda activate baobab
  1. Now do one of the following.

Option 2(a): clone the repo (please do this if you'd like to contribute to the development).

git clone https://github.com/jiwoncpark/baobab.git
cd baobab
pip install -e .

Option 2(b): pip install the release version (only recommended if you're a user).

pip install baobab
  1. (Optional) To run the notebooks, add the Jupyter kernel.
python -m ipykernel install --user --name baobab --display-name "Python (baobab)"

Usage

  1. Choose your favorite config file among the templates in the configs directory and copy it to a directory of your choice, e.g.
mkdir my_config_collection
cp baobab/configs/tdlmc_diagonal_config.py my_config_collection/my_config.py
  1. Customize it! You might want to change the name field first with something recognizable. Pay special attention to the components field, which determines which components of the lensed system (e.g. lens light, AGN light) become sampled from relevant priors and rendered in the image.

  2. Generate the training set, e.g. continuing with the example in #1,

generate my_config_collection/my_config.py

Although the n_data (size of training set) value is specified in the config file, you may choose to override it in the command line, as in

generate my_config_collection/my_config.py 100

Please message @jiwoncpark with any questions.

There is an ongoing document that details our BNN prior choice, written and maintained by Ji Won.

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

pybaobab-0.1.0.tar.gz (529.5 kB view details)

Uploaded Source

Built Distributions

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

pybaobab-0.1.0-py3-none-any.whl (534.8 kB view details)

Uploaded Python 3

pybaobab-0.1.0-py2.py3-none-any.whl (630.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pybaobab-0.1.0.tar.gz.

File metadata

  • Download URL: pybaobab-0.1.0.tar.gz
  • Upload date:
  • Size: 529.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

File hashes

Hashes for pybaobab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5c2c8516e819eb99c288236fbfecf2c6f47ae2ef6de92fa0d9f4e4dd0e03923
MD5 8f8753ddd0d36b5583152c10562d89ab
BLAKE2b-256 cfe04bf3b4e35fd50513abf69ff67953be7a642358af00d9f489129ab9b87b6e

See more details on using hashes here.

File details

Details for the file pybaobab-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pybaobab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 534.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

File hashes

Hashes for pybaobab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8348c32503193401e030fd3c5b4d0038c21a8913d2679f2d30d7aebdd62b98f3
MD5 61bdfb2843fedcdf6bacafbac0e3b551
BLAKE2b-256 a674b794194273797e521484293ea6914ac987c1be4e441406c96394b3b397d9

See more details on using hashes here.

File details

Details for the file pybaobab-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pybaobab-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 630.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.10

File hashes

Hashes for pybaobab-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f288b63ce2ed6997126cbf76febf83ab512d8c73ed60dc103c5ef9251dce8c7a
MD5 43d0f40568ae0ea84ab1ba50ea6be32f
BLAKE2b-256 a26b6555db306eb6e75318467480b68aede5e0231d9cb3ca949a0308b177f87a

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