Skip to main content

astro-mmdc

Python SDK for the MMDC astrophysics platform: multi-wavelength SED data, on-demand Swift UVOT/XRT analysis and blazar broadband emission modeling.

PyPI Python versions License Tests Docs DOI

The Markarian Multiwavelength Data Center (MMDC) gathers multi-wavelength, multi-epoch observations of blazars and other sources from dozens of catalogues and archives. It also models their broadband emission with SSC, EIC and hadronic models, and this SDK gives Python access to all of it.

Installation

pip install astro-mmdc

Or with uv:

uv pip install astro-mmdc

Requires Python 3.10+. Plotting needs the extra: pip install "astro-mmdc[plot]".

Quick start

from astro_mmdc import MMDC

client = MMDC()

# The SED of 3C 273: source info plus every point
sed = client.sed.get(ra=187.2779, dec=2.0524, name="3C 273")
print(sed.source.redshift, sed.points)
sed.to_csv("3c273.csv")

# A synchronous SSC model spectrum
result = client.modeling.infer(
    z=0.158, ebl=True, model_type="SSC",
    parameters={"log_B": -1.5, "log_electron_luminosity": 44.0,
                "log_gamma_cut": 5.0, "log_gamma_min": 2.0,
                "log_radius": 16.0, "lorentz_factor": 20.0,
                "spectral_index": 2.2},
)
print(result.nu, result.nuFnu)

The Getting started page has more examples, including a full SED-to-fit pipeline.

What you can do

  • SED data: the SED at any sky position, with filters, unit conversion, CSV export and plots. See the SED data guide.
  • Name lookup: resolve a source name to a position with client.catalogs.autocomplete("Mrk 421"). See Resolve a name to a position.
  • Observations and light curves: filtered queries and cone searches over the unified observations catalogue (Fermi, Swift, NuSTAR, ZTF, ASAS-SN, ...). See the observations guide.
  • Swift UVOT/XRT analysis: on-demand photometry and XRT spectral fits through the MADAM pipeline, with a coverage cache. See the Swift guide.
  • Blazar emission modeling: SSC, EIC and hadronic model fits and synchronous inference. See the modeling guide.
  • Async jobs: submit SED, modeling and Swift jobs, then poll them yourself. See Advanced.

Citing

If you use MMDC data, models or this SDK in your research, please cite the MMDC paper (Sahakyan et al. 2024, AJ, 168, 289; doi:10.3847/1538-3881/ad8231):

@article{Sahakyan_2024,
  title     = {Markarian Multiwavelength Data Center (MMDC): A Tool for Retrieving and Modeling Multitemporal, Multiwavelength, and Multimessenger Data from Blazar Observations},
  author    = {Sahakyan, N. and Vardanyan, V. and Giommi, P. and B{\'e}gu{\'e}, D. and Israyelyan, D. and Harutyunyan, G. and Manvelyan, M. and Khachatryan, M. and Dereli-B{\'e}gu{\'e}, H. and Gasparyan, S.},
  journal   = {The Astronomical Journal},
  publisher = {American Astronomical Society},
  volume    = {168},
  number    = {6},
  pages     = {289},
  year      = {2024},
  month     = nov,
  doi       = {10.3847/1538-3881/ad8231},
  eprint    = {2410.01207},
  archivePrefix = {arXiv}
}

Data retrieved through MMDC is licensed under CC BY 4.0 and requires attribution. The SDK itself is archived on Zenodo, doi:10.5281/zenodo.22999175 (all versions); its citation metadata is in CITATION.cff.

License

BSD-3-Clause, see LICENSE.

Metadata

Release files for astro-mmdc 0.2.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astro-mmdc 0.2.16
File Size Uploaded Provenance Actions
astro_mmdc-0.2.16.tar.gz 34.2 kB With provenance Details for astro_mmdc-0.2.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for astro-mmdc 0.2.16
File Interpreter ABI Platform Actions
astro_mmdc-0.2.16-py3-none-any.whl Python 3 none any Details for astro_mmdc-0.2.16-py3-none-any.whl

Total release size: 75.6 kB

Release files / astro_mmdc-0.2.16.tar.gz

Download URL astro_mmdc-0.2.16.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ec2e78bacfcad52952ccc0f36e0c35e73f53179cadc5ed37fc29cba0023b3f27
BLAKE2b-256 checksum
How to use checksums
e65b389102cf47f6439fc50216638981195b72ca42355f88607cf3ae8b7e97b4
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 11, 2026.

Transparency log

Release files / astro_mmdc-0.2.16-py3-none-any.whl

Download URL astro_mmdc-0.2.16-py3-none-any.whl
Size 41.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5934a4df6ecf58046b20acde1c821171f47614f3ce60a9a2766e94539f69098
BLAKE2b-256 checksum
How to use checksums
4540a1b9972b23c6dda12c4d700ce60a10c21de2ab6fa5eb6cf7fa5bb332778a
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 11, 2026.

Transparency log

Security for astro-mmdc 0.2.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for astro_mmdc-0.2.16.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 11, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page