Interface and plugin for using nessai in bilby
Project description
nessai-bilby
Interface and plugin for using nessai in bilby.
This plugin provides two samplers that can be used in bilby:
nessai: the standard nested sampler fromnessaiinessai: the importance nested sampler from nessai
It also provides a means to use bilby likelihoods and priors directly in
nessai, see using bilby likelihoods in nessai
Installation
The package can be installed using pip
pip install nessai-bilby
or conda
conda install conda-forge::nessai-bilby
However, we recommend following installing PyTorch manually to ensure the correct device support.
Note: this plugin requires "bilby>=2.3.0".
Usage
In bilby
One nessai-bilby is installed, both samplers can be used directly in bilby
via the run_sampler function. See the bilby documentation for more details
on how to run different samplers.
Using bilby likelihoods in nessai
nessai-bilby also provides two model classes that allow bilby likelihood and
priors to be used directly with nessai:
nessai_bilby.model.BilbyModel:nessai_bilby.model.BilbyModelLikelihoodConstraint:
Either model can be used by creating an instance of the model and running nessai as usual:
from nessai.flowsampler import FlowSampler
from nessai_bilby.model import BilbyModel
likelihood = ... # bilby likelihood object
priors = ... # bilby PriorDict
model = BilbyModel(
priors=priors,
likelihood=likelihood,
use_ratio=True # Whether to use the log-likelihood ratio
)
fs = FlowSampler(
model,
...,
)
fs.run()
Citing
If you use nessai-bilby, please cite the nessai and bilby code bases and the corresponding papers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nessai_bilby-0.3.0.tar.gz.
File metadata
- Download URL: nessai_bilby-0.3.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1021af9eae753dfe98809db6105a999351ff9900ddc8274cb41cb3cde414931c
|
|
| MD5 |
0f1cc18629447f014c0137583eca85ed
|
|
| BLAKE2b-256 |
1ae1b1d72252f5285768c4dac443a9eea9d28d6c6364f7070d2dcd55e52ed404
|
Provenance
The following attestation bundles were made for nessai_bilby-0.3.0.tar.gz:
Publisher:
publish.yml on bilby-dev/nessai-bilby
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nessai_bilby-0.3.0.tar.gz -
Subject digest:
1021af9eae753dfe98809db6105a999351ff9900ddc8274cb41cb3cde414931c - Sigstore transparency entry: 1417541780
- Sigstore integration time:
-
Permalink:
bilby-dev/nessai-bilby@55bee7344ce8baff86d410d92bd8b24b63ee8aa1 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/bilby-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55bee7344ce8baff86d410d92bd8b24b63ee8aa1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nessai_bilby-0.3.0-py3-none-any.whl.
File metadata
- Download URL: nessai_bilby-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8020effda4ed4dd495a3ccf042f7bb86ae6a872ecda0b5e2b2b09031f381be5
|
|
| MD5 |
60a93e174dd71a43f33f00c966151160
|
|
| BLAKE2b-256 |
d20041ec5073db25fcc2c9aebc502838b624b1523e82d58d5584ae49a3dbc7ca
|
Provenance
The following attestation bundles were made for nessai_bilby-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on bilby-dev/nessai-bilby
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nessai_bilby-0.3.0-py3-none-any.whl -
Subject digest:
e8020effda4ed4dd495a3ccf042f7bb86ae6a872ecda0b5e2b2b09031f381be5 - Sigstore transparency entry: 1417541783
- Sigstore integration time:
-
Permalink:
bilby-dev/nessai-bilby@55bee7344ce8baff86d410d92bd8b24b63ee8aa1 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/bilby-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55bee7344ce8baff86d410d92bd8b24b63ee8aa1 -
Trigger Event:
release
-
Statement type: