NraoClass

class astroquery.nrao.NraoClass[source]

Bases: QueryWithLogin

Attributes Summary

DATA_URL

TIMEOUT

USERNAME

obs_bands

subarrays

telescope_code

telescope_config

Methods Summary

login([username, store_password, ...])

Login to the NRAO archive

query(*args, **kwargs)

Queries the service and returns a table object.

query_async([get_query_payload, cache, retry])

Queries the NRAO data archive and fetches table of observation summaries.

query_region(*args, **kwargs)

Queries the service and returns a table object.

query_region_async(coordinates[, radius, ...])

Queries the NRAO data archive and fetches table of observation summaries.

Attributes Documentation

DATA_URL = 'https://archive.nrao.edu/archive/ArchiveQuery'
TIMEOUT = 60
USERNAME = ''
obs_bands = ['ALL', 'ALL', '4', 'P', 'L', 'S', 'C', 'X', 'U', 'K', 'KA', 'Q', 'W']
subarrays = ['ALL', 1, 2, 3, 4, 5]
telescope_code = {'all': 'ALL', 'gbt': 'GBT', 'historical_vla': 'VLA', 'jansky_vla': 'EVLA', 'vlba': 'VLBA'}
telescope_config = ['ALL', 'A', 'AB', 'BNA', 'B', 'BC', 'CNB', 'C', 'CD', 'DNC', 'D', 'DA']

Methods Documentation

login(username=None, store_password=False, reenter_password=False)

Login to the NRAO archive

Parameters:
usernamestr, optional

Username to the NRAO archive. If not given, it should be specified in the config file.

store_passwordbool, optional

Stores the password securely in your keyring. Default is False.

reenter_passwordbool, optional

Asks for the password even if it is already stored in the keyring. This is the way to overwrite an already stored passwork on the keyring. Default is False.

query(*args, **kwargs)

Queries the service and returns a table object.

Queries the NRAO data archive and fetches table of observation summaries.

Parameters:
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate astropy.coordinates object. ICRS coordinates may also be entered as a string.

radiusstr or Quantity object, optional

The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object may also be used. Defaults to 1 arcminute.

equinoxstr, optional

One of ‘J2000’ or ‘B1950’. Defaults to ‘J2000’.

telescopestr, optional

The telescope that produced the data. Defaults to ‘all’. Valid values are: [‘gbt’, ‘all’, ‘historical_vla’, ‘vlba’, ‘jansky_vla’]

start_datestr, optional

The starting date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

end_datestr, optional

The ending date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

freq_lowQuantity object, optional

The lower frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

freq_upQuantity object, optional

The upper frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

telescope_configstr, optional

Select the telescope configuration (only valid for VLA array). Defaults to ‘all’. Valid values are [‘all’, ‘A’, ‘AB’, ‘BnA’, ‘B’, ‘BC’, ‘CnB’, ‘C’, ‘CD’, ‘DnC’, ‘D’, ‘DA’]

obs_bandstr, optional

The frequency bands for the observation. Defaults to ‘all’. Valid values are [‘all’, ‘4’, ‘P’, ‘L’, ‘S’, ‘C’, ‘X’, ‘U’, ‘K’, ‘Ka’, ‘Q’, ‘W’].

sub_arraystr, number, optional

VLA subarray designations, may be set to an integer from 1 to 5. Defaults to ‘all’.

project_codestr, optional

A string indicating the project code. Examples:

* GBT: AGBT12A_055
* JVLA: 12A-256
querytypestr

The type of query to perform. “OBSSUMMARY” is the default, but it is only valid for VLA/VLBA observations. ARCHIVE will give the list of files available for download. OBSERVATION will provide full details of the sources observed and under what configurations.

source_idstr, optional

A source name (to be parsed by SIMBAD or NED)

protocol‘VOTable-XML’ or ‘HTML’

The type of table to return. In theory, this should not matter, but in practice the different table types actually have different content. For querytype='ARCHIVE', the protocol will be force to HTML because the archive doesn’t support votable returns for archive queries.

get_query_payloadbool, optional

if set to True then returns the dictionary sent as the HTTP request. Defaults to False

cachebool

Cache the query results

