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
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 = ('LovasNIST', 'SLAIM', 'JPL', 'CDMS', 'ToyaMA', 'OSU', 'TopModel', 'Recombination', 'RFI')¶
- LINES_LIMIT = 1000¶
- QUERY_URL = 'https://splatalogue.online/splata-slap/advanceded/false'¶
- SLAP_URL = 'https://find.nrao.edu/splata-slap/slap'¶
- TIMEOUT = 60¶
- VALID_ENERGY_LEVELS = {'Four': 'EU_K', 'One': 'EL_cm-1', 'Three': 'EU_cm-1', 'Two': 'EL_K'}¶
- VALID_ENERGY_TYPES = ('el_cm1', 'eu_cm1', 'eu_k', 'el_k')¶
- VALID_INTENSITY_TYPES = ('CDMS/JPL (log)', 'Sij-mu2', 'Aij (log)')¶
- VALID_LINE_STRENGTHS = ('CDMSJPL', 'SijMu2', 'Sij', 'Aij', 'LovasAST')¶
- 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:
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_frequency
astropy.units
Minimum frequency (or any spectral() equivalent)
- max_frequency
astropy.units
Maximum frequency (or any spectral() equivalent)
- 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 includingothers.
- 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_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
- 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, ToyaMA, OSU, Recombination, RFI
- line_strengthslist
CDMS/JPL Intensity : ls1
Sij : ls3
Aij : ls4
Lovas/AST : ls5
- energy_levelslist
E_lower (cm^-1) : “One”
E_lower (K) : “Two”
E_upper (cm^-1) : “Three”
E_upper (K) : “Four”
- 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
- min_frequency
- Returns:
- tableA
Table
object.
- tableA
- 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)
- 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 includingothers.
- 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_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
- 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, ToyaMA, OSU, Recombination, RFI
- line_strengthslist
CDMS/JPL Intensity : ls1
Sij : ls3
Aij : ls4
Lovas/AST : ls5
- energy_levelslist
E_lower (cm^-1) : “One”
E_lower (K) : “Two”
E_upper (cm^-1) : “Three”
E_upper (K) : “Four”
- 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
- min_frequency
- Returns:
- response
requests.Response
The response of the HTTP request.
- response
- set_default_options(**kwargs)[source]¶
Modify the default options. See
query_lines