SplatalogueClass

class astroquery.splatalogue.SplatalogueClass(**kwargs)[source]

Bases: BaseQuery

Initialize a Splatalogue query class with default arguments set. Frequency specification is required for every query, but any default keyword arguments (see query_lines) can be overridden here.

Attributes Summary

ALL_LINE_LISTS

FREQUENCY_BANDS

LINES_LIMIT

QUERY_URL

SLAP_URL

TIMEOUT

TOP20_LIST

versions

Methods Summary

get_fixed_table(*[, columns])

Convenience function to get the table with html column names made human readable.

get_species_ids([species_regex, reflags, ...])

Get a dictionary of "species" IDs, where species refers to the molecule name, mass, and chemical composition.

query_lines(*args, **kwargs)

Queries the service and returns a table object.

query_lines_async([min_frequency, ...])

The Splatalogue service returns lines with rest frequencies in the range [min_frequency, max_frequency].

set_default_options(**kwargs)

Modify the default options.

Attributes Documentation

ALL_LINE_LISTS = ('Lovas', 'SLAIM', 'JPL', 'CDMS', 'ToyoMA', 'OSU', 'Recomb', 'Lisa', 'RFI')
FREQUENCY_BANDS = {'alma10': 'ALMA Band 10 (787-950 GHz)', 'alma3': 'ALMA Band 3 (84-116 GHz)', 'alma4': ' ALMA Band 4 (125-163 GHz)', 'alma5': ' ALMA Band 5 (163-211 GHz)', 'alma6': 'ALMA Band 6 (211-275 GHz)', 'alma7': 'ALMA Band 7 (275-373 GHz)', 'alma8': 'ALMA Band 8 (385-500 GHz)', 'alma9': 'ALMA Band 9 (602-720 GHz)', 'any': 'Any', 'c': 'GBT/VLA C (3.9-8 GHz)', 'k': 'VLA K (18-26.5 GHz)', 'ka': ' GBT/VLA Ka (26-40 GHz)', 'kfpa': 'GBT KFPA (18-27.5 GHz)', 'ku': ' GBT/VLA Ku (12-18 GHz)', 'l': 'GBT/VLA L (1-2 GHz)', 'mustang': 'GBT Mustang (80-100 GHz)', 'pf1': 'GBT PF1 (0.29-0.92 GHz)', 'pf2': 'GBT PF2 (0.91-1.23 GHz)', 'q': 'GBT/VLA Q (38-50 GHz)', 's': 'GBT/VLA S (1.7-4 GHz)', 'w': 'GBT W (67-93.3 GHz)', 'x': 'GBT/VLA X (8-12 GHz)'}
LINES_LIMIT = 1000
QUERY_URL = 'https://splatalogue.online/c_export.php'
SLAP_URL = 'https://find.nrao.edu/splata-slap/slap'
TIMEOUT = 60
TOP20_LIST = ('comet', 'planet', 'top20', 'ism_hotcore', 'ism_darkcloud', 'ism_diffusecloud')
versions = ('v1.0', 'v2.0', 'v3.0', 'vall')

Methods Documentation

get_fixed_table(*, columns=None)[source]

Convenience function to get the table with html column names made human readable. It returns only the columns identified with the columns keyword. See the source for the defaults.

get_species_ids(species_regex=None, *, reflags=0, recache=False)[source]

Get a dictionary of “species” IDs, where species refers to the molecule name, mass, and chemical composition.

Parameters:
species_regexstr

String to search for among the species names, if specified. The string will be compiled into a regular expression using the python re module.

reflagsint

Flags to pass to re.

recachebool

Flag whether to refresh the local cache of species IDs

Examples

>>> import re
>>> import pprint # unfortunate hack required for documentation testing
>>> rslt = Splatalogue.get_species_ids(species_regex='Formaldehyde')
>>> pprint.pprint(rslt)
{'03023 H2CO - Formaldehyde': '194',
 '03106 H213CO - Formaldehyde': '324',
 '03107 HDCO - Formaldehyde': '109',
 '03108 H2C17O - Formaldehyde': '982',
 '03202 H2C18O - Formaldehyde': '155',
 '03203 D2CO - Formaldehyde': '94',
 '03204 HD13CO - Formaldehyde': '1219',
 '03301 D213CO - Formaldehyde': '1220',
 '03315 HDC18O - Formaldehyde': '21141',
 '03410 D2C18O - Formaldehyde': '21140'}
