CRDS (Calibration Reference Data System) manages calibration reference files for HST, JWST, and Roman telescopes. It provides tools for selecting, downloading, and validating reference files. Version 13.1.16 supports Python >=3.7 and is actively maintained with regular releases aligned with telescope operations.
pip install crdsVerified import paths — ran on the pinned version, not inferred.
Basic usage: set server, create BestReferences with a context and observation parameters, then retrieve reference file mappings.
Upgrade to latest crds and use Python 3.7+. If you need Python 2 compatibility, stay on legacy versions (not recommended).
Replace calls to crds.getreferences() with BestReferences context manager or direct instantiation.
Set the environment variable CRDS_PATH to a local directory to cache downloaded files. Use CRDS_SERVER_URL to specify a mirror.
Always provide required keys: INSTRUMENT, DETECTOR, DATE-OBS, and any filter/grating/band specific to the instrument. Check instrument documentation.
Upgrade crds to latest: pip install --upgrade crds
Check network, set CRDS_SERVER_URL to a reachable server (e.g., https://crdsserver.stsci.edu), or use a local mirror.
Include all required keys: INSTRUMENT, DETECTOR, DATE-OBS. Example: obs = {'INSTRUMENT': 'NIRCam', 'DETECTOR': 'NRCA1', 'DATE-OBS': '2023-01-01'}Use a more recent context (pmap) or check that observation parameters match available reference files. Try context = 'jwst_ops.pmap' for latest.