retrybool or int

The number of times to retry querying the server if it doesn’t raise an exception but returns a null result (this sort of behavior seems unique to the NRAO archive)

Returns:
tableA Table object.
query_async(get_query_payload=False, cache=True, retry=False, **kwargs)[source]

Queries the NRAO data archive and fetches table of observation summaries.

Parameters:
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate astropy.coordinates object. ICRS coordinates may also be entered as a string.

radiusstr or Quantity object, optional

The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object may also be used. Defaults to 1 arcminute.

equinoxstr, optional

One of ‘J2000’ or ‘B1950’. Defaults to ‘J2000’.

telescopestr, optional

The telescope that produced the data. Defaults to ‘all’. Valid values are: [‘gbt’, ‘all’, ‘historical_vla’, ‘vlba’, ‘jansky_vla’]

start_datestr, optional

The starting date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

end_datestr, optional

The ending date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

freq_lowQuantity object, optional

The lower frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

freq_upQuantity object, optional

The upper frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

telescope_configstr, optional

Select the telescope configuration (only valid for VLA array). Defaults to ‘all’. Valid values are [‘all’, ‘A’, ‘AB’, ‘BnA’, ‘B’, ‘BC’, ‘CnB’, ‘C’, ‘CD’, ‘DnC’, ‘D’, ‘DA’]

obs_bandstr, optional

The frequency bands for the observation. Defaults to ‘all’. Valid values are [‘all’, ‘4’, ‘P’, ‘L’, ‘S’, ‘C’, ‘X’, ‘U’, ‘K’, ‘Ka’, ‘Q’, ‘W’].

sub_arraystr, number, optional

VLA subarray designations, may be set to an integer from 1 to 5. Defaults to ‘all’.

project_codestr, optional

A string indicating the project code. Examples:

* GBT: AGBT12A_055
* JVLA: 12A-256
querytypestr

The type of query to perform. “OBSSUMMARY” is the default, but it is only valid for VLA/VLBA observations. ARCHIVE will give the list of files available for download. OBSERVATION will provide full details of the sources observed and under what configurations.

source_idstr, optional

A source name (to be parsed by SIMBAD or NED)

protocol‘VOTable-XML’ or ‘HTML’

The type of table to return. In theory, this should not matter, but in practice the different table types actually have different content. For querytype='ARCHIVE', the protocol will be force to HTML because the archive doesn’t support votable returns for archive queries.

get_query_payloadbool, optional

if set to True then returns the dictionary sent as the HTTP request. Defaults to False

cachebool

Cache the query results

retrybool or int

The number of times to retry querying the server if it doesn’t raise an exception but returns a null result (this sort of behavior seems unique to the NRAO archive)

Returns:
responseResponse

The HTTP response returned from the service.

query_region(*args, **kwargs)

Queries the service and returns a table object.

Queries the NRAO data archive and fetches table of observation summaries.

Parameters:
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate astropy.coordinates object. ICRS coordinates may also be entered as a string.

radiusstr or Quantity object, optional

The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object may also be used. Defaults to 1 arcminute.

equinoxstr, optional

One of ‘J2000’ or ‘B1950’. Defaults to ‘J2000’.

telescopestr, optional

The telescope that produced the data. Defaults to ‘all’. Valid values are: [‘gbt’, ‘all’, ‘historical_vla’, ‘vlba’, ‘jansky_vla’]

start_datestr, optional

The starting date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

end_datestr, optional

The ending date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

freq_lowQuantity object, optional

The lower frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

freq_upQuantity object, optional

The upper frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

telescope_configstr, optional

Select the telescope configuration (only valid for VLA array). Defaults to ‘all’. Valid values are [‘all’, ‘A’, ‘AB’, ‘BnA’, ‘B’, ‘BC’, ‘CnB’, ‘C’, ‘CD’, ‘DnC’, ‘D’, ‘DA’]

obs_bandstr, optional

The frequency bands for the observation. Defaults to ‘all’. Valid values are [‘all’, ‘4’, ‘P’, ‘L’, ‘S’, ‘C’, ‘X’, ‘U’, ‘K’, ‘Ka’, ‘Q’, ‘W’].

