Echelle++, a fast generic spectrum simulator.
Echelle++ is a simulation tool, to generate realistic 2D spectra, in particular cross-dispersed echelle spectra. It allows to simulate 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 instead.
ECHELLE++ is no longer actively developed. Please check outEven though I might implement bug fixes, I moved the project over to python (with more features such as CUDA support) for easier deployment.
🛑 --------------------------------------------------- 🛑 --------------------------------------------------- 🛑
Example usage
./echellesimulator --spectrograph MaroonX --phoenix 3500,-1.,0.,5.5,1 -r 100 -o mdwarf.fits
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 looks similar to:
See
./echellesimulator -h
for all available program arguments. Check also the examples folder for python scripting.
Features:
- parallel C++ code for fast simulations
- arbitrary 1D input spectra
- arbitrary PSFs
- arbitrary efficiency models can be applied
- works with any spectrograph (needs access to ZEMAX model only once)
- currently provided spectrographs: MAROON-X, NEID, VeloceRosso
Concept:
The basic idea is that any (fiber-fed) echelle 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.
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
For more information see here.
How to use Echelle++
There are two ways of using Echelle++: Building from source, or using the docker image.
Building
Prerequisites
- GCC > 4.9 (or equivalent MSVC), capable of handling C++11 syntax
- CMake >=3.0
- CCFits
- CFITSIO
- HDF 5.0 library
- Curl
- fmt Header-only library will be downloaded automatically by CMake
Install the required 3rd party packages. Make sure they are compiled with the same compiler version to avoid runtime issues. Run cmake and make to build Echelle++.
For Linux, see here for a full installation guide.
Docker
For convenience, a docker image is provided that runs on any platform as long as docker is set up correctly (see here). After docker is installed a simple
docker run -v /path/to/output_directory:/home/simulations stuermer/echellesimulator
will download the latest version of Echelle++ and run it with the given arguments. So, a
docker run -v /path/to/output_directory:/home/simulations stuermer/echellesimulator --spectrograph MaroonX --phoenix 3500,-1.,0.,5.5,1 -r 100 -o mdwarf.fits
will start the simulation as shown above and save the output mdwarf.fit on your local folder /path/to/output_directory
See here for platform dependent considerations.
Documentation
The package documentation can be found here.
Contribution
Contributions are welcome! You can help by
- report bugs
- provide spectrograph models
- make suggestions
- improve documentation
- improve code
- implement new features