muler Quickstart

[1]:
from muler.igrins import IGRINSSpectrum

Simply pass in a path to an IGRINS Spectrum. You can download some example data from the standalone and free-to-use muler_example_data.

[2]:
! pwd
/home/docs/checkouts/readthedocs.org/user_builds/muler/checkouts/latest/docs
[3]:
! ls
Makefile  broader_ecosystem.rst  make.bat                  tutorials
_build    conf.py                quickstart.ipynb
_static   index.rst              requirements.txt
api.rst   install.rst            requirements_actions.txt
[4]:
path = 'https://github.com/OttoStruve/muler_example_data/raw/main/IGRINS/01_IGRINS_test_data/'
filename = 'SDCH_20201202_0059.spec_a0v.fits'
spec = IGRINSSpectrum(file=path+filename)

Normalize the spectrum by the median:

[5]:
%%capture
normalized_spectrum = spec.normalize()

The spectrum has wavelength, with units:

[6]:
normalized_spectrum.wavelength
[6]:
$[16461.497,~16461.625,~16461.753,~\dots,~16692.503,~16692.605,~16692.706] \; \mathrm{\mathring{A}}$

The flux vector is the same length as wavelength:

[7]:
normalized_spectrum.flux.dtype, normalized_spectrum.shape
[7]:
(dtype('float64'), (2048,))
[ ]: