get_reference_file_path

specreduce.calibration_data.get_reference_file_path(path=None, cache=True, repo_url='https://raw.githubusercontent.com/astropy/specreduce-data', repo_branch='main', repo_data_path='specreduce_data/reference_data', show_progress=False)[source]

Utility to load reference data via GitHub raw user content. By default the specreduce_data repository at https://github.com/astropy/specreduce-data is used.

Parameters:
pathstr or None (default: None)

Filename of reference file relative to the reference_data directory within specified package.

cachebool (default: False)

Set whether file is cached if file is downloaded.

repo_urlstr

Base repository URL for the reference data.

repo_branchstr (default: main)

Branch of repository from which to fetch the reference data.

repo_data_pathstr (default: specreduce_data/reference_data/)

Path within the repository where the reference data is located.

show_progressbool (default: False)

Set whether download progress bar is shown if file is downloaded.

Returns:
file_pathstr or None

Local path to reference data file or None if the path cannot be constructed or if the file itself is not valid.

Examples

>>> from specreduce.calibration_data import get_reference_file_path
>>> kpno_extinction_file = get_reference_file_path("extinction/kpnoextinct.dat")