pyavm is a pure-Python library for reading and writing AVM (Astronomical Visualization Metadata) information to/from FITS and JPEG files. It leverages Astropy for FITS handling and Pillow for JPEG. The current version is 0.9.9, and it's actively maintained as part of the Astropy ecosystem, with regular but pre-1.0.0 releases.
pip install pyavmVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create an AVM object, populate it with metadata, embed this metadata into an existing JPEG image, and then read the AVM data back from the modified image. It uses Pillow to create a dummy image as a prerequisite.
Ensure the image file (JPEG or FITS) exists at the specified path before calling `AVM.from_image()` or `AVM.add_spatial_to_image()`.
Always consult the changelog in the official documentation or GitHub repository for each new release to identify any API adjustments or breaking changes.
It is recommended to install `pyavm` with its optional dependencies using `pip install pyavm[astropy,pil]` to ensure all necessary components are present.
Install `astropy` using `pip install astropy` or, preferably, `pip install pyavm[astropy,pil]` to include all core dependencies.
Verify that the image file is present at the specified path before attempting to read or write AVM metadata.
Ensure `pyavm` is installed and up-to-date with `pip install --upgrade pyavm`. The correct import is `from pyavm import AVM`.