Skip to main content

A Bayesian procedure to delineate the boundary of an extended astronomical object

Project description

nuovoLIRA

What is it?

A method to implement the Bayesian model described here: https://nuovolira.tiiny.site/.

Installation

pip install --upgrade pip 
pip install nuovoLIRA 

Main Features

  • Algorithms that sample from the conditional distributions of the NuovoLIRA model

Source Code

The source code is currently hosted on GitHub at https://github.com/bmartin9/nuovolira-pypi.

Example Usage

To sample from the conditional distribution of $Z$ (equation (33) in https://nuovolira.tiiny.site/) using the Swendsen Wang algorithm do

from nuovoLIRA.models.deconvolver import * 
from numpy.random import default_rng

random_state = default_rng(seed=SEED) 
Z_init = np.random.choice([0, 1], size=(10,10), p=[1./3, 2./3])
data = np.random.randint(0,40,size=(10,10))

Z_sampler = Sample_Z(random_state=random_state,
                        initial_Z = Z_init,
                        beta = 2,
                        lam_b = 1,
                        lam_e = 20,
                        y = data
)

Z_new = Z_sampler.Z_update(Z_init) 

Project Organization

├── LICENSE
├── Makefile           <- Makefile with commands like `make data` or `make train`
├── README.md          <- The top-level README for developers using this project.
├── data
│   ├── external       <- Data from third party sources.
│   ├── interim        <- Intermediate data that has been transformed.
│   ├── processed      <- The final, canonical data sets for modeling.
│   └── raw            <- The original, immutable data dump.
│
├── docs               <- A default Sphinx project; see sphinx-doc.org for details
│
├── models             <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
│                         the creator's initials, and a short `-` delimited description, e.g.
│                         `1.0-jqp-initial-data-exploration`.
│
├── references         <- Data dictionaries, manuals, and all other explanatory materials.
│
├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.
│   └── figures        <- Generated graphics and figures to be used in reporting
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
│                         generated with `pip freeze > requirements.txt`
│
├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
├── src                <- Source code for use in this project.
│   ├── __init__.py    <- Makes src a Python module
│   │
│   ├── data           <- Scripts to download or generate data
│   │   └── make_dataset.py
│   │
│   ├── features       <- Scripts to turn raw data into features for modeling
│   │   └── build_features.py
│   │
│   ├── models         <- Scripts to train models and then use trained models to make
│   │   │                 predictions
│   │   ├── predict_model.py
│   │   └── train_model.py
│   │
│   └── visualization  <- Scripts to create exploratory and results oriented visualizations
│       └── visualize.py
│
└── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io

Project based on the cookiecutter data science project template. #cookiecutterdatascience

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

nuovoLIRA-0.4.0.tar.gz (13.3 kB view details)

Uploaded Source

File details

Details for the file nuovoLIRA-0.4.0.tar.gz.

File metadata

  • Download URL: nuovoLIRA-0.4.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for nuovoLIRA-0.4.0.tar.gz
Algorithm Hash digest
SHA256 29ffc1114eba71bc2aafc10b127335ee460d1a27301faf20b0c1afdafa04f36a
MD5 4facee53c8cd5f73d9d05d24b0cae10d
BLAKE2b-256 366f216af1fdeebed7ea724f7ab2973ca411752e23f38b516bb3916b364b6c29

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