Spectral lines identifier
Project description
PyEMILI is a Python-based tool primarily designed to assist in the automated line identification of spectra, especially for emission-line objects such as planetary nebulae (PNe), H II regions, and Herbig-Haro (HH) objects, etc. Compared to manual line identifications in the literature, PyEMILI achieves approximately 90% agreement. The current version of PyEMILI offers the following features.
Key Features
Automated Emission Line Identification: Identify emission lines in various astronomical objects.
Automated Absorption Line Identification: Identify absorption lines in stellar spectra.
Automatic 1D Spectrum Processing:
Continuum Fitting: Automatically fits the continuum of the 1D spectrum.
Line Detection: Finds spectral lines in the spectrum. An interactive interface is available for manually reviewing, adding, or revising spectral lines.
Requirements
To run PyEMILI, you will need:
Python3 compiler
Python libraries: numpy, scipy, matplotlib, astropy, pandas, and numba
Library Compatibility
Ensure that the versions of numba and numpy are compatible to avoid potential import errors, such as ImportError: Numba needs NumPy 1.** or less. It is recommended to use the latest versions of these libraries to avoid compatibility issues.
Installation
You can install PyEMILI by downloading the source code:
Step 1: Clone from GitHub
git clone https://github.com/LuShenJ/PyEMILI.git
Setp 2: Compile with pip
In the root directory where contain the setup.py file, run:
pip install .
Another Option
Directly install using pip:
pip install pyemili
Usage
Detailed usage instructions and examples can be found in the Manual, including descriptions of output files and additional parameter configurations. Examples in test directory include results for three samples, IC 418, Hf 2-2, and J0608.
Basic Example
In general, you need a text file containing at least the wavelengths and fluxes of the unidentified lines. If you need to use automatic line search function in PyEMILI, and generate a line list to be identified, refer to Line_finding.
from pyemili.Lines import Line_list
import numpy as np
# Load the line list
hf22 = np.loadtxt('Hf2-2_linelist.txt',skiprows=1)
hf22_out = Line_list(wavelength=hf22[:,0], # array of wavelengths
wavelength_error=10, # set a uniform wavelength uncertainty of 10 km/s
flux=hf22[:,1]) # array of fluxes
# run the line identification process, set the output filename as 'Hf2-2',
# and use the preset nebular elemental abundance
hf22_out.identify('Hf2-2',abun_type='nebula')
Output Files
After running pyemili.Lines.Line_list.identify(), two files end with ‘.dat’ and ‘.out’ will be generate in the directory. The ‘.out’ file contains complete candidate IDs of each input observed line, and ‘.dat’ file contains primarily the A ranking candidate IDs for each line. More information can be found here.
Troubleshooting
If you encounter any issues with PyEMILI, e.g., installation problems, usage problems, or questions on line identification accuracy, please feel free to reach out to us.
Contact:
Email: zjtu@bao.ac.cn or fangx@nao.cas.cn
Alternatively, please open an issue on the GitHub repository, where we’ll be happy to assist.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyemili-1.0.1.tar.gz.
File metadata
- Download URL: pyemili-1.0.1.tar.gz
- Upload date:
- Size: 63.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1af225566bc4880844c8c3a8cac94c95339ef0016a4ef3bb050a37e91f22ec15
|
|
| MD5 |
48e0dad9231e9b26929c307d55bc2c22
|
|
| BLAKE2b-256 |
21fa72375ffb64c4b18dbbf605224eeaa988dfcdac96467c1013276d8bbf6020
|