sub_arraystr, number, optional

VLA subarray designations, may be set to an integer from 1 to 5. Defaults to ‘all’.

project_codestr, optional

A string indicating the project code. Examples:

* GBT: AGBT12A_055
* JVLA: 12A-256
querytypestr

The type of query to perform. “OBSSUMMARY” is the default, but it is only valid for VLA/VLBA observations. ARCHIVE will give the list of files available for download. OBSERVATION will provide full details of the sources observed and under what configurations.

source_idstr, optional

A source name (to be parsed by SIMBAD or NED)

protocol‘VOTable-XML’ or ‘HTML’

The type of table to return. In theory, this should not matter, but in practice the different table types actually have different content. For querytype='ARCHIVE', the protocol will be force to HTML because the archive doesn’t support votable returns for archive queries.

get_query_payloadbool, optional

if set to True then returns the dictionary sent as the HTTP request. Defaults to False

cachebool

Cache the query results

retrybool or int

The number of times to retry querying the server if it doesn’t raise an exception but returns a null result (this sort of behavior seems unique to the NRAO archive)

Returns:
tableA Table object.
query_region_async(coordinates, radius=<Quantity 1. arcmin>, equinox='J2000', telescope='all', start_date='', end_date='', freq_low=None, freq_up=None, telescope_config='all', obs_band='all', querytype='OBSSUMMARY', sub_array='all', project_code=None, protocol='VOTable-XML', retry=False, get_query_payload=False, cache=True)[source]

Queries the NRAO data archive and fetches table of observation summaries.

Parameters:
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate astropy.coordinates object. ICRS coordinates may also be entered as a string.

radiusstr or Quantity object, optional

The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object may also be used. Defaults to 1 arcminute.

equinoxstr, optional

One of ‘J2000’ or ‘B1950’. Defaults to ‘J2000’.

telescopestr, optional

The telescope that produced the data. Defaults to ‘all’. Valid values are: [‘gbt’, ‘all’, ‘historical_vla’, ‘vlba’, ‘jansky_vla’]

start_datestr, optional

The starting date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

end_datestr, optional

The ending date and time of the observations , e.g. 2010-06-21 14:20:30 Decimal seconds are not allowed. Defaults to None for no constraints.

freq_lowQuantity object, optional

The lower frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

freq_upQuantity object, optional

The upper frequency of the observations in proper units of frequency via astropy.units. Defaults to None for no constraints.

telescope_configstr, optional

Select the telescope configuration (only valid for VLA array). Defaults to ‘all’. Valid values are [‘all’, ‘A’, ‘AB’, ‘BnA’, ‘B’, ‘BC’, ‘CnB’, ‘C’, ‘CD’, ‘DnC’, ‘D’, ‘DA’]

obs_bandstr, optional

The frequency bands for the observation. Defaults to ‘all’. Valid values are [‘all’, ‘4’, ‘P’, ‘L’, ‘S’, ‘C’, ‘X’, ‘U’, ‘K’, ‘Ka’, ‘Q’, ‘W’].

sub_arraystr, number, optional

VLA subarray designations, may be set to an integer from 1 to 5. Defaults to ‘all’.

project_codestr, optional

A string indicating the project code. Examples:

* GBT: AGBT12A_055
* JVLA: 12A-256
querytypestr

The type of query to perform. “OBSSUMMARY” is the default, but it is only valid for VLA/VLBA observations. ARCHIVE will give the list of files available for download. OBSERVATION will provide full details of the sources observed and under what configurations.

source_idstr, optional

A source name (to be parsed by SIMBAD or NED)

protocol‘VOTable-XML’ or ‘HTML’

The type of table to return. In theory, this should not matter, but in practice the different table types actually have different content. For querytype='ARCHIVE', the protocol will be force to HTML because the archive doesn’t support votable returns for archive queries.

get_query_payloadbool, optional

if set to True then returns the dictionary sent as the HTTP request. Defaults to False

cachebool

Cache the query results

retrybool or int

The number of times to retry querying the server if it doesn’t raise an exception but returns a null result (this sort of behavior seems unique to the NRAO archive)

Returns:
responseResponse

The HTTP response returned from the service.