>>> rslt = Splatalogue.get_species_ids(species_regex='H2CO')
>>> pprint.pprint(rslt)
{'03023 H2CO - Formaldehyde': '194',
 '03109 H2COH+ - Hydroxymethylium ion': '224',
 '04406 c-H2COCH2 - Ethylene Oxide': '21',
 '06029 NH2CONH2 - Urea': '21166',
 '07510 H2NCH2COOH - I v=0 - Glycine': '389',
 '07511 H2NCH2COOH - I v=1 - Glycine': '1312',
 '07512 H2NCH2COOH - I v=2 - Glycine': '1313',
 '07513 H2NCH2COOH - II v=0 - Glycine': '262',
 '07514 H2NCH2COOH - II v=1 - Glycine': '1314',
 '07515 H2NCH2COOH - II v=2 - Glycine': '1315',
 '07517 NH2CO2CH3 v=0 - Methyl Carbamate': '1334',
 '07518 NH2CO2CH3 v=1 - Methyl Carbamate': '1335',
 '08902 CH3CHNH2COOH - I - α-Alanine': '1321',
 '08903 CH3CHNH2COOH - II - α-Alanine': '1322'}
>>> # note the whitespace, preventing H2CO within other
>>> # more complex molecules
>>> Splatalogue.get_species_ids(species_regex=' H2CO ')
{'03023 H2CO - Formaldehyde': '194'}
>>> Splatalogue.get_species_ids(species_regex=' h2co ', reflags=re.IGNORECASE)
{'03023 H2CO - Formaldehyde': '194'}
query_lines(*args, **kwargs)

Queries the service and returns a table object.

The Splatalogue service returns lines with rest frequencies in the range [min_frequency, max_frequency].

Parameters:
min_frequencyastropy.units

Minimum frequency (or any spectral() equivalent)

max_frequencyastropy.units

Maximum frequency (or any spectral() equivalent)

bandstr

The observing band. If it is not ‘any’, it overrides minfreq/maxfreq.

top20: str

One of 'comet', 'planet', 'top20', 'ism_hotcore', 'ism_darkcloud', 'ism_diffusecloud'. Overrides chemical_name

chemical_namestr

Name of the chemical to search for. Treated as a regular expression. An empty set (‘’, (), [], {}) will match any species. Examples:

'H2CO' - 13 species have H2CO somewhere in their formula.

'Formaldehyde' - There are 8 isotopologues of Formaldehyde

(e.g., H213CO).

'formaldehyde' - Thioformaldehyde,Cyanoformaldehyde.

'formaldehyde',chem_re_flags=re.I - Formaldehyde,thioformaldehyde,

and Cyanoformaldehyde.

' H2CO ' - Just 1 species, H2CO. The spaces prevent including

others.

parse_chemistry_locallybool

Attempt to determine the species ID #’s locally before sending the query? This will prevent queries that have no matching species. It also performs a more flexible regular expression match to the species IDs. See the examples in get_species_ids

chem_re_flagsint

See the re module

energy_minNone or float

Energy range to include. See energy_type

energy_maxNone or float

Energy range to include. See energy_type

energy_type'el_cm1', 'eu_cm1', 'eu_k', 'el_k'

Type of energy to restrict. L/U for lower/upper state energy, cm/K for inverse cm, i.e. wavenumber, or K for Kelvin

intensity_lower_limitNone or float

Lower limit on the intensity. See intensity_type

intensity_typeNone or 'sij', 'cdms_jpl', 'aij'

The type of intensity on which to place a lower limit

transitionstr

e.g. 1-0

version'v1.0', 'v2.0', 'v3.0' or 'vall'

Data version

excludelist

Types of lines to exclude. Default is: ('potential', 'atmospheric', 'probable') Can also exclude 'known'. To exclude nothing, use ‘none’, not the python object None, since the latter is meant to indicate ‘leave as default’

only_astronomically_observedbool

Show only astronomically observed species?

only_NRAO_recommendedbool

Show only NRAO recommended species?

line_listslist

Options: Lovas, SLAIM, JPL, CDMS, ToyoMA, OSU, Recomb, Lisa, RFI

line_strengthslist
  • CDMS/JPL Intensity : ls1

  • Sij : ls3

  • Aij : ls4

  • Lovas/AST : ls5

energy_levelslist
  • E_lower (cm^-1) : el1

  • E_lower (K) : el2

  • E_upper (cm^-1) : el3

  • E_upper (K) : el4

exportbool

