LAMDA Queries (astroquery.lamda)

Getting started

The Leiden Atomic and Molecular Database (LAMDA) stores information for energy levels, radiative transitions, and collisional rates for many astrophysically relevant atoms and molecules. To print the list of available molecules for query, use:

>>> from astroquery.lamda import Lamda
>>> Lamda.molecule_dict  
{'catom': '',
'c+': '',
'c+@uv': '',
'o-nh2d': ''}

The dictionary is created dynamically from the LAMDA website the first time it is called, then cached for future use. If there has been an update and you want to reload the cache, clear the cache and remove the molecule dictionary as follows:

>>> from astroquery.lamda import Lamda
>>> import os
>>> Lamda.clear_cache()
>>> os.remove(Lamda.moldict_path)

If this function is unavailable, upgrade your version of astroquery. The clear_cache function was introduced in version 0.4.7.dev8479.

You can query for any molecule in that dictionary.

>>> collrates, radtransitions, enlevels = Lamda.query(mol='co')

Catalogs are returned as Table instances, except for collrates, which is a dictionary of tables, with one table for each collisional partner.


astroquery.lamda Package

LAMDA Query Tool


Brian Svoboda (

This package is for querying the Leiden Atomic and Molecular Database (LAMDA) hosted at:


If you use the data files from LAMDA in your research work please refer to the publication by Schoier, F.L., van der Tak, F.F.S., van Dishoeck E.F., Black, J.H. 2005, A&A 432, 369-379. When individual molecules are considered, references to the original papers providing the spectroscopic and collisional data are encouraged.



Read a datafile that follows the format adopted for the atomic and molecular data in the LAMDA database.

write_lamda_datafile(filename, tables)

Write tuple of tables with LAMDA data into a datafile that follows the format adopted for the LAMDA database.