gollum QuickstartΒΆ

[1]:
%config InlineBackend.figure_format='retina'
[2]:
from gollum.phoenix import PHOENIXSpectrum

Simply provide the \(T_{\text{eff}}\) and \(\log{g}\) values you desire:

[3]:
spec = PHOENIXSpectrum(teff=5000, logg=4)

Normalize the spectrum by the median:

[4]:
normalized_spectrum = spec.normalize()

The spectrum has wavelength, with units:

[5]:
normalized_spectrum.wavelength
[5]:
$[8038.01,~8038.02,~8038.03,~\dots,~12848.94,~12848.96,~12848.98] \; \mathrm{\mathring{A}}$

The flux vector is the same length as wavelength:

[6]:
normalized_spectrum.flux.dtype, normalized_spectrum.shape
[6]:
(dtype('float64'), (338649,))
[7]:
ax = normalized_spectrum.plot()
ax.set_ylim(0, 2)
[7]:
(0.0, 2.0)
_images/quickstart_11_1.png

Right now we truncate the spectrum to the near-IR by default, you can change that with keyword arguments from the beginning:

[8]:
spec = PHOENIXSpectrum(teff=5000, logg=4, wl_lo=10_800, wl_hi=10_860)
[9]:
ax = spec.normalize().plot()
ax.set_ylim(0)
[9]:
(0.0, 1.2)
_images/quickstart_14_1.png

Neat! gollum is still under active development. Help us develop the tool by engaging with us on our GitHub Issues page. You can suggest a feature, or help us brainstorm how to build this project more. Thanks!