Skip to main content

About

PyAVM provides the AVM() class to represent [AVM](http://www.virtualastronomy.org/avm_metadata.php) meta-data:

>>> from pyavm import AVM

Parsing files

To parse AVM meta-data from an existing file, simply create an instance of the AVM class using the filename of the image (or any file-like object):

>>> avm = AVM('myexample.jpg')

Accessing the meta-data

You can view the contents of the avm object by using

>>> print avm

or

>>> avm

The AVM meta-data can be accessed using the attribute notation:

>>> avm.Spatial.Equinox
'J2000'
>>> avm.Publisher
'Chandra X-ray Observatory'

Converting to a WCS object

It is possible to create a pywcs.WCS object from the AVM meta-data:

>>> wcs = avm.to_wcs()

By default, Spatial.FITSheader will be used if available, but if not, the WCS information is extracted from the other Spatial.* tags. To force PyAVM to not try Spatial.FITSheader, use:

>>> wcs = avm.to_wcs(use_full_header=False)

Initializing from a FITS header

To create an AVM meta-data object from a FITS header, simply pass the header (as a pyfits.Header instance) instead of a filename when initializing the AVM object:

>>> import pyfits
>>> header = pyfits.getheader('image.fits')
>>> avm = AVM(header)

By default, the AVM tag Spatial.FITSheader will be created, containing the full header (in addition to the other Spatial.* keywords). This can be disabled with:

>>> avm = AVM(header, include_full_header=False)

Initializing from a WCS object

Similarly, it is possible to create an AVM meta-data object from a pywcs.WCS instance:

>>> import pyfits
>>> import pywcs
>>> from pyavm import AVM
>>> wcs = pywcs.WCS(pyfits.getheader('image.fits'))
>>> avm = AVM(wcs)

Tagging images with AVM meta-data

It is possible to embed AVM meta-data into an image file:

>>> avm.embed('original_image.jpg', 'tagged_image.jpg')

At this time, only JPG and PNG files are supported for embedding.

Metadata

Release files for PyAVM 0.1.1

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

Source distributions (sdists)

Source distribution for PyAVM 0.1.1
File Size Uploaded Provenance Actions
PyAVM-0.1.1.zip 11.7 kB Without provenance Details for PyAVM-0.1.1.zip
PyAVM-0.1.1.tar.gz 7.4 kB Without provenance Details for PyAVM-0.1.1.tar.gz

Release files / PyAVM-0.1.1.zip

Download URL PyAVM-0.1.1.zip
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c81ce8b808a2960235765e7a7d67f3c6617123fe75d0a3430990d48741d7bf1f
BLAKE2b-256 checksum
How to use checksums
4cdcba96d0c546d176b36bd0ce7ade6879f93ff5f60efc37e40ba14e0f0d018d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / PyAVM-0.1.1.tar.gz

Download URL PyAVM-0.1.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c2fe1764da24752e99d55d792c4685d78c301f7410878124a9372ec7c2e95a32
BLAKE2b-256 checksum
How to use checksums
2bfa1f3b9f2b8fcdf0633c0c665972977851f096e37564c5cc80f4cb2ea14f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyAVM 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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