spexod.api#

API tool for SpExoDisks

This is meant to be an alternative to downloading data from SpExoDisks.com, instead this package will allow users to connect to the SpExoDisks database directly w/ Python.

Functions

create_spectra_file(stars)

Creates a CSV file with all spectra handles for a given list of stars

download_spectrum(spectra)

Downloads spectra from the SpExoDisks database.

find_spectra_handle([alias])

This function allows a user to find the spectra handle for a given star alias.

get_all_spectra_handles(spexodisks_handle)

Returns a list of all spectra handles for a given star/alias.

get_available_isotopologues()

Returns a list of dictionaries of available isotopologues and their properties

get_curated()

Returns a list of dictionaries of ALL curated data and corresponding handles.

get_curated_data(handle)

Given a handle, returns a list of SELECTED dictionaries of curated data.

get_fluxes(handle)

Retrieves fluxes and flux errors for a given handle.

get_params_and_units()

Returns a list dictionaries of available parameters and units.

get_spectra()

Returns a dictionary of available spectra.

get_star_aliases()

Returns a dictionary of star aliases and corresponding handles associated with alias.

get_stars_from_file(filename)

Retrieves a list of stars from a given file.

get_wavelengths(handle)

Retrieves a dictionary of wavelengths for a given handle.

login()

Log in as a user into the SpExoDisks database.

plot_spectra(wavelength, flux)

Plots a spectrum similar to the website.