Registry / serialization / asdf-coordinates-schemas

asdf-coordinates-schemas

JSON →
library0.5.1pypypiunverified

ASDF Coordinates Schemas (asdf-coordinates-schemas) provides ASDF schemas specifically for validating astronomical coordinate tags, primarily those defined by `astropy.coordinates`. This package is typically consumed as a dependency by higher-level integration packages like `asdf-astropy` rather than being installed directly by end-users. It is part of the broader ASDF ecosystem, is actively maintained, and is currently at version 0.5.1.

pip install asdf-coordinates-schemas
INSTALL
IMPORT
SIG · ASDF-COORDINATES-S
A
asdf-coordinates-schemas
serializationpythonv0.5.1
Install
4.6s avg
Import
Disk
103MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 102.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.6s · import 0.000s · 99MB
103MB installed
● package 103MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Not applicable for direct import
This library primarily provides schema definitions for the ASDF ecosystem. It is not typically imported directly into Python code for use of its classes or functions. Its schemas are automatically registered and used by the `asdf` library when `asdf-astropy` is installed.
import asdf_coordinates_schemas
While importing the package is syntactically correct, it offers no direct user-facing API. The value lies in its registered schemas.

This quickstart demonstrates how `asdf-coordinates-schemas` works implicitly. By installing `asdf-astropy` (which depends on `asdf-coordinates-schemas`), `astropy.coordinates` objects like `SkyCoord` can be seamlessly serialized into and deserialized from ASDF files. The schemas provided by this library ensure the correct validation and structure of the coordinate data within the ASDF file.

import asdf import astropy.units as u from astropy.coordinates import SkyCoord, ICRS # This example relies on asdf-astropy being installed to register the schemas and converters. # If you run this without asdf-astropy, it will likely fail to serialize SkyCoord. # Create an Astropy SkyCoord object coord = SkyCoord(ra=10.68458 * u.deg, dec=41.26917 * u.deg, frame=ICRS()) # Create an ASDF tree with the coordinate object tree = {'my_coordinate': coord} # Save the ASDF tree to a file # This will use the schemas provided by asdf-coordinates-schemas (via asdf-astropy) with asdf.AsdfFile(tree) as af: af.write('my_coordinates.asdf') print("ASDF file 'my_coordinates.asdf' created successfully.") # Read the ASDF file back with asdf.open('my_coordinates.asdf') as af_read: read_coord = af_read['my_coordinate'] print(f"Read coordinate: {read_coord}") print(f"Type: {type(read_coord)}")
Debug
Known issues
gotchaUsers should generally install `asdf-astropy` instead of `asdf-coordinates-schemas` directly. `asdf-coordinates-schemas` only provides the schema definitions, while `asdf-astropy` provides the necessary Python converters and automatically registers these schemas with the `asdf` library for practical usage.
fix
Ensure `asdf-astropy` is installed: `pip install asdf-astropy`. This will automatically install `asdf-coordinates-schemas` as a dependency.
affects: All versions
breakingMajor version changes in ASDF tags (e.g., `skycoord-1.0.0` vs. `skycoord-2.0.0`) signify breaking changes in the schema definition. If you are working with ASDF files created with older versions of `astropy.coordinates` or the ASDF standard, ensure your `asdf` and `asdf-astropy` installations are compatible with the schema versions used in those files.
fix
When creating ASDF files, be mindful of the ASDF standard version used. When reading, `asdf` is generally backwards compatible, but ensure your `asdf-astropy` package supports the specific schema version of the coordinates tag in the file. Consult `asdf-astropy` and `asdf` change logs for specific migration details.
affects: All versions, especially across ASDF standard version bumps
deprecatedThe core `asdf` library, which is fundamental to using `asdf-coordinates-schemas` indirectly, has deprecated `AsdfFile.open` in favor of `asdf.open` (as of ASDF 2.2). While not directly part of `asdf-coordinates-schemas`, users interacting with ASDF files should use the modern `asdf.open` approach.
fix
Replace `AsdfFile.open()` calls with `asdf.open()` for reading ASDF files. For example, `with asdf.open('file.asdf') as af:`.
affects: ASDF library versions < 3.0 (deprecated in 2.2, removal planned in 3.0)
Upgrade
Version history
0.5.1latest on PyPI · released Feb 5, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
asdfrequiredCore ASDF library, essential for schema interpretation and file I/O.
asdf-astropyrequiredThis package is the primary consumer of `asdf-coordinates-schemas` and provides the necessary converters to serialize/deserialize `astropy.coordinates` objects. Users are typically advised to install `asdf-astropy` instead of `asdf-coordinates-schemas` directly.
astropyrequiredProvides the `astropy.coordinates` objects that these schemas define and validate.
Agent activity
20 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
asdf-coordinates-schemas — pip install asdf-coordinates-schemas · libregistry