Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

astribidem

Astronomical catalogue matching by sky position or shared identifiers. Results are Arrow tables of matched row positions, which you can map to your own catalogue IDs.

Match coordinate arrays

Pass each catalogue as a pair of (ra, dec) arrays in degrees, in the same celestial frame and epoch.

from astribidem import DegenerateCrossmatchConfig, crossmatch, rows_to_ids

sources = {
    "a": ([10.0, 20.0], [0.0, 0.0]),
    "b": ([10.0001, 30.0], [0.0, 0.0]),
}

# Match pairs that are each other's nearest neighbours within one arcsecond.
rows = crossmatch(
    sources,
    radius_arcsec=1.0,
    dedupe_radius_arcsec=0.0,  # Disable within-catalogue deduplication.
    mode=DegenerateCrossmatchConfig(surveys=["a", "b"], policy="mutual_nearest"),
)

# Contents of `rows`: the matched input row positions and their separation.
# Separations are rounded here for display.
# a/row_index | b/row_index | a__b/separation_arcsec
#           0 |           0 |                   0.36

# Replace row positions with your own IDs, supplied in the original row order.
index = rows_to_ids(rows, {"a": [101, 102], "b": [201, 202]})

# Contents of `index`: the same match, now labelled with catalogue IDs.
# a/id | b/id | a__b/separation_arcsec
#  101 |  201 |                   0.36

See the matching guide for other policies, multiple catalogues and per-catalogue radius settings.

Match shared identifiers

When catalogues share an identifier system, match their unique IDs directly:

from astribidem import match_uids

uids = {
    "images": ["object-B", "object-A"],
    "spectra": ["object-A", "object-C"],
}
matches = match_uids(uids, join="outer")  # Keep every identifier from either catalogue.

# Contents of `matches`: input row positions; null means no match in that catalogue.
# entity_id | images/row_index | spectra/row_index
#         0 |                0 |              null
#         1 |                1 |                 0
#         2 |             null |                 1

Use join="inner" to keep only shared identifiers. See UID matching for join options and mapping the results to IDs.

Save an index

Results are ordinary Arrow tables, so they can be saved as Parquet:

import pyarrow.parquet as pq

pq.write_table(index, "index.parquet")
index = pq.read_table("index.parquet")

See the documentation for mixed UID/coordinate matching, larger-than-memory workflows, API details and development instructions.

Metadata

Release files for astribidem 0.0.0a0

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

Source distribution (sdist)

Source distribution for astribidem 0.0.0a0
File Size Uploaded
astribidem-0.0.0a0.tar.gz 597.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for astribidem 0.0.0a0
File Interpreter ABI Platform
astribidem-0.0.0a0-py3-none-any.whl Python 3 none any Details

Total release size: 658.4 kB

Release files / astribidem-0.0.0a0.tar.gz

Download URL astribidem-0.0.0a0.tar.gz
Size 597.7 kB
Tags Source
SHA-256 checksum
How to use checksums
247c7e2818744099050973603433a13c739b4f170431ff3c007287cb75363c3b
BLAKE2b-256 checksum
How to use checksums
e5f8ed204ca84b9a24e4108ccf85a8309a8368393b3fad68a082e99d1f4fe5fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 28, 2026.

Transparency log

Release files / astribidem-0.0.0a0-py3-none-any.whl

Download URL astribidem-0.0.0a0-py3-none-any.whl
Size 60.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9913defaad60dd6d753781cad190a322ff22d98a74d8cd437793f7fccabb1e62
BLAKE2b-256 checksum
How to use checksums
ba9bb1e8606470adec4361c3f65080109c7db32fb7e827b559debcb3066ae149
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.0a0 This release

2 release files

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