Skip to main content

arandu

arandu is a compact Python interface to the Arandu broker data served by ADSS. It returns query results as pandas DataFrames and keeps raw SQL available when needed.

Install

pip install -e '.[cutouts]'

Quick start

from arandu import AranduClient

client = AranduClient()
objects = client.objects(limit=100)
sources = client.sources(dia_object_id=12345)

AranduClient() prompts for credentials. Alternatively, set ARANDU_USERNAME and ARANDU_PASSWORD and use AranduClient.from_env(). The optional ARANDU_ADSS_BASE_URL defaults to https://ai-scope.cbpf.br.

from arandu import download_cutout

image = download_cutout(alert, "science")

Cutouts require the cutouts extra. alert may contain a published URL at payload.cutouts; otherwise the standard broker cutout URL is used.

Download selections

All spatial coordinates and radii are in degrees. Date selections use the Roman source table's midpoint_mjd_tai (MJD TAI).

# One DataFrame.
sources = client.download("arandu.dia_source", limit=100_000)

# For a large result, split the indexed MJD range into daily requests.
# Each interval is [start, end), so no rows are duplicated.
for batch in client.sources_by_date_batches(60000, 60010, interval_days=1):
    print(len(batch))

cone = client.cone_search(
    "arandu.dia_object", ra=277.48425, dec=13.5576, radius_deg=5 / 60
)

polygon = client.polygon_search(
    "arandu.dia_object",
    [(277.4, 13.5), (277.6, 13.5), (277.6, 13.7), (277.4, 13.7)],
)

sources = client.sources_by_date(60000, 60001)

The spatial helpers generate AstroQL cone(...) and polygon(...) clauses. Date batches constrain midpoint_mjd_tai directly and do not use OFFSET or an expensive global ORDER BY.

Metadata

Release files for arandu-broker 0.2

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

Source distribution (sdist)

Source distribution for arandu-broker 0.2
File Size Uploaded
arandu_broker-0.2.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arandu-broker 0.2
File Interpreter ABI Platform
arandu_broker-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / arandu_broker-0.2.tar.gz

Download URL arandu_broker-0.2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f453d23ec9ea0106874cc05fdf81376a851baa19740b61395960dd5b3c6eb99a
BLAKE2b-256 checksum
How to use checksums
04750b2bce670d88beda860535c611cab0773e41a8be43845a6720f880953a81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / arandu_broker-0.2-py3-none-any.whl

Download URL arandu_broker-0.2-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0787b688ffb06cb83bc33193565ace3633c2ebfc61e6eaa26c2c2bd63fc5b04
BLAKE2b-256 checksum
How to use checksums
1cd3eb09f304f79c1185c9831612bf6be316ea47c9aed2154ee215d893b02ddd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1.0

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