Archives
NEIDArchive and EXPRESArchive
are the two classes you will use directly. Instantiate one, call a query_*
method to search the archive, and optionally call download on the result.
Every query returns an astropy.table.Table.
For guidance on which query method to reach for, see Choosing a query. For a description of each archive’s data products and access rules, see NEID and EXPRES.
BaseArchive (below) is the shared abstract base class both archives inherit
from. Most users never instantiate it directly; it is documented here as the
authoritative reference for inherited behaviour.
NEIDArchive
- class nexsci_rv.NEIDArchive(*, server=None, cookie_path=None, timeout=None, conf=None)
Bases:
BaseArchiveClient for the NEID archive at IPAC.
Example
>>> from nexsci_rv import NEIDArchive >>> neid = NEIDArchive() >>> tbl = neid.query_datetime("l2", ("2024-11-01", "2024-11-06"))
Authentication is only required for proprietary data; public observations are queryable without
login().
EXPRESArchive
- class nexsci_rv.EXPRESArchive(*, server=None, cookie_path=None, timeout=None, conf=None)
Bases:
BaseArchiveClient for EXPRES solar data hosted on the NEID/IPAC TAP service.
Example
>>> from nexsci_rv import EXPRESArchive >>> expres = EXPRESArchive() >>> sun = expres.query_datetime( ... "solarl2", ... ("2024-11-01", "2024-11-06"), ... columns=["l2filename", "obsdate", "v", "e_v", "dvrms", "extsnr"], ... )
All EXPRES solar data is public;
login()is not required and raisesNotApplicableif called.EXPRES solar rows carry sentinel
qrad/qdecdvalues of-99.9, soquery_position(),query_object(), andquery_qobject()all raiseNotApplicable.- query_position(data_level, coord, radius, *, columns=None, where=None, maxrec=None, output_format='votable')
Return rows whose (ra, dec) lies within
radiusofcoord.
- query_object(data_level, name, radius=<Quantity 30. arcsec>, **kw)
Resolve
namevia Simbad/NED, then run a position search.
- query_qobject(data_level, qobject, *, columns=None, where=None, maxrec=None, output_format='votable')
Search by the
QOBJECTcolumn (typically a Gaia DR2 ID).Unlike
query_object(), no name resolution is performed — this is a direct column match.
- query_pi(data_level, pi_name, *, columns=None, where=None, maxrec=None, output_format='votable')
Search by the
PINAMEcolumn (exact match).
- query_criteria(criteria, *, columns=None, maxrec=None, output_format='votable')
Combine multiple constraints in a single ADQL round-trip.
Accepted keys (besides the required
data_level):datetime:(start, end)tuple — same form asquery_datetime()position:(coord, radius)tupleobject: name → resolved via Simbad/NED, with optionalradiusqobject: exact match on the QOBJECT columnprogram: exact match on PROGRAMpi_name: exact match on PINAMEwhere: raw ADQL fragment ANDed with the above
BaseArchive
- class nexsci_rv.BaseArchive(*, server=None, cookie_path=None, timeout=None, conf=None)
Bases:
ABCCommon surface for all archive backends.
- login(username=None, password=None)
Authenticate against the archive’s login endpoint.
- Raises:
NotApplicable – if the archive does not support login.
- Parameters:
- Return type:
None
- logout()
Drop the in-memory session and delete the cookie file.
- Return type:
None
- query_datetime(data_level, date_range, *, columns=None, where=None, maxrec=None, output_format='votable')
Return rows whose observation datetime is in
date_range.date_rangeis an inclusive(start, end)pair; either side may beNonefor an open-ended interval.
- query_position(data_level, coord, radius, *, columns=None, where=None, maxrec=None, output_format='votable')
Return rows whose (ra, dec) lies within
radiusofcoord.
- query_object(data_level, name, radius=<Quantity 30. arcsec>, **kw)
Resolve
namevia Simbad/NED, then run a position search.
- query_qobject(data_level, qobject, *, columns=None, where=None, maxrec=None, output_format='votable')
Search by the
QOBJECTcolumn (typically a Gaia DR2 ID).Unlike
query_object(), no name resolution is performed — this is a direct column match.
- query_program(data_level, program, *, columns=None, where=None, maxrec=None, output_format='votable')
Search by the
PROGRAMcolumn (exact match).
- query_pi(data_level, pi_name, *, columns=None, where=None, maxrec=None, output_format='votable')
Search by the
PINAMEcolumn (exact match).
- query_criteria(criteria, *, columns=None, maxrec=None, output_format='votable')
Combine multiple constraints in a single ADQL round-trip.
Accepted keys (besides the required
data_level):datetime:(start, end)tuple — same form asquery_datetime()position:(coord, radius)tupleobject: name → resolved via Simbad/NED, with optionalradiusqobject: exact match on the QOBJECT columnprogram: exact match on PROGRAMpi_name: exact match on PINAMEwhere: raw ADQL fragment ANDed with the above
- query_adql(adql_query, *, maxrec=None, output_format='votable')
Raw ADQL escape hatch — caller is responsible for the query string.
- describe_table(table)
Query TAP_SCHEMA for column metadata of
table.
- submit_async(adql_query, *, maxrec=None, output_format='votable')
Submit an async ADQL job; returns an
AsyncJobhandle.
- download(result_table, outdir='.', *, data_level=None, workers=None, resume=True, progress=True)
Download all FITS files referenced by
result_table.Returns the list of successfully downloaded paths. Partial failures raise
DownloadErrorafter best-effort completion.Tables returned by the
query_*methods remember their data level, sodata_levelis normally unnecessary. It is required for tables fromquery_adql()or built by hand, unless exactly one data level matches the table’s filename columns.