Skip to main content

A Python package for working with data from various echelle spectrographs

Project description

muler (μler)

version 0.4.0

DOI

example workflow

A Python package for analyzing pipeline-processed data from high resolution near-infrared echelle spectrographs.

The echelle spectrum problem

Imagine you have just received data from the an echelle spectrograph like IGRINS or HPF and you want to start science. Oftentimes you will get handed pipeline-reduced data from the observatory facility. When you examine the data you may notice some remaining instrumental signals: telluric contamination artifact and instrument-induced slopes stand out. Or maybe you want to apply a barycentric correction based on telescope pointing information, but you're not sure which FITS header columns to use when multiple are available. You may want to normalize, deblaze (a.k.a. flatten), and plot the spectrum, or populate the spectrum into a pandas dataframe, or estimate a coarse radial velocity based on a noise-free stellar model atmosphere or a standard star template. Or maybe you want to measure an equivalent width, with or without an error bar. All of these operations are relatively routine, but their application, order, and algorithm choice may depend on the science case, and therefore they cannot be built into a default pipeline: it is up to you---the scientist---to conduct these activities.

Muler is intended to reduce the friction of getting started with near-IR echelle spectroscopy. Typical spectral analyses become only 2 or 3 lines of compact muler code, rather than hundreds of cells of Jupyter notebooks just to load and post-process a spectrum.

Plotting a sky-subtracted, flattened spectrum:

spectrum = HPFSpectrum(file=file, order=15)
spectrum.remove_nans().sky_subtract().deblaze().normalize().plot()

Measuring an equivalent width:

spectrum = HPFSpectrum(file=file, order=15)
clean_spectrum = spectrum.remove_nans().sky_subtract().deblaze().normalize()
ew = clean_spectrum.measure_ew()

Installation: pip and development version

We currently offer seamless installation with pip and conda! You can install muler in one line with:

pip install muler

or

conda install -c conda-forge muler

muler constantly changes and benefits from new community contributions like yours. We therefore recommend the slightly more tedious installation from the raw source code described on our Installation webpage. Installing from source code empowers you to modify the code for your purposes.

Our mission and your help

muler is aimed at collecting common spectral analysis methods into one place, simplifying the interactive process of astronomical discovery. We want to reduce the perceived complexity of working with echelle spectra, so that scientists have more time to focus on frontier science problems. We aspire to become a tool that new and experienced astronomers alike come to use and rely upon. In order to achieve these goals we need community contributions from practitioners like you.

That help can take many forms, even more creative outlets than most would guess. A great and easy first step is to :star: our repo or subscribe to notifications so that you can stay up to date as our project evolves. Glance around our tutorials, overall documentation, and Issues pages. Join our welcoming community and help us build some cool tools to make astronomy slightly easier, more reproducible, and more fun.

Spectrographs we currently support

We currently support the IGRINS, HPF, and NIRSPEC spectrographs. These three near-IR echelle spectrographs are attached to some of the greatest telescopes in the world: Gemini, HET, and Keck respectively. HPF differs from IGRINS and NIRSPEC in its precision radial velocity (PRV) design. It uses fibers instead of slits. We do not purport to address the extreme precision demands of the PRV community, but we anticipate our package is still useful to a wide range of HPF science use cases. We are open to supporting new spectrographs in the future, but at the present time we are focused on building, testing, and maintaining the core features for these three spectrographs before we add new ones. One way to get a new instrument supported is to make a new GitHub Issue to describe the instrument and rationale for adding it to muler, so other community members can join the conversation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muler-0.4.0.tar.gz (7.2 MB view details)

Uploaded Source

File details

Details for the file muler-0.4.0.tar.gz.

File metadata

  • Download URL: muler-0.4.0.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for muler-0.4.0.tar.gz
Algorithm Hash digest
SHA256 65803c0b06905c16fce1e7b99246206207b714cd7c6d95a21b3e16f330ee2dde
MD5 8b66a0191baed32ded9eb06866464162
BLAKE2b-256 d772f520e9bfe5f86c520d450b3129a049249e7c1c290eb4d80833fb8eb1b9ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page