Set up arguments for the export server (as opposed to the HTML server)?

export_limitint

Maximum number of lines in output file

noHFSbool

No HFS Display

displayHFSbool

Display HFS Intensity

show_unres_qnbool

Display Unresolved Quantum Numbers

show_upper_degeneracybool

Display Upper State Degeneracy

show_molecule_tagbool

Display Molecule Tag

show_qn_codebool

Display Quantum Number Code

show_lovas_labrefbool

Display Lab Ref

show_lovas_obsrefbool

Display Obs Ref

show_orderedfreq_onlybool

Display Ordered Frequency ONLY

show_nrao_recommendedbool

Display NRAO Recommended Frequencies

Returns:
tableA Table object.
query_lines_async(min_frequency=None, max_frequency=None, *, cache=True, **kwargs)[source]

The Splatalogue service returns lines with rest frequencies in the range [min_frequency, max_frequency].

Parameters:
min_frequencyastropy.units

Minimum frequency (or any spectral() equivalent)

max_frequencyastropy.units

Maximum frequency (or any spectral() equivalent)

bandstr

The observing band. If it is not ‘any’, it overrides minfreq/maxfreq.

top20: str

One of 'comet', 'planet', 'top20', 'ism_hotcore', 'ism_darkcloud', 'ism_diffusecloud'. Overrides chemical_name

chemical_namestr

Name of the chemical to search for. Treated as a regular expression. An empty set (‘’, (), [], {}) will match any species. Examples:

'H2CO' - 13 species have H2CO somewhere in their formula.

'Formaldehyde' - There are 8 isotopologues of Formaldehyde

(e.g., H213CO).

'formaldehyde' - Thioformaldehyde,Cyanoformaldehyde.

'formaldehyde',chem_re_flags=re.I - Formaldehyde,thioformaldehyde,

and Cyanoformaldehyde.

' H2CO ' - Just 1 species, H2CO. The spaces prevent including

others.

parse_chemistry_locallybool

Attempt to determine the species ID #’s locally before sending the query? This will prevent queries that have no matching species. It also performs a more flexible regular expression match to the species IDs. See the examples in get_species_ids

chem_re_flagsint

See the re module

energy_minNone or float

Energy range to include. See energy_type

energy_maxNone or float

Energy range to include. See energy_type

energy_type'el_cm1', 'eu_cm1', 'eu_k', 'el_k'

Type of energy to restrict. L/U for lower/upper state energy, cm/K for inverse cm, i.e. wavenumber, or K for Kelvin

intensity_lower_limitNone or float

Lower limit on the intensity. See intensity_type

intensity_typeNone or 'sij', 'cdms_jpl', 'aij'

The type of intensity on which to place a lower limit

transitionstr

e.g. 1-0

version'v1.0', 'v2.0', 'v3.0' or 'vall'

Data version

excludelist

Types of lines to exclude. Default is: ('potential', 'atmospheric', 'probable') Can also exclude 'known'. To exclude nothing, use ‘none’, not the python object None, since the latter is meant to indicate ‘leave as default’

only_astronomically_observedbool

Show only astronomically observed species?

only_NRAO_recommendedbool

Show only NRAO recommended species?

line_listslist

Options: Lovas, SLAIM, JPL, CDMS, ToyoMA, OSU, Recomb, Lisa, RFI

line_strengthslist
  • CDMS/JPL Intensity : ls1

  • Sij : ls3

  • Aij : ls4

  • Lovas/AST : ls5

energy_levelslist
  • E_lower (cm^-1) : el1

  • E_lower (K) : el2

  • E_upper (cm^-1) : el3

  • E_upper (K) : el4

exportbool

Set up arguments for the export server (as opposed to the HTML server)?

export_limitint

Maximum number of lines in output file

noHFSbool

No HFS Display

displayHFSbool

Display HFS Intensity

show_unres_qnbool

Display Unresolved Quantum Numbers

show_upper_degeneracybool

Display Upper State Degeneracy

show_molecule_tagbool

Display Molecule Tag

show_qn_codebool

Display Quantum Number Code

show_lovas_labrefbool

Display Lab Ref

show_lovas_obsrefbool

Display Obs Ref

show_orderedfreq_onlybool

Display Ordered Frequency ONLY

show_nrao_recommendedbool

Display NRAO Recommended Frequencies

Returns:
responserequests.Response

The response of the HTTP request.

set_default_options(**kwargs)[source]

Modify the default options. See query_lines