Skip to main content

A fast generic spectrum simulator

Project description

PyEchelle

PyEchelle is a simulation tool, to generate realistic 2D spectra, in particular cross-dispersed echelle spectra. However, it is not limited to echelle spectrographs, but allows simulating arbitrary spectra for any fiber-fed or slit spectrograph, where a model file is available. Optical aberrations are treated accurately, the simulated spectra include photon and read-out noise.

PyEchelle uses numba for implementing fast Python-based simulation code. It also comes with CUDA support for major speed improvements.

Example usage

pyechelle --spectrograph MaroonX --fiber 2-4 --sources Phoenix --phoenix_t_eff 3500 -t 10 --rv 100 -o mdwarf.fit

simulates a PHOENIX M-dwarf spectrum with the given stellar parameters, and a RV shift of 100m/s for the MAROON-X spectrograph.

The output is a 2D raw frame (.fits) and will look similar to:

Check out the Documentation for more examples.

Pyechelle is the successor of Echelle++ which has a similar functionality but was written in C++. This package was rewritten in python for better maintainability, easier package distribution and for smoother cross-platform development.

Installation

As simple as

pip install pyechelle

Check out the Documentation for alternative installation instruction.

Usage

See

pyechelle -h

for all available command line options.

See Documentation for more examples.

Concept:

The basic idea is that any spectrograph can be modelled with a set of wavelength-dependent transformation matrices and point spread functions which describe the spectrographs' optics:

First, wavelength-dependent affine transformation matrices are extracted from the ZEMAX model of the spectrograph. As the underlying geometric transformations (scaling, rotation, shearing, translation) vary smoothly across an echelle order, these matrices can be interpolated for any intermediate wavelength.

Second, a wavelength-dependent point spread functions (PSFs) is applied on the transformed slit images to properly account for optical aberrations. Again, the PSF is only slowly varying across an echelle order, allowing for interpolation at intermediate wavelength.

Echelle simulation

Both, the matrices and the PSFs have to be extracted from ZEMAX only once. It is therefore possible to simulate spectra without access to ZEMAX

Citation

Please cite this paper if you find this work useful in your research.

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

pyechelle-0.2.2.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

pyechelle-0.2.2-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file pyechelle-0.2.2.tar.gz.

File metadata

  • Download URL: pyechelle-0.2.2.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.11 Linux/5.4.0-96-generic

File hashes

Hashes for pyechelle-0.2.2.tar.gz
Algorithm Hash digest
SHA256 507c8a0263b778996a57c8ccbc1fefa323df57d309b0f15027151a78b196546f
MD5 3b6a2c395bd99783ea05f2862006e069
BLAKE2b-256 37494d69c06732c266e68aea41e416f1bad1f53b21e1922632b0359f69b1bbcd

See more details on using hashes here.

File details

Details for the file pyechelle-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pyechelle-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.11 Linux/5.4.0-96-generic

File hashes

Hashes for pyechelle-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 49ef6a4de2b77620ca2fcc6db4620e4b73266ec77e0ee0fc362d7c698c1d6cd0
MD5 0bac956d8453ed9c051e8d75c348574e
BLAKE2b-256 7eb535c99ce2f7a03a9568a584d90d820b0692b1d44f8b908733fcfd4aef7b9d

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