EchelleSpectrum

class hipparchus.EchelleSpectrum(orders, header=None)[source]

Bases: object

Echelle spectrum object, which stores each order as a Spectrum object.

Methods Summary

continuum_normalize(self[, bins, order])

Normalize the continuum in each echelle order to unity.

from_e2ds(path[, harps])

Read HARPS(-N) spectrum from an E2DS FITS file.

nearest_order(self, wavelength)

Return the order with the central wavelength nearest to wavelength.

plot(self[, ax])

Plot the echelle spectrum

Methods Documentation

continuum_normalize(self, bins=100, order=10)[source]

Normalize the continuum in each echelle order to unity.

Parameters
binsint

Number of bins used to compute maxes for continuum tracing

orderint

Polynomial order fit to the binned-maxes

classmethod from_e2ds(path, harps=True)[source]

Read HARPS(-N) spectrum from an E2DS FITS file.

Parameters
pathstr

Path to FITS file

harpsbool (optional)

True for HARPS, False for HARPS-N

Returns
spEchelleSpectrum

Echelle spectrum object

nearest_order(self, wavelength)[source]

Return the order with the central wavelength nearest to wavelength.

Parameters
wavelengthfloat

Reference wavelength

Returns
spectrumSpectrum
plot(self, ax=None, **kwargs)[source]

Plot the echelle spectrum

Parameters
axAxes (optional)

Axis object

kwargsdict

Keyword arguments to pass to the plot command

Returns
axaxis