CDMSClass

class astroquery.linelists.cdms.CDMSClass[source]

Bases: astroquery.query.BaseQuery

Attributes Summary

TIMEOUT

URL

Methods Summary

get_species_table([catfile])

A directory of the catalog is found in a file called 'catdir.cat.'

query_lines(*args, **kwargs)

Queries the service and returns a table object.

query_lines_async(min_frequency, ...[, ...])

Creates an HTTP POST request based on the desired parameters and returns a response.

Attributes Documentation

TIMEOUT = 60
URL = 'https://cdms.astro.uni-koeln.de/cgi-bin/cdmssearch'

Methods Documentation

get_species_table(catfile='catdir.cat')[source]

A directory of the catalog is found in a file called ‘catdir.cat.’

The table is derived from https://cdms.astro.uni-koeln.de/classic/entries/partition_function.html

Parameters
catfilestr, name of file, default ‘catdir.cat’

The catalog file, installed locally along with the package

Returns
Table: Table
tag : The species tag or molecular identifier.
molecule : An ASCII name for the species.
#line : The number of lines in the catalog.
lg(Q(n)) : A seven-element vector containing the base 10 logarithm of the partition function.
query_lines(*args, **kwargs)

Queries the service and returns a table object.

Creates an HTTP POST request based on the desired parameters and returns a response.

Parameters
min_frequencyastropy.units.Quantity or None

Minimum frequency (or any spectral() equivalent). None can be interpreted as zero.

max_frequencyastropy.units.Quantity or None

Maximum frequency (or any spectral() equivalent). None can be interpreted as infinite.

min_strengthint, optional

Minimum strength in catalog units, the default is -500

moleculelist, string of regex if parse_name_locally=True, optional

Identifiers of the molecules to search for. If this parameter is not provided the search will match any species. Default is ‘All’.

temperature_for_intensityfloat

The temperature to use when computing the intensity Smu^2. Set to 300 by default for compatibility with JPL and the native catalog format, which defaults to 300. ** If temperature is set to zero, the return value in this column will be the Einstein A value **

flagsint, optional

Regular expression flags. Default is set to 0

parse_name_locallybool, optional

When set to True it allows the method to parse through catdir.cat (see get_species_table) in order to match the regex inputted in the molecule parameter and request the corresponding tags of the matches instead. Default is set to False

get_query_payloadbool, optional

When set to True the method should return the HTTP request parameters as a dict. Default value is set to False

cachebool

Cache the request and, for repeat identical requests, reuse the cache?

Returns
tableA Table object.

Examples

>>> table = CDMS.query_lines(min_frequency=100*u.GHz,
...                          max_frequency=110*u.GHz,
...                          min_strength=-500,
...                          molecule="018505 H2O+") 
>>> print(table) 
    FREQ     ERR   LGINT   DR   ELO    GUP  TAG  QNFMT  Ju  Ku  vu  Jl  Kl  vl      F      name
    MHz      MHz  MHz nm2      1 / cm
----------- ----- ------- --- -------- --- ----- ----- --- --- --- --- --- --- ----------- ----
103614.4941 2.237 -4.1826   3 202.8941   8 18505  2356   4   1   4   4   0   4 3 2 1 3 0 3 H2O+
107814.8763 148.6 -5.4438   3 878.1191  12 18505  2356   6   5   1   7   1   6 7 4 4 8 1 7 H2O+
107822.3481 148.6 -5.3846   3 878.1178  14 18505  2356   6   5   1   7   1   7 7 4 4 8 1 8 H2O+
107830.1216 148.6 -5.3256   3 878.1164  16 18505  2356   6   5   1   7   1   8 7 4 4 8 1 9 H2O+
query_lines_async(min_frequency, max_frequency, *, min_strength=- 500, molecule='All', temperature_for_intensity=300, flags=0, parse_name_locally=False, get_query_payload=False, cache=True)[source]

Creates an HTTP POST request based on the desired parameters and returns a response.

Parameters
min_frequencyastropy.units.Quantity or None

Minimum frequency (or any spectral() equivalent). None can be interpreted as zero.

max_frequencyastropy.units.Quantity or None

Maximum frequency (or any spectral() equivalent). None can be interpreted as infinite.

min_strengthint, optional

Minimum strength in catalog units, the default is -500

moleculelist, string of regex if parse_name_locally=True, optional

Identifiers of the molecules to search for. If this parameter is not provided the search will match any species. Default is ‘All’.

temperature_for_intensityfloat

The temperature to use when computing the intensity Smu^2. Set to 300 by default for compatibility with JPL and the native catalog format, which defaults to 300. ** If temperature is set to zero, the return value in this column will be the Einstein A value **

flagsint, optional

Regular expression flags. Default is set to 0

parse_name_locallybool, optional

When set to True it allows the method to parse through catdir.cat (see get_species_table) in order to match the regex inputted in the molecule parameter and request the corresponding tags of the matches instead. Default is set to False

get_query_payloadbool, optional

When set to True the method should return the HTTP request parameters as a dict. Default value is set to False

cachebool

Cache the request and, for repeat identical requests, reuse the cache?

Returns
responserequests.Response

The HTTP response returned from the service.

Examples

>>> table = CDMS.query_lines(min_frequency=100*u.GHz,
...                          max_frequency=110*u.GHz,
...                          min_strength=-500,
...                          molecule="018505 H2O+") 
>>> print(table) 
    FREQ     ERR   LGINT   DR   ELO    GUP  TAG  QNFMT  Ju  Ku  vu  Jl  Kl  vl      F      name
    MHz      MHz  MHz nm2      1 / cm
----------- ----- ------- --- -------- --- ----- ----- --- --- --- --- --- --- ----------- ----
103614.4941 2.237 -4.1826   3 202.8941   8 18505  2356   4   1   4   4   0   4 3 2 1 3 0 3 H2O+
107814.8763 148.6 -5.4438   3 878.1191  12 18505  2356   6   5   1   7   1   6 7 4 4 8 1 7 H2O+
107822.3481 148.6 -5.3846   3 878.1178  14 18505  2356   6   5   1   7   1   7 7 4 4 8 1 8 H2O+
107830.1216 148.6 -5.3256   3 878.1164  16 18505  2356   6   5   1   7   1   8 7 4 4 8 1 9 H2O+