Skip to main content

sdss

Query official SDSS DR20 spectral records by sky region or exact target identifier, retrieve available spectra, and interpret classifications, redshifts and legacy photometry with their release provenance and quality flags.

소스 정보

저장소
simongfarmer/skills
최근 소스 활동
2026년 10월 5일 21:54
감지된 SKILL.md 언어
영어
스타
1
포크
0

SDSS: query sky-survey records and retrieve spectra

Query official SDSS DR20 spectral records by sky region or exact identifier, retrieve available FITS spectra, and retain release provenance and quality flags alongside legacy photometry.

Uses

Provide ICRS right ascension and declination in decimal degrees with a radius in arcminutes, or an exact identifier and its namespace. Resolve named objects with an authoritative astronomy resolver first; this helper does not resolve names.

Prerequisites

Python 3.11 or later and public HTTPS access to skyserver.sdss.org, the Science Archive Server and api.sdss.org for Valis delivery. The helper uses the standard library and needs no credentials. Resolve scripts relative to the installed skill folder.

How to use

The documented cone query is python scripts/sdss.py cone --ra 229.525575753922 --dec 42.7458537608544 --radius 2. An exact target uses target --id-type sdss_id --id ID. Keep identifiers as strings and distinguish allspec_id records, sdss_id targets and specobjid pipeline spectra. Results follow ID order; when has_more is true, repeat the identical query with --after NEXT_AFTER and retain every page and stopping cap. Use photo-cone or photo-id for DR17 photometry. Download an exact available record with spectrum --id ALLSPEC_ID --output spectrum.fits > spectrum.json. Retain the original FITS bytes, SHA-256, full record, delivery URL and catalog/archive provenance. Supported DR20 BOSS v6_2_1 daily lite products can use --delivery valis after an exact archive-path check; other products use SAS.

Limitations

A target can have multiple observations, and not every imaged target has a spectrum. Empty queries do not establish an empty sky. DR17 imaging and its exact legacy spectrum association must remain distinct from nearby DR20 records; DR20 adds no new SDSS imaging. Morphology or RGB images do not establish object class or photometry. Preserve class, redshift, uncertainties, warnings and instrument metadata; missing values and sentinels are unavailable measurements. A finite redshift with zero warning is not a quality guarantee, and the helper does not load SDSS's visually inspected BHM catalog. Do not infer cosmological distance from stellar redshift. Service failures, unsupported URLs and size limits are reported without automatic fallback. Analysis requires the official file model and a maintained FITS reader.

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
7 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
sdss
description
Query official SDSS DR20 spectral records by sky region or exact target identifier, retrieve available spectra, and interpret classifications, redshifts and legacy photometry with their release provenance and quality flags.
license
MIT
# SDSS Use Python 3.11 or later and HTTPS access to `skyserver.sdss.org`, the SDSS Science Archive Server and `api.sdss.org` for Valis delivery. The helper uses only the Python standard library; no credentials or website are required for these public interfaces. Resolve `scripts/sdss.py` relative to this installed skill folder, regardless of the working directory. On Windows, `py -3.11` can replace `python` in the examples. Establish ICRS RA/Dec in decimal degrees and radius in arcminutes, or an exact identifier with its namespace. If given a name, resolve and verify its coordinates with an authoritative astronomy resolver first; this helper does not resolve names. Read [references/data-access.md](references/data-access.md) for source contracts, supported parameter joins and bounds. Run `python scripts/sdss.py cone --ra 229.525575753922 --dec 42.7458537608544 --radius 2` for DR20 ALLSPEC records, or `target --id-type sdss_id --id ID` for a target's records. `allspec_id` is an alphanumeric record identifier; `sdss_id` identifies a cross-matched target; `specobjid` identifies a pipeline spectrum. Preserve every identifier as a string. A target may have several observations and products. Results are ordered by ID, not distance. If `has_more` is true, repeat the identical query with `--after NEXT_AFTER`; retain all pages and report any stopping cap. Empty results mean no returned records in that query, not an empty sky or absent archive data. Use `photo-cone` for DR17 primary imaging measurements in the r band, or `photo-id --id OBJID` for an exact photometric record (retain its mode). The photometric `specobjid` is an exact legacy spectrum association when present; do not attach a nearby DR20 spectrum as though it were that association. Point-like/extended morphology is not confirmed STAR/GALAXY. Do not derive photometry or object class from RGB imagery. DR20 has no new SDSS imaging; any SDSS DR9 color HiPS background remains DR9. Read [references/interpretation.md](references/interpretation.md) before reporting measurements. Preserve class, subclass, z, z_err, zwarning, instrument, run2d, coadd and both catalog/archive provenance. Missing fields, empty strings and survey sentinel values are unavailable measurements. `pipeline_redshift_unflagged` means only a finite z and zero warning; it is not a guarantee. SDSS recommends its visually inspected BHM catalog for robust classification/redshift work; this helper does not load that catalog. Do not turn stellar z into cosmological distance or calculate lookback time without explicit cosmology and justified redshift quality. Retrieve one exact record with `spectrum --id ALLSPEC_ID --output spectrum.fits > spectrum.json`. For DR20 BOSS v6_2_1 daily lite products, add `--delivery valis` to use the official file service; it first verifies that Valis resolves the exact catalog archive path. Other products use the default `--delivery sas`. Inspect available records before choosing an observation/product; do not assume every imaged target has a spectrum. Downloads preserve original FITS bytes and report catalog/archive provenance, delivery URL, full record and SHA-256. A missing or unsupported URL, service failure or size limit must be reported as such; no automatic fallback or insecure transport is used. This helper does not decode every instrument; use the file's official data model and a maintained FITS reader for analysis. Optical units, masks and uncertainty caveats are in [references/interpretation.md](references/interpretation.md). See [references/example.md](references/example.md) for a real region, exact legacy association and a new DR20 spectrum. Retain machine-readable output alongside analyses. Check [NOTICE.md](NOTICE.md) for authorship and survey attribution.
GitHub에서 보기