get_path

photutils.datasets.get_path(filename, location='local', cache=True, show_progress=False)[source]

Get path (location on your disk) for a given file.

Parameters
filenamestr

File name in the local or remote data folder.

location{‘local’, ‘remote’, ‘photutils-datasets’}

File location. 'local' means bundled with photutils. 'remote' means the astropy data server (or the photutils-datasets repo as a backup) or the Astropy cache on your machine. 'photutils-datasets' means the photutils-datasets repo or the Astropy cache on your machine.

cachebool, optional

Whether to cache the contents of remote URLs. Default is True.

show_progressbool, optional

Whether to display a progress bar during the download (default is False).

Returns
pathstr

Path (location on your disk) of the file.

Examples

>>> from astropy.io import fits
>>> from photutils.datasets import get_path
>>> hdulist = fits.open(get_path('fermi_counts.fits.gz'))