skyhound 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- skyhound-0.1.0/.gitignore +23 -0
- skyhound-0.1.0/CHANGELOG.md +176 -0
- skyhound-0.1.0/LICENSE +28 -0
- skyhound-0.1.0/PKG-INFO +270 -0
- skyhound-0.1.0/README.md +228 -0
- skyhound-0.1.0/pyproject.toml +110 -0
- skyhound-0.1.0/scripts/check_install.py +80 -0
- skyhound-0.1.0/skills/README.md +15 -0
- skyhound-0.1.0/skills/cutout-dataset/SKILL.md +126 -0
- skyhound-0.1.0/skills/cutout-dataset/reference/euclid-dr1-catalogue.md +85 -0
- skyhound-0.1.0/skills/cutout-dataset/scripts/find_empty_positions.py +274 -0
- skyhound-0.1.0/skills/cutout-dataset/scripts/split_by_sky.py +138 -0
- skyhound-0.1.0/skills/inspect-cutouts/SKILL.md +86 -0
- skyhound-0.1.0/skills/inspect-cutouts/reference/artefacts.md +40 -0
- skyhound-0.1.0/skills/inspect-cutouts/reference/blank-fields.md +75 -0
- skyhound-0.1.0/skills/inspect-cutouts/reference/euclid-byol.md +78 -0
- skyhound-0.1.0/skills/inspect-cutouts/scripts/cutout_qc.py +209 -0
- skyhound-0.1.0/skills/multiwavelength-lookup/SKILL.md +34 -0
- skyhound-0.1.0/skills/psf-models/SKILL.md +60 -0
- skyhound-0.1.0/src/skyhound/__init__.py +9 -0
- skyhound-0.1.0/src/skyhound/archives/__init__.py +21 -0
- skyhound-0.1.0/src/skyhound/archives/_common.py +246 -0
- skyhound-0.1.0/src/skyhound/archives/base.py +361 -0
- skyhound-0.1.0/src/skyhound/archives/clients/__init__.py +1 -0
- skyhound-0.1.0/src/skyhound/archives/clients/remote_fits.py +144 -0
- skyhound-0.1.0/src/skyhound/archives/clients/stdpsf.py +190 -0
- skyhound-0.1.0/src/skyhound/archives/euclid.py +707 -0
- skyhound-0.1.0/src/skyhound/archives/gaia.py +58 -0
- skyhound-0.1.0/src/skyhound/archives/hips2fits.py +242 -0
- skyhound-0.1.0/src/skyhound/archives/legacysurvey.py +141 -0
- skyhound-0.1.0/src/skyhound/archives/mast.py +600 -0
- skyhound-0.1.0/src/skyhound/archives/panstarrs.py +142 -0
- skyhound-0.1.0/src/skyhound/archives/registry.py +120 -0
- skyhound-0.1.0/src/skyhound/archives/simbad.py +54 -0
- skyhound-0.1.0/src/skyhound/archives/tap.py +201 -0
- skyhound-0.1.0/src/skyhound/archives/vizier.py +198 -0
- skyhound-0.1.0/src/skyhound/cli.py +382 -0
- skyhound-0.1.0/src/skyhound/core/__init__.py +65 -0
- skyhound-0.1.0/src/skyhound/core/auth.py +285 -0
- skyhound-0.1.0/src/skyhound/core/batch.py +256 -0
- skyhound-0.1.0/src/skyhound/core/cache.py +140 -0
- skyhound-0.1.0/src/skyhound/core/citations.py +62 -0
- skyhound-0.1.0/src/skyhound/core/coords.py +148 -0
- skyhound-0.1.0/src/skyhound/core/coverage.py +383 -0
- skyhound-0.1.0/src/skyhound/core/errors.py +61 -0
- skyhound-0.1.0/src/skyhound/core/jobs.py +291 -0
- skyhound-0.1.0/src/skyhound/core/limits.py +15 -0
- skyhound-0.1.0/src/skyhound/core/output.py +51 -0
- skyhound-0.1.0/src/skyhound/core/preview.py +85 -0
- skyhound-0.1.0/src/skyhound/core/provenance.py +87 -0
- skyhound-0.1.0/src/skyhound/core/psf.py +226 -0
- skyhound-0.1.0/src/skyhound/core/psf_batch.py +239 -0
- skyhound-0.1.0/src/skyhound/core/psf_empirical.py +346 -0
- skyhound-0.1.0/src/skyhound/core/quicklook.py +188 -0
- skyhound-0.1.0/src/skyhound/core/resolve.py +182 -0
- skyhound-0.1.0/src/skyhound/core/results.py +266 -0
- skyhound-0.1.0/src/skyhound/core/sources.py +473 -0
- skyhound-0.1.0/src/skyhound/core/target.py +282 -0
- skyhound-0.1.0/src/skyhound/data/__init__.py +1 -0
- skyhound-0.1.0/src/skyhound/data/zenodo.py +178 -0
- skyhound-0.1.0/src/skyhound/mcp/__init__.py +1 -0
- skyhound-0.1.0/src/skyhound/mcp/server.py +502 -0
- skyhound-0.1.0/src/skyhound/py.typed +0 -0
- skyhound-0.1.0/tests/cassettes/test_recorded/test_euclid_dr1_cone_recorded.yaml +276 -0
- skyhound-0.1.0/tests/cassettes/test_recorded/test_euclid_dr1_cutout_recorded.yaml +780 -0
- skyhound-0.1.0/tests/cassettes/test_recorded/test_gaia_cone_recorded.yaml +92 -0
- skyhound-0.1.0/tests/cassettes/test_recorded/test_hips2fits_cutout_recorded.yaml +296 -0
- skyhound-0.1.0/tests/cassettes/test_recorded/test_vizier_cone_recorded.yaml +377 -0
- skyhound-0.1.0/tests/conftest.py +130 -0
- skyhound-0.1.0/tests/fakes.py +110 -0
- skyhound-0.1.0/tests/test_archives.py +192 -0
- skyhound-0.1.0/tests/test_auth.py +351 -0
- skyhound-0.1.0/tests/test_cache.py +93 -0
- skyhound-0.1.0/tests/test_cli.py +115 -0
- skyhound-0.1.0/tests/test_common.py +138 -0
- skyhound-0.1.0/tests/test_coords.py +108 -0
- skyhound-0.1.0/tests/test_coverage.py +191 -0
- skyhound-0.1.0/tests/test_imaging_archives.py +92 -0
- skyhound-0.1.0/tests/test_mcp_tools.py +181 -0
- skyhound-0.1.0/tests/test_more_archives.py +546 -0
- skyhound-0.1.0/tests/test_packaging.py +58 -0
- skyhound-0.1.0/tests/test_provenance.py +57 -0
- skyhound-0.1.0/tests/test_psf.py +437 -0
- skyhound-0.1.0/tests/test_recorded.py +121 -0
- skyhound-0.1.0/tests/test_resolve.py +124 -0
- skyhound-0.1.0/tests/test_results.py +113 -0
- skyhound-0.1.0/tests/test_skeleton.py +66 -0
- skyhound-0.1.0/tests/test_skill_scripts.py +134 -0
- skyhound-0.1.0/tests/test_sources_batch.py +786 -0
- skyhound-0.1.0/tests/test_tap_archives.py +437 -0
- skyhound-0.1.0/tests/test_zenodo.py +151 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
.venv/
|
|
7
|
+
venv/
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
htmlcov/
|
|
13
|
+
.DS_Store
|
|
14
|
+
# local data written by the toolbox
|
|
15
|
+
skyhound-data/
|
|
16
|
+
.scratch/
|
|
17
|
+
*.fits
|
|
18
|
+
*.fits.gz
|
|
19
|
+
*.provenance.json
|
|
20
|
+
.claude/settings.local.json
|
|
21
|
+
CLAUDE.local.md
|
|
22
|
+
# output folders from before the rename to skyhound
|
|
23
|
+
agentic-astronomer-data/
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## 0.1.0 (2026-12-02)
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Renamed to skyhound** (was agentic-astronomer): package `skyhound`, commands `skyhound`
|
|
14
|
+
and `skyhound-mcp`, MCP server and plugin `skyhound`, environment variables
|
|
15
|
+
`SKYHOUND_*`, default output folder `./skyhound-data`, cache `~/.cache/skyhound`,
|
|
16
|
+
credentials `~/.config/skyhound/` and keyring service `skyhound:<archive>` (credentials
|
|
17
|
+
stored under the old name must be stored again with `skyhound login`). Repository:
|
|
18
|
+
https://github.com/Aureusa/skyhound.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Distribution (Phase 5): version 0.1.0 everywhere (package, plugin, marketplace, and the
|
|
23
|
+
plugin's MCP server pinned to `skyhound==0.1.0`); complete plugin and marketplace
|
|
24
|
+
manifests; `py.typed`; README install routes (plugin, `claude mcp add`, pip) and setup
|
|
25
|
+
for Claude Desktop, Cursor and other MCP clients; absolute image URLs so the README
|
|
26
|
+
renders on PyPI; `scripts/check_install.py` (CLI, MCP handshake, optional live call);
|
|
27
|
+
CI job that builds the wheel and smoke-tests it in a clean environment; release workflow
|
|
28
|
+
(tag `v*` -> PyPI via trusted publishing -> GitHub release); `tests/test_packaging.py`.
|
|
29
|
+
- PSFs (Phase 4b): `Archive.psf()` / MCP `get_psf` / CLI `psf`, and the `psf-batch` job
|
|
30
|
+
(MCP `start_psf_batch`, CLI `psf-batch`): many positions x surveys, one FITS each plus
|
|
31
|
+
a cube per survey/band, a manifest and a mosaic. Every PSF is odd-sized, sum 1, peak
|
|
32
|
+
centred, with kind, source and FWHM in the header and provenance.
|
|
33
|
+
- Euclid DR1/Q1: the MER PSF grid of the mosaic (`GRID_PSF` in `aux_mosaic`), read as one
|
|
34
|
+
stamp with HTTP range requests (`archives/clients/remote_fits.py`); where a mosaic has
|
|
35
|
+
no grid (external DES bands) the MER catalogue-PSF stamps are used, with a note.
|
|
36
|
+
- MAST: STScI empirical PSF libraries for HST and JWST (`archives/clients/stdpsf.py`).
|
|
37
|
+
- Any archive with cutouts: empirical PSF from isolated Gaia stars (photutils ePSF,
|
|
38
|
+
`core/psf_empirical.py`), with a linearity check that refuses display-scaled images.
|
|
39
|
+
- New archives `panstarrs` (PS1 DR2 calibrated stacks) and `legacysurvey` (Legacy Surveys
|
|
40
|
+
DR10), both with cutouts and empirical PSFs.
|
|
41
|
+
- `psf-models` skill (which PSF source per survey, single and batch retrieval, checks).
|
|
42
|
+
- Validation notebooks `notebooks/cutouts.ipynb` and `notebooks/psfs.ipynb`.
|
|
43
|
+
- Eval cases P1-P2 (Euclid VIS PSF, five-survey PSF comparison).
|
|
44
|
+
- Graded eval scores (1-100): per-case rubrics (`evals/rubrics.py`) and a blind grader on
|
|
45
|
+
fact sheets built from the run folders (`evals/score.py`); `notebooks/score_by_hand.ipynb`
|
|
46
|
+
for human scores.
|
|
47
|
+
- New dependency: photutils.
|
|
48
|
+
- Study references for `inspect-cutouts`: `reference/euclid-byol.md` (galaxy cutouts
|
|
49
|
+
for self-supervised pretraining, with the Walmsley et al. 2025 selection) and
|
|
50
|
+
`reference/blank-fields.md` (blank sky for injected simulations). Both write
|
|
51
|
+
`keep.csv`.
|
|
52
|
+
- `cutout_qc.py --blank`: `not_blank` flag (largest source > 5 % of the cutout or peak
|
|
53
|
+
> 100 sigma) instead of `no_source`; new columns `largest_source_fraction`,
|
|
54
|
+
`source_fraction`, `pixel_scale_arcsec`, `image_kind`; new `stack` flag for Euclid
|
|
55
|
+
observation-stack cutouts.
|
|
56
|
+
- `find_empty_positions.py`: halo radii for Gaia stars (any non-Euclid archive), and
|
|
57
|
+
`--registry`, a per-project record of used blank positions;
|
|
58
|
+
new positions never overlap earlier ones and IDs continue across runs.
|
|
59
|
+
- Euclid catalogue reference: the Walmsley et al. 2025 morphology selection as ADQL,
|
|
60
|
+
and a warning that `flux_vis_psf` is NaN or far too low for large sources.
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- Compatible with astroquery 0.4.12 (CI installs the newest): Euclid cutouts no longer pass
|
|
65
|
+
the deprecated `instrument` / `id` arguments to it (still passed to older versions); the
|
|
66
|
+
recorded-response tests ignore request details that differ between astroquery versions
|
|
67
|
+
(Euclid cutout parameters, VizieR's `-out.meta`). Observation-stack cutouts (M81) still
|
|
68
|
+
work with 0.4.12.
|
|
69
|
+
- `find_empty_positions.py` selected on `flux_vis_psf`, which is NaN for ~15 % of large
|
|
70
|
+
galaxies and saturated stars, and treated every source as a point; it now uses
|
|
71
|
+
`flux_segmentation` and keeps positions clear of each source's isophotal extent.
|
|
72
|
+
- `cutout_qc.py` flagged 1 px rounding differences in shape as `truncated` (64 of 99
|
|
73
|
+
cutouts in one batch); it now allows 2 px.
|
|
74
|
+
|
|
75
|
+
- Core library (Phase 1):
|
|
76
|
+
- `core.results`: `TableResult` / `ImageResult` with `.summary()`;
|
|
77
|
+
`TableResult.from_table` writes a table capped at `max_rows` and reports truncation;
|
|
78
|
+
`ImageResult.from_fits` reads shape, WCS centre, pixel scale and NaN-robust stats.
|
|
79
|
+
- `core.coords`: `parse_target` / `parse_coordinates` accept decimal degrees,
|
|
80
|
+
sexagesimal, galactic (`gal l b` or `frame="galactic"`), object names, `SkyCoord`
|
|
81
|
+
and `(ra, dec)` tuples; always return ICRS.
|
|
82
|
+
- `core.resolve`: `resolve_name` tries SIMBAD then NED, caches results, and raises
|
|
83
|
+
actionable errors that distinguish "not found" from "service down".
|
|
84
|
+
- `core.cache`: on-disk cache keyed by SHA-256 of (archive, params), atomic writes,
|
|
85
|
+
root from `SKYHOUND_CACHE` (default `~/.cache/skyhound`).
|
|
86
|
+
- `core.provenance`: `<file>.provenance.json` sidecars with archive, query, release,
|
|
87
|
+
citation, UTC timestamp and software versions.
|
|
88
|
+
- `core.errors` and `core.limits` (default caps, e.g. 500 rows).
|
|
89
|
+
- `archives.base.Archive` interface with `Capability` and `ArchiveStatus`;
|
|
90
|
+
unsupported capabilities raise `CapabilityNotSupportedError`.
|
|
91
|
+
- `archives.registry`: `register`, `get_archive`, `list_archives` (filter by capability).
|
|
92
|
+
- `core.auth`: one login interface for all archives. `Credentials` (username/e-mail +
|
|
93
|
+
password, or API token; secrets hidden from repr), `CredentialStore` (lookup order:
|
|
94
|
+
env vars `SKYHOUND_<ARCHIVE>_USERNAME/PASSWORD/TOKEN`, system keyring,
|
|
95
|
+
`~/.config/skyhound/credentials.netrc` (mode 600), `~/.netrc` by host).
|
|
96
|
+
`Archive` gains `auth_method`, `auth_required`, `login()`, `logout()`,
|
|
97
|
+
`ensure_login()` and `auth_status()`; each archive implements a small `_login()`.
|
|
98
|
+
- CLI: `skyhound login <archive>` (prompts, verifies, saves),
|
|
99
|
+
`logout <archive>`, `auth-status [archive]`.
|
|
100
|
+
- `core.coverage`: sky footprints. Every archive must implement `coverage()`, returning
|
|
101
|
+
`AllSky`, `DecRange`, `MOCCoverage` (IVOA MOC from a file, URL or the CDS MOCServer,
|
|
102
|
+
downloaded once and cached) or `PointedCoverage` (no fixed footprint).
|
|
103
|
+
`Archive.check_coverage(coord, radius_arcsec)` and `check_coverage_all(...)` classify
|
|
104
|
+
a position or cone as inside / partial / outside / unknown with an actionable message.
|
|
105
|
+
New dependency: `mocpy`.
|
|
106
|
+
- Archives (Phase 2, part 1):
|
|
107
|
+
- `euclid-dr1` (Euclid DR1-Foundation, released 2026-11-12) and `euclid-q1`: cone search
|
|
108
|
+
on the MER catalogue, ADQL, VIS / NISP Y-J-H cutouts from the MER mosaics, optional
|
|
109
|
+
login, coverage maps (Q1 from the CDS MOCServer; DR1 built from the MER tile outlines),
|
|
110
|
+
DOI-based citations.
|
|
111
|
+
- `gaia` (Gaia DR3): cone search and ADQL, failing over from the ESA Gaia Archive to the
|
|
112
|
+
AIP mirror.
|
|
113
|
+
- `archives.tap.TapArchive`: generic pyvo TAP archive with endpoint failover; a new TAP
|
|
114
|
+
archive is mostly configuration.
|
|
115
|
+
- Data methods check coverage first (`OutsideCoverageError` with an explanation) and
|
|
116
|
+
attach `notes` to results (partial coverage, mirror used).
|
|
117
|
+
- Health checks read the IVOA VOSI availability document instead of trusting HTTP 200.
|
|
118
|
+
- `core.output`: deterministic output paths under `$SKYHOUND_OUTPUT`
|
|
119
|
+
(default `./skyhound-data`).
|
|
120
|
+
- Archives (Phase 2, part 2):
|
|
121
|
+
- `vizier`: cone search in any VizieR catalogue (`table="I/355/gaiadr3"`), CDS with the
|
|
122
|
+
CfA mirror as fallback, coverage checked against each catalogue's MOC.
|
|
123
|
+
- `simbad`: objects around a position and ADQL on SIMBAD's TAP service, with the
|
|
124
|
+
Harvard mirror as fallback.
|
|
125
|
+
- `hips2fits`: FITS cutouts from any HiPS survey (short names for DSS2, 2MASS,
|
|
126
|
+
Pan-STARRS, AllWISE, GALEX, Euclid Q1), at the survey's native pixel scale.
|
|
127
|
+
- `mast`: observation search with filters, size-checked product downloads, TESS
|
|
128
|
+
(TESScut) and HST (HAPcut) cutouts, optional API-token login.
|
|
129
|
+
- `Archive.search_products` / `download_product` and `DownloadResult`;
|
|
130
|
+
`cone_search(table=...)` for archives with several catalogues (VizieR, Euclid DR1
|
|
131
|
+
Deep-field tables).
|
|
132
|
+
- Coverage maps that come back empty (e.g. an unknown MOCServer ID) count as unknown,
|
|
133
|
+
not as "outside".
|
|
134
|
+
- Bulk work and quick-look (Phase 3):
|
|
135
|
+
- `core.sources`: read source lists from text files (degrees, sexagesimal, names,
|
|
136
|
+
`id ra dec`), any table (column auto-detection, units, galactic) or a URL.
|
|
137
|
+
- `core.batch`: resumable, parallel batch cutouts with a manifest, per-file provenance
|
|
138
|
+
and `CITATION.txt`; positions outside the footprint are skipped without requests.
|
|
139
|
+
- `core.jobs`: background jobs with a status file; `local` (subprocess) or `slurm`
|
|
140
|
+
(`sbatch`, arguments from `SKYHOUND_SLURM_ARGS`) launchers.
|
|
141
|
+
- `core.quicklook`: FITS to PNG (asinh / linear / log / sqrt), labelled mosaics paged at
|
|
142
|
+
100 images; Pillow only. New dependency: `pillow`.
|
|
143
|
+
- `core.citations` (citation text from provenance sidecars) and `core.preview` (first rows
|
|
144
|
+
and column summaries of a saved table).
|
|
145
|
+
- CLI: `batch-cutouts`, `job-status`, `cancel-job`, `quicklook`, `citations`.
|
|
146
|
+
- `core.target` / `target-cutouts` (CLI) / `start_target_cutouts` (MCP): cutouts of one
|
|
147
|
+
target from every archive and band that covers it (default max 10), with a labelled
|
|
148
|
+
mosaic and CITATIONS.txt, as a background job; `discover=True` picks among all HiPS
|
|
149
|
+
surveys covering the position, spread over wavelengths.
|
|
150
|
+
- Euclid: the DR1 footprint includes the observation stacks; cutouts check tile outlines
|
|
151
|
+
and fall back to an observation stack where no MER tile exists (e.g. the M81 core);
|
|
152
|
+
one retry on transient cutout-service failures.
|
|
153
|
+
- MAST `band="HST"` picks the best available filter.
|
|
154
|
+
- `data.zenodo` and MCP tools `inspect_data_record` / `download_data_file`: catalogues
|
|
155
|
+
published with papers on Zenodo (record ID, DOI or link), checksum-verified downloads
|
|
156
|
+
with size limits and a provenance file holding the record's citation. Parquet catalogues
|
|
157
|
+
are supported (new dependencies: pandas, pyarrow; scipy for astropy cross-matching).
|
|
158
|
+
- Source lists with several RA/Dec column pairs use the pair with the most distinct
|
|
159
|
+
positions (the Euclid Q1 morphology catalogue's `ra`/`dec` are tile centres).
|
|
160
|
+
- evals: plain-Claude-Code baseline condition, tool-agnostic outcome checks, cases X1
|
|
161
|
+
(cross-match) and Z1 (Walmsley et al. catalogue to Q1 cutouts), `compare.py` for charts.
|
|
162
|
+
- `target-cutouts` skips Euclid observation stacks unless `allow_stacks=True`, and labels
|
|
163
|
+
them "(obs. stack, no MER)" when used; `skills/inspect-cutouts/reference/artefacts.md`
|
|
164
|
+
explains artefacts that are in the data (stack patchwork, survey over-subtraction,
|
|
165
|
+
HST footprints).
|
|
166
|
+
- Quick-look and image statistics are memory-safe for large cutouts (memory-mapped,
|
|
167
|
+
block-averaged); background jobs refuse node-local output folders with Slurm.
|
|
168
|
+
- MCP server with 17 tools and server instructions; library errors reach the model as
|
|
169
|
+
their actionable messages (`ToolError`), unexpected ones are reported as likely bugs.
|
|
170
|
+
`quicklook` writes PNGs for the user and only returns the image to the agent on request.
|
|
171
|
+
- Offline tests for all of the above; sockets are blocked unless `--remote` is given.
|
|
172
|
+
- Repository skeleton (Phase 0): `skyhound` package layout, `pyproject.toml`
|
|
173
|
+
(hatchling), console scripts `skyhound` and `skyhound-mcp`,
|
|
174
|
+
an MCP server with no tools yet (mcp SDK 2.x `MCPServer`), offline test suite with
|
|
175
|
+
a `--remote` opt-in for live archive tests, GitHub Actions CI (ruff, mypy, pytest
|
|
176
|
+
on Python 3.11–3.13), Claude Code plugin manifests and `.mcp.json`.
|
skyhound-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, the skyhound contributors
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
skyhound-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: skyhound
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Retrieve astronomical data from telescope archives: a Python library, CLI and MCP server for AI agents.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Aureusa/skyhound
|
|
6
|
+
Project-URL: Issues, https://github.com/Aureusa/skyhound/issues
|
|
7
|
+
Author: skyhound contributors
|
|
8
|
+
License-Expression: BSD-3-Clause
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: archives,astronomy,astroquery,cutouts,euclid,gaia,hst,jwst,mast,mcp,psf
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Requires-Dist: astropy>=6.0
|
|
20
|
+
Requires-Dist: astroquery>=0.4.10
|
|
21
|
+
Requires-Dist: mcp<3,>=2.3
|
|
22
|
+
Requires-Dist: mocpy>=0.17
|
|
23
|
+
Requires-Dist: numpy>=1.26
|
|
24
|
+
Requires-Dist: pandas>=2.1
|
|
25
|
+
Requires-Dist: photutils>=2.0
|
|
26
|
+
Requires-Dist: pillow>=10
|
|
27
|
+
Requires-Dist: pyarrow>=15
|
|
28
|
+
Requires-Dist: pyvo>=1.5
|
|
29
|
+
Requires-Dist: requests>=2.28
|
|
30
|
+
Requires-Dist: scipy>=1.11
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: matplotlib>=3.8; extra == 'dev'
|
|
33
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-recording>=0.13; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
37
|
+
Provides-Extra: notebooks
|
|
38
|
+
Requires-Dist: ipykernel>=6; extra == 'notebooks'
|
|
39
|
+
Requires-Dist: matplotlib>=3.8; extra == 'notebooks'
|
|
40
|
+
Requires-Dist: nbconvert>=7; extra == 'notebooks'
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
# skyhound
|
|
44
|
+
|
|
45
|
+
<img src="https://raw.githubusercontent.com/Aureusa/skyhound/main/docs/logo/skyhound-logo.svg" alt="skyhound logo" width="96" align="right">
|
|
46
|
+
|
|
47
|
+
An open-source toolbox that lets Claude and other MCP-capable agents retrieve
|
|
48
|
+
astronomical data from telescope archives (Euclid, Gaia, MAST, HiPS cutouts, SIMBAD, …).
|
|
49
|
+
|
|
50
|
+
> **Status: alpha (0.1).** The library, CLI, MCP server and skills work and are tested;
|
|
51
|
+
> interfaces may still change. See [TODO.md](TODO.md) for the roadmap.
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
Pick one. All three use the same package from PyPI; the plugin and `claude mcp add` routes
|
|
56
|
+
need [uv](https://docs.astral.sh/uv/) (`uvx` fetches and runs the server for you).
|
|
57
|
+
|
|
58
|
+
**1. Claude Code plugin** (MCP server and skills):
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/plugin install skyhound --marketplace Aureusa/skyhound
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
or in two steps: `/plugin marketplace add Aureusa/skyhound`, then
|
|
65
|
+
`/plugin install skyhound@skyhound`. Skills then appear as `skyhound:<skill>`.
|
|
66
|
+
|
|
67
|
+
**2. MCP server only** (any project, no skills):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
claude mcp add skyhound -- uvx --from skyhound skyhound-mcp
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**3. Python library and CLI** (no AI needed):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install skyhound
|
|
77
|
+
skyhound --version
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Results go to `./skyhound-data` unless `SKYHOUND_OUTPUT` is set. On an HPC cluster, set
|
|
81
|
+
`SKYHOUND_LAUNCHER=slurm` and `SKYHOUND_SLURM_ARGS="-p <partition> -t 02:00:00"` so that
|
|
82
|
+
background jobs (batch cutouts, PSF batches) run through Slurm, not on the login node.
|
|
83
|
+
|
|
84
|
+
### Other MCP clients
|
|
85
|
+
|
|
86
|
+
The server speaks MCP over stdio, so any MCP client can use it. For **Claude Desktop**,
|
|
87
|
+
add to `claude_desktop_config.json`; for **Cursor**, to `.cursor/mcp.json` (same shape):
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"mcpServers": {
|
|
92
|
+
"skyhound": {
|
|
93
|
+
"command": "uvx",
|
|
94
|
+
"args": ["--from", "skyhound", "skyhound-mcp"],
|
|
95
|
+
"env": { "SKYHOUND_OUTPUT": "/path/to/skyhound-data" }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Set `SKYHOUND_OUTPUT` there: desktop apps start the server in a directory you may not
|
|
102
|
+
expect. Without uv, `pip install skyhound` and use `"command": "skyhound-mcp"`.
|
|
103
|
+
|
|
104
|
+
## Does it help?
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
We gave Claude Code (Sonnet 5.5) 19 realistic astronomy data tasks twice: once as a plain
|
|
109
|
+
session with its usual tools (shell, files, web search), and once with the skyhound MCP
|
|
110
|
+
server and skills. Both had the same Python environment, including astroquery. The tasks
|
|
111
|
+
range from "make Euclid cutouts for every source in this file", "build a 300-galaxy
|
|
112
|
+
training set split by sky region" and "get me the PSFs of five telescopes" to "is NGC 6505
|
|
113
|
+
in Euclid DR1?".
|
|
114
|
+
|
|
115
|
+
Every run was scored 1-100 against a rubric written per task: the product (50: is it
|
|
116
|
+
exactly what was asked, and usable?), following the request (20), the answer (20: true
|
|
117
|
+
to the files, with the caveats that matter) and efficiency (10, from the wall time). The
|
|
118
|
+
scoring was automatic, with human supervision: a grader model (Claude Opus 5.5, blind to
|
|
119
|
+
the setup) reads measured facts about the files each run produced, its tool calls and its
|
|
120
|
+
answer; every run was also scored by hand, and the grader's rules were adjusted where the
|
|
121
|
+
two disagreed (they agree with r = 0.90). **With skyhound the runs score 89 on average,
|
|
122
|
+
plain 62.** By the pass/fail outcome checks, 18 of 19 tasks were done with skyhound and 12
|
|
123
|
+
plain, at less than half the cost and a quarter of the time
|
|
124
|
+
([pass/fail, cost and time](https://raw.githubusercontent.com/Aureusa/skyhound/main/docs/figures/eval-v0.1-summary.png)).
|
|
125
|
+
|
|
126
|
+
[The tasks, checks and rubrics](evals/cases.md) ·
|
|
127
|
+
[per-task pass/fail](https://raw.githubusercontent.com/Aureusa/skyhound/main/docs/figures/eval-v0.1-per-case.png) ·
|
|
128
|
+
[raw numbers](https://raw.githubusercontent.com/Aureusa/skyhound/main/docs/figures/eval-v0.1-results.csv) ·
|
|
129
|
+
[notebook with every score and its evidence](notebooks/evals.ipynb).
|
|
130
|
+
|
|
131
|
+
Caveats:
|
|
132
|
+
|
|
133
|
+
- **One run per task.** Agent runs vary; a few results could flip on a re-run, and the
|
|
134
|
+
grader's score of one run moves by about 5 points between passes. Repeated runs with
|
|
135
|
+
error bars are planned.
|
|
136
|
+
- **Small, home-made task set** (19 tasks, written by the authors), weighted towards
|
|
137
|
+
Euclid. It measures this tool on its intended jobs, not general astronomy ability.
|
|
138
|
+
- **One plain run was stopped by hand.** The plain machine-learning-set task (A5) was
|
|
139
|
+
cancelled after 28 minutes without a single cutout. Its cost was estimated from its
|
|
140
|
+
token use, since a cancelled session reports none.
|
|
141
|
+
- **The blinding is partial**: the tool calls show which setup a run used.
|
|
142
|
+
- Cost is the API cost reported by Claude Code; time includes waiting for archives and
|
|
143
|
+
background jobs.
|
|
144
|
+
|
|
145
|
+
## Archives
|
|
146
|
+
|
|
147
|
+
| Name | Data | Cone search | Cutouts | PSF | ADQL | Login | Coverage |
|
|
148
|
+
|---|---|---|---|---|---|---|---|
|
|
149
|
+
| `euclid-dr1` | Euclid DR1 (2026), ESA | MER catalogue (Wide Survey) | VIS, NISP Y/J/H | survey model (MER PSF grid; also DES g/r/i/z) | yes | optional | ~2,400 deg² |
|
|
150
|
+
| `euclid-q1` | Euclid Q1 (2025), ESA | MER catalogue | VIS, NISP Y/J/H | survey model | yes | optional | Deep Fields, ~63 deg² |
|
|
151
|
+
| `gaia` | Gaia DR3 (ESA, AIP mirror) | gaia_source | – | – | yes | – | all sky |
|
|
152
|
+
| `vizier` | any VizieR catalogue (CDS, CfA mirror) | `table="I/355/gaiadr3"` | – | – | – | – | per catalogue |
|
|
153
|
+
| `simbad` | SIMBAD objects (CDS, Harvard mirror) | basic | – | – | yes | – | all sky |
|
|
154
|
+
| `hips2fits` | any HiPS survey (CDS) | – | `band="DSS2-red"`, `"PanSTARRS-g"`, any HiPS ID | empirical (linear HiPS only) | – | – | per survey |
|
|
155
|
+
| `mast` | HST, JWST, TESS, … (STScI) | `search_products` / `download_product` | `"TESS[:sector]"`, `"HST:<filter>"` | library: `"HST:F814W"`, `"JWST:F200W"`, … | – | optional token | pointed |
|
|
156
|
+
| `panstarrs` | Pan-STARRS1 DR2 stacks (STScI) | – | g, r, i, z, y (calibrated) | empirical | – | – | Dec > −30° |
|
|
157
|
+
| `legacysurvey` | Legacy Surveys DR10 (NOIRLab) | – | g, r, i, z (calibrated) | empirical | – | – | ~20,000 deg² |
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from skyhound.archives import get_archive
|
|
161
|
+
from skyhound.core import parse_coordinates
|
|
162
|
+
|
|
163
|
+
dr1 = get_archive("euclid-dr1")
|
|
164
|
+
target = parse_coordinates("04:04:57.6 -48:25:12")
|
|
165
|
+
print(dr1.check_coverage(target).message)
|
|
166
|
+
print(dr1.cone_search(target, radius_arcsec=10).summary())
|
|
167
|
+
print(dr1.cutout(target, size_arcsec=20, band="VIS").summary())
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## What's in the repo
|
|
171
|
+
|
|
172
|
+
| Layer | Where | What it does |
|
|
173
|
+
|---|---|---|
|
|
174
|
+
| Python library | `src/skyhound/` | All the logic. Usable without any AI. |
|
|
175
|
+
| CLI | `skyhound` | The same functions, for people and scripts. |
|
|
176
|
+
| MCP server | `skyhound-mcp` | A thin wrapper that exposes the library as tools. |
|
|
177
|
+
| Skills | `skills/*/SKILL.md` | Written workflows that tell the agent how to use the tools well. |
|
|
178
|
+
| Claude Code plugin | `.claude-plugin/`, `.mcp.json` | Bundles the server and skills for a one-step install. |
|
|
179
|
+
|
|
180
|
+
Tools never return pixels or large tables to the model. They write data to disk and return
|
|
181
|
+
a path, a short summary and a `<file>.provenance.json` sidecar with the query, versions and
|
|
182
|
+
the archive's citation text.
|
|
183
|
+
|
|
184
|
+
## Development
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
git clone https://github.com/Aureusa/skyhound.git
|
|
188
|
+
cd skyhound
|
|
189
|
+
pip install -e ".[dev]"
|
|
190
|
+
pytest # offline tests
|
|
191
|
+
pytest --remote # also run tests against live archives
|
|
192
|
+
skyhound --version
|
|
193
|
+
skyhound-mcp # starts the MCP server on stdio
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Cutouts for a whole list of objects
|
|
197
|
+
|
|
198
|
+
Give a source list and get one cutout per object. The list can be a text file (one
|
|
199
|
+
`RA Dec`, sexagesimal position or object name per line), any table (CSV, ECSV, FITS,
|
|
200
|
+
VOTable, e.g. a `cone_search` result) or a URL; RA/Dec columns are detected.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
skyhound batch-cutouts targets.csv --archive euclid-dr1 --band VIS --size 10
|
|
204
|
+
# run it in the background instead (on a cluster: through Slurm)
|
|
205
|
+
export SKYHOUND_SLURM_ARGS="-p cpu-short -t 02:00:00 -c 4 --mem 4G"
|
|
206
|
+
skyhound batch-cutouts targets.csv --archive euclid-dr1 --band VIS --size 10 --background slurm
|
|
207
|
+
skyhound job-status
|
|
208
|
+
# look at them
|
|
209
|
+
skyhound quicklook skyhound-data/batches/<batch>/ --sample 100
|
|
210
|
+
skyhound citations skyhound-data/batches/<batch>/
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Batches are resumable (re-running keeps finished cutouts) and write a `manifest.csv`
|
|
214
|
+
with the status of every object (ok / exists / outside / failed). Objects outside the
|
|
215
|
+
archive's footprint are skipped without a request.
|
|
216
|
+
|
|
217
|
+
## PSFs
|
|
218
|
+
|
|
219
|
+
`get_psf` (one) and `start_psf_batch` (many positions × surveys) return the PSF as a FITS
|
|
220
|
+
image: odd size, sum 1, peak in the central pixel, on the survey's pixel grid, with its
|
|
221
|
+
kind and FWHM in the header and provenance:
|
|
222
|
+
|
|
223
|
+
- **survey model**: Euclid's own MER PSF grids (read as one stamp with HTTP range requests,
|
|
224
|
+
~8 MB instead of the 1.5 GB file);
|
|
225
|
+
- **library**: STScI's empirical HST (ACS, WFC3, WFPC2) and JWST (NIRCam per detector,
|
|
226
|
+
NIRISS, MIRI) PSFs;
|
|
227
|
+
- **empirical**: built from isolated Gaia stars in a 10′ image of the field (photutils
|
|
228
|
+
ePSF), for any archive with calibrated images. Display-scaled images (e.g. the CDS HiPS
|
|
229
|
+
of Pan-STARRS, DSS plates) are detected and refused.
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
skyhound psf "61.24 -48.42" --archive euclid-dr1 --band VIS
|
|
233
|
+
skyhound psf-batch euclid-dr1:VIS euclid-dr1:NIR_H mast:JWST:F200W panstarrs:r --target "150.1 2.2"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Validation notebooks
|
|
237
|
+
|
|
238
|
+
[`notebooks/`](notebooks/) has executed notebooks that check what the tools and agents
|
|
239
|
+
produced against independent references: [`cutouts.ipynb`](notebooks/cutouts.ipynb)
|
|
240
|
+
(positions, batches, training-set splits, blank cutouts, study selections) and
|
|
241
|
+
[`psfs.ipynb`](notebooks/psfs.ipynb) (Euclid model vs empirical PSFs, HST/JWST against
|
|
242
|
+
the diffraction limit, ground-based PSFs and agent PSF runs).
|
|
243
|
+
|
|
244
|
+
## MCP tools
|
|
245
|
+
|
|
246
|
+
`resolve_object`, `list_archives`, `archive_status`, `auth_status`, `check_coverage`,
|
|
247
|
+
`cone_search`, `get_cutout`, `run_query`, `search_products`, `download_product`,
|
|
248
|
+
`preview_table`, `quicklook`, `citations`, `start_batch_cutouts`, `start_target_cutouts`,
|
|
249
|
+
`job_status`, `cancel_job`, `inspect_data_record`, `download_data_file` (catalogues
|
|
250
|
+
published with papers on Zenodo), `get_psf`, `start_psf_batch`. Run the server with `skyhound-mcp` (stdio).
|
|
251
|
+
|
|
252
|
+
## Logging in to archives
|
|
253
|
+
|
|
254
|
+
Some archives need an account for non-public data (ESA, ESO) or an API token (MAST).
|
|
255
|
+
Log in once from a terminal; the agent never sees your password:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
skyhound login euclid-esa # prompts for username/e-mail and password
|
|
259
|
+
skyhound auth-status # which archives need a login, what is stored
|
|
260
|
+
skyhound logout euclid-esa
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Credentials go to the system keyring if there is one, otherwise to
|
|
264
|
+
`~/.config/skyhound/credentials.netrc` (readable only by you). You can also
|
|
265
|
+
set `SKYHOUND_<ARCHIVE>_USERNAME` / `_PASSWORD` / `_TOKEN`, or reuse an
|
|
266
|
+
existing `~/.netrc` entry for the archive's host.
|
|
267
|
+
|
|
268
|
+
## License
|
|
269
|
+
|
|
270
|
+
BSD-3-Clause. See [LICENSE](LICENSE).
|