LiMe: A Line Measuring library (v2 release)#

_images/LiMe2_logo_white_transparent.png _images/LiMe2_logo_dark_transparent.png

✨ Key features#

  • Integrated and profile-dependent measurements of emission and absorption line fluxes.

  • Support for including pixel-level uncertainty spectra in calculations.

  • A flexible configuration system for multi-component profile fitting.

  • Automated and manual tools to verify line detections.

  • Interactive plots for visual inspection of inputs and results.

  • Line labeling conventions compatible with PyNeb.

  • Flexible output results format, including .txt, .pdf, multi-page .fits, .asdf, and .xlsx files.

  • Support for both long-slit and integrated fiels spectrocopic cubes .fits files.

Tip

Where to find what you need

  • The Introduction section provides detailed descriptions of LiMe’s main components.

  • The Guides section offers shorter tutorials for specific tasks.

  • The Explanations section discusses LiMe’s configuration and results from a scientific point of view.

  • The Reference section contains comprehensive indexes of LiMe functions.

✨ LiMe v2 release:#

After a year of improvements, we’re releasing LiMe v2, featuring line database support and a robust band-generation model for a more streamlined workflow:

_images/lime_workflow_dark.jpg
import lime

# Data location
data_folder = '../doc_notebooks/0_resources/'
cfg_file = f'{data_folder}/long_slit.toml'
fits_file = f'{data_folder}/spectra/gp121903_osiris.fits'

# Load the configuration file
obs_cfg = lime.load_cfg(cfg_file)

# Load the spectroscopic observation
spec = lime.Spectrum.from_file(fits_file, instrument='osiris', redshift=obs_cfg['osiris']['gp121903']['z'])

# Generate the object lines table
lines_frame = spec.retrieve.lines_frame(band_vsigma=120, automatic_grouping=True,
                                        fit_cfg=obs_cfg, obj_cfg_prefix='gp121903_osiris')

# Fit the continuum and confirm the lines via intensity thresholding
spec.fit.continuum(degree_list=[3, 6, 6], emis_threshold=[3, 2, 1.5], log_scale=True, plot_steps=True,)
match_lines = spec.infer.peaks_troughs(lines_frame, emission_shape=True, sigma_threshold=3, plot_steps=True)

# Measure the lines
spec.fit.frame(match_lines, obs_cfg, obj_cfg_prefix='gp121903_osiris')

# Plot the results
spec.plot.spectrum(log_scale=True, rest_frame=True)
spec.plot.grid(fname='lines_grid.png')

# Save the results
spec.save_frame('./gp121903_lines_frame.txt')

πŸ“Ί Video introduction:#

Many commands from the LiMe v1 video tutorial are outdated, but it still provides a good insight on LiMe workflow.

🌌 πŸ”­ SpecSy alpha release:#

In our ongoing effort to improve the accessibility of astronomical software and data, we are now releasing the alpha version of SpecSyβ€”an open-source, web-based spectroscopic workspace that includes several LiMe utilities. Try it here: https://specsy.streamlit.app/


πŸ“š Table of Contents#