SplatalogueClass

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

Bases: astroquery.query.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([restr, 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://www.cv.nrao.edu/php/splat/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(restr=None, reflags=0)[source]

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

Parameters:
restr : str

String to compile into an re, if specified. Searches table for species whose names match

reflags : int

Flags to pass to re.

Examples

>>> import re
>>> import pprint # unfortunate hack required for documentation testing
>>> rslt = Splatalogue.get_species_ids('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',
 '0348 D2C18O - Formaldehyde': '21140'}
>>> rslt = Splatalogue.get_species_ids('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(' H2CO ')
{'03023 H2CO - Formaldehyde': '194'}
>>> Splatalogue.get_species_ids(' h2co ', 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_frequency : astropy.units

Minimum frequency (or any spectral() equivalent)

max_frequency : astropy.units

Maximum frequency (or any spectral() equivalent)

band : str

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_name : str

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_locally : bool

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_flags : int

See the re module

energy_min : None or float

Energy range to include. See energy_type

energy_max : None 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_limit : None or float

Lower limit on the intensity. See intensity_type

intensity_type : None or 'sij', 'cdms_jpl', 'aij'

The type of intensity on which to place a lower limit

transition : str

e.g. 1-0

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

Data version

exclude : list

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_NRAO_recommended : bool

Show only NRAO recommended species?

line_lists : list

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

line_strengths : list
  • CDMS/JPL Intensity : ls1
  • Sij : ls3
  • Aij : ls4
  • Lovas/AST : ls5
energy_levels : list
  • E_lower (cm^-1) : el1
  • E_lower (K) : el2
  • E_upper (cm^-1) : el3
  • E_upper (K) : el4
export : bool

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

export_limit : int

Maximum number of lines in output file

noHFS : bool

No HFS Display

displayHFS : bool

Display HFS Intensity

show_unres_qn : bool

Display Unresolved Quantum Numbers

show_upper_degeneracy : bool

Display Upper State Degeneracy

show_molecule_tag : bool

Display Molecule Tag

show_qn_code : bool

Display Quantum Number Code

show_lovas_labref : bool

Display Lab Ref

show_lovas_obsref : bool

Display Obs Ref

show_orderedfreq_only : bool

Display Ordered Frequency ONLY

show_nrao_recommended : bool

Display NRAO Recommended Frequencies

Returns:
table : A 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_frequency : astropy.units

Minimum frequency (or any spectral() equivalent)

max_frequency : astropy.units

Maximum frequency (or any spectral() equivalent)

band : str

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_name : str

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_locally : bool

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_flags : int

See the re module

energy_min : None or float

Energy range to include. See energy_type

energy_max : None 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_limit : None or float

Lower limit on the intensity. See intensity_type

intensity_type : None or 'sij', 'cdms_jpl', 'aij'

The type of intensity on which to place a lower limit

transition : str

e.g. 1-0

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

Data version

exclude : list

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_NRAO_recommended : bool

Show only NRAO recommended species?

line_lists : list

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

line_strengths : list
  • CDMS/JPL Intensity : ls1
  • Sij : ls3
  • Aij : ls4
  • Lovas/AST : ls5
energy_levels : list
  • E_lower (cm^-1) : el1
  • E_lower (K) : el2
  • E_upper (cm^-1) : el3
  • E_upper (K) : el4
export : bool

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

export_limit : int

Maximum number of lines in output file

noHFS : bool

No HFS Display

displayHFS : bool

Display HFS Intensity

show_unres_qn : bool

Display Unresolved Quantum Numbers

show_upper_degeneracy : bool

Display Upper State Degeneracy

show_molecule_tag : bool

Display Molecule Tag

show_qn_code : bool

Display Quantum Number Code

show_lovas_labref : bool

Display Lab Ref

show_lovas_obsref : bool

Display Obs Ref

show_orderedfreq_only : bool

Display Ordered Frequency ONLY

show_nrao_recommended : bool

Display NRAO Recommended Frequencies

Returns:
response : requests.Response

The response of the HTTP request.

set_default_options(**kwargs)[source]

Modify the default options. See query_lines