spino.pipeline.nea_fetch module

NEA Catalog Fetch

Optional online fetch of the NASA Exoplanet Archive PS table via its TAP service. On any failure (network error, timeout, HTTP error) the caller should fall back to a local CSV (see resolve_catalog_path).

The column allow-list NEA_COLUMNS lists exactly the columns the phase scheduler pipeline reads (plus a few extra magnitudes useful for GIANO-B target selection). Restricting the SELECT keeps the cached CSV small and makes the dependency between the pipeline and the catalog explicit.

spino.pipeline.nea_fetch.fetch_nea_catalog(out_path, source='NEA', timeout=30)[source]

Query the NEA TAP service for NEA_COLUMNS from the ps table, keeping only Published Confirmed rows. source controls the WHERE clause:

“NEA”: no extra filter (full PS confirmed) “TESS”: adds AND disc_facility LIKE '%TESS%' “BOTH”: same as NEA (per-row source is derived downstream)

Writes the response CSV atomically to out_path.

Raises any underlying requests / IO exception; the caller is responsible for catching and falling back.

Return type:

str

Parameters:
spino.pipeline.nea_fetch.resolve_catalog_path(source, online, catalog_dir, timeout=30)[source]

Decide which CSV path the pipeline should load for source.

The filename is always PS_latest_{source}.csv inside catalog_dir. If online is True, attempt a fresh fetch into that file and return its path on success. On any failure print a single warning line and return the same path (the caller will load the local copy if it exists, or raise on read). If online is False, return the path directly without fetching.

Return type:

str

Parameters: