This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.0.3 instead.
Gammapy Plugin
threeML plugin to use gammapy datasets in your threeML analysis.
Docs
You can find the docs containg also example notebooks either on readthedocs or on the github pages.
Installation
The following should be sufficient and install all the relevant dependencies.
pip install gammapy-plugin
You can test the installation using pytest. To get all the dependencies it is
recommeneded to run
# install test dependenices
pip install gammapy-plugin[tests]
# equivalent to gammapy download datasets
export GAMMAPY_DATA=/path/to/gammapy_datasets/
git clone https://github.com/gammapy/gammapy-data.git $GAMMAPY_DATA
# run pytests
python -m pytest -n auto --dist worksteal gammapy_plugin
The first part is equivalent to running gammapy download datasets (see the gammapy installation
instructions).
These data are required by the pytest tests.
Requirements
Python 3.12 or 3.13 together with gammapy>=v2.0.0
Usage and Examples
The basic procedure after creating a gammapy dataset is
gl = GammapyLike(name="name_of_the_plugin") # initializing the plugin
gl.set_datasets(datasets, mode="individual") # adding the gammapy dataset
gl.set_sources("name_of_the_source") # setting the source
gl.set_model(model) # setting the astromodels model
When using MapDataset with FoVBackgroundModel you can also include them in a fit.
The parameters of the background models are currently treated as nuisance parameters during the fitting/sampling.
This might then look like this for example:
datasets = Datasets()
gls = []
for o in observations:
dataset = MapDataset.create(
geom=geom, energy_axis_true=energy_axis_true, name=f"HESS_{o.obs_id}"
)
dataset = maker.run(dataset, o)
dataset = safe_mask_maker.run(dataset, o)
bkg_model = FoVBackgroundModel(name=f"{o.obs_id}_bkg", dataset_name=dataset.name)
dataset.models = [bkg_model]
dataset = fov_bkg_maker.run(dataset)
datasets.append(dataset)
gl = GammapyLike(dataset.name, frame="galactic")
gl.set_datasets(dataset)
gl.set_background_models(bkg_model)
gls.append(gl)
Notes
This current version is based on previous work by J. Michael Burgess, Sajan Kumar and AnjanaTel.
Metadata
Release files for gammapy-plugin 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gammapy_plugin-0.0.1.tar.gz | 52.2 kB | With provenance | Details for gammapy_plugin-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gammapy_plugin-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for gammapy_plugin-0.0.1-py3-none-any.whl |
Total release size: 94.5 kB
Release files / gammapy_plugin-0.0.1.tar.gz
| Download URL | gammapy_plugin-0.0.1.tar.gz |
|---|---|
| Size | 52.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ae490a4275126f3299c52bb4027cdf103cdfd95d7cdd04309404f2ff975777e
|
|
BLAKE2b-256 checksum How to use checksums |
d0bafb68389fbd4c48f0d20ea119065fbf9b634581d73c9278a78077c7958779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / gammapy_plugin-0.0.1-py3-none-any.whl
| Download URL | gammapy_plugin-0.0.1-py3-none-any.whl |
|---|---|
| Size | 42.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
448476fef12d1894f7ccdb94328b8dc1ab89b8e35a54a54a8ee8be34ddb4fc19
|
|
BLAKE2b-256 checksum How to use checksums |
1c20c046a0f8065f835e192ca4b5ff590ad428e4ce2d77230957e1208263a25c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for gammapy-plugin 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gammapy_plugin-0.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.