Mini Tools for LAMOST data

astroNN.lamost module is designed for dealing with LAMOST DR5.

LAMOST DR5 is not a public data release yet, this module only provides a limited amount of tools to deal with the spectra. If you do not have the data, astroNN will not provide any LAMOST DR5 data nor functions to download them.

LAMOST Data Policy: https://www.lamost.org/policies/data_policy.html

LAMOST DR5 Homepage: https://dr5.lamost.org/

LAMOST DR5 Data Model: https://dr5.lamost.org/doc/data-production-description

LAMOST Spectra Wavelength Solution

astroNN.lamost.wavelength_solution(dr=None)[source]

To return wavelegnth_solution

Parameters:

dr (Union(int, NoneType)) – data release

Returns:

wavelength solution array

Return type:

ndarray

History:

2018-Mar-15 - Written - Henry Leung (University of Toronto)

You can retrieve LAMOST spectra wavelength solution by

from astroNN.lamost import wavelength_solution

lambda_solution = wavelength_solution(dr=5)

Pseudo-Continuum Normalization of LAMOST Spectra

astroNN.lamost.pseudo_continuum(flux, ivar, wavelength=None, L=50, dr=None)[source]

Pseudo-Continuum normalise a spectrum by dividing by a Gaussian-weighted smoothed spectrum.

Parameters:
  • flux (ndarray) – The observed flux array.

  • ivar (ndarray) – The inverse variances of the fluxes.

  • wavelength (ndarray) – An array of the wavelengths.

  • L (int) – [optional] The width of the Gaussian in pixels.

  • dr (int) – [optional] dara release

Returns:

Continuum normalized flux and flux uncerteinty

Return type:

ndarray

from astroNN.lamost import pseudo_continuum

# spectra_errs refers to the inverse variance array provided by LAMOST
# spectra can be multiple spectra at a time
norm_spec, norm_spec_err = pseudo_continuum(spectra, spectra_errs, dr=5)

Load LAMOST DR5 catalogue

astroNN.lamost.load_allstar_dr5()[source]

Open LAMOST DR5 allstar

Returns:

fits file opened by astropy

Return type:

astropy.io.fits.hdu.hdulist.HDUList

History:

2018-Jun-17 - Written - Henry Leung (University of Toronto)

from astroNN.lamost import load_allstar_dr5

fits_file = load_allstar_dr5()
fits_file[1].header  # print file header