11.4.2. astroML.datasets.fetch_sdss_spectrum

astroML.datasets.fetch_sdss_spectrum(plate, mjd, fiber, data_home=None, download_if_missing=True, cache_to_disk=True)[source]

Fetch an SDSS spectrum from the Data Archive Server

Parameters
plate: integer

plate number of desired spectrum

mjd: integer

mean julian date of desired spectrum

fiber: integer

fiber number of desired spectrum

Returns
spec: :class:`astroML.tools.SDSSfits` object

An object wrapper for the fits data

Other Parameters
data_home: string (optional)

directory in which to cache downloaded fits files. If not specified, it will be set to ~/astroML_data.

download_if_missing: boolean (default = True)

download the fits file if it is not cached locally.

cache_to_disk: boolean (default = True)

cache downloaded file to data_home.