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
The AVM meta-data can be accessed using the attribute notation:
>>> avm.Spatial.Equinox 'J2000'>>> avm.Publisher 'Chandra X-ray Observatory'
Creating an AVM object from scratch
To create an empty AVM meta-data holder, simply call AVM() without any arguments:
>>> avm = AVM()
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, PNG, and TIFF files are supported.
Metadata
Release files for PyAVM 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyAVM-0.1.2.zip | 12.3 kB | Without provenance | Details for PyAVM-0.1.2.zip | |
| PyAVM-0.1.2.tar.gz | 7.9 kB | Without provenance | Details for PyAVM-0.1.2.tar.gz |
Release files / PyAVM-0.1.2.zip
| Download URL | PyAVM-0.1.2.zip |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a852f77e44b2b3b0ad47493e9cfde6d2c5ff63bf4ab982809174bb8dd4316cf
|
|
BLAKE2b-256 checksum How to use checksums |
cf546394a36cf20b5ef04fb380c1b0a1aac58410c349c65b11d72f4f8eb5afa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyAVM-0.1.2.tar.gz
| Download URL | PyAVM-0.1.2.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85ae7bb5e45b684b9e1c65ba76209bf691b414b2200ef139088c5a8b44fd6a73
|
|
BLAKE2b-256 checksum How to use checksums |
4eba2a99f5bca8189279f2fa5eb310efee1dc2c803475abfee22a228a8fe431b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for PyAVM 0.1.2
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.