MastMissionsClass

class astroquery.mast.MastMissionsClass(*, mission='hst', service='search')[source]

Bases: astroquery.mast.core.MastQueryWithLogin

MastMissions search class. Class that allows direct programatic access to retrieve metadata via the MAST search API for a given mission.

Methods Summary

__call__(*args, **kwargs)

init a fresh copy of self

authenticated()

disable_cloud_dataset()

Disables downloading public files from S3 instead of MAST

enable_cloud_dataset([provider, profile, ...])

Enable downloading public files from S3 instead of MAST.

get_column_list()

For a mission, return a list of all searchable columns and their descriptions

login([token, store_token, reenter_token])

Log into the MAST portal.

logout()

Log out of current MAST session.

query_criteria(*args, **kwargs)

Queries the service and returns a table object.

query_criteria_async(*[, coordinates, ...])

Given a set of search criteria, returns a list of mission metadata.

query_object(*args, **kwargs)

Queries the service and returns a table object.

query_object_async(objectname, *[, radius, ...])

Given an object name, returns a list of matching rows.

query_region(*args, **kwargs)

Queries the service and returns a table object.

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

Given a sky position and radius, returns a list of matching dataset IDs.

resolve_object(objectname)

Resolves an object name to a position on the sky.

session_info([verbose])

Displays information about current MAST user, and returns user info dictionary.

Methods Documentation

__call__(*args, **kwargs)

init a fresh copy of self

authenticated()
disable_cloud_dataset()

Disables downloading public files from S3 instead of MAST

enable_cloud_dataset(provider='AWS', profile=None, verbose=True)

Enable downloading public files from S3 instead of MAST. Requires the boto3 library to function.

Parameters
providerstr

Which cloud data provider to use. We may in the future support multiple providers, though at the moment this argument is ignored.

profilestr

Profile to use to identify yourself to the cloud provider (usually in ~/.aws/config).

verbosebool

Default True. Logger to display extra info and warning.

get_column_list()[source]

For a mission, return a list of all searchable columns and their descriptions

Returns
responseTable that contains columns names, types and their descriptions
login(token=None, store_token=False, reenter_token=False)

Log into the MAST portal.

Parameters
tokenstring, optional

Default is None. The token to authenticate the user. This can be generated at https://auth.mast.stsci.edu/token?suggested_name=Astroquery&suggested_scope=mast:exclusive_access. If not supplied, it will be prompted for if not in the keyring or set via $MAST_API_TOKEN

store_tokenbool, optional

Default False. If true, MAST token will be stored securely in your keyring.

reenter_tokenbool, optional

Default False. Asks for the token even if it is already stored in the keyring or $MAST_API_TOKEN environment variable. This is the way to overwrite an already stored password on the keyring.

logout()

Log out of current MAST session.

query_criteria(*args, **kwargs)

Queries the service and returns a table object.

Given a set of search criteria, returns a list of mission metadata.

Parameters
coordinatesstr or coordinates object

The target around which to search. It may be specified as a string or as the appropriate coordinates object.

objectnamestr

The name of the target around which to search.

radiusstr or Quantity object, optional

Default 3 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 3 arcminutes.

limitint

Optional and default is 5000. the maximun number of dataset IDs in the results.

offsetint

Optional and default is 0. the number of records you wish to skip before selecting records.

select_cols: list

names of columns that will be included in the astropy table

**criteria

Criteria to apply. At least one non-positional criteria must be supplied. Valid criteria are coordinates, objectname, radius (as in query_region and query_object functions), and all fields listed in the column documentation for the mission being queried. Any invalid keys passed in criteria are ignored by the API. List of all valid fields that can be used to match results on criteria can be retrieved by calling get_column_list function.

Returns
tableA Table object.
query_criteria_async(*, coordinates=None, objectname=None, radius=<Quantity 3. arcmin>, limit=5000, offset=0, select_cols=[], **criteria)[source]

Given a set of search criteria, returns a list of mission metadata.

Parameters
coordinatesstr or coordinates object

The target around which to search. It may be specified as a string or as the appropriate coordinates object.

objectnamestr

The name of the target around which to search.

radiusstr or Quantity object, optional

Default 3 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 3 arcminutes.

limitint

Optional and default is 5000. the maximun number of dataset IDs in the results.

offsetint

Optional and default is 0. the number of records you wish to skip before selecting records.

select_cols: list

names of columns that will be included in the astropy table

**criteria

Criteria to apply. At least one non-positional criteria must be supplied. Valid criteria are coordinates, objectname, radius (as in query_region and query_object functions), and all fields listed in the column documentation for the mission being queried. Any invalid keys passed in criteria are ignored by the API. List of all valid fields that can be used to match results on criteria can be retrieved by calling get_column_list function.

Returns
responselist of Response
query_object(*args, **kwargs)

Queries the service and returns a table object.

Given an object name, returns a list of matching rows.

Parameters
objectnamestr

The name of the target around which to search.

radiusstr or Quantity object, optional

Default 3 arcmin. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 3 arcminutes.

limitint

Optional and default is 5000. the maximun number of dataset IDs in the results.

offsetint

Optional and default is 0. the number of records you wish to skip before selecting records.

**kwargs

Mission-specific keyword args. Any invalid keys are ignored by the API. All valid keys can be found by calling get_column_list function.

Returns
tableA Table object.
query_object_async(objectname, *, radius=<Quantity 3. arcmin>, limit=5000, offset=0, **kwargs)[source]

Given an object name, returns a list of matching rows.

Parameters
objectnamestr

The name of the target around which to search.

radiusstr or Quantity object, optional

Default 3 arcmin. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 3 arcminutes.

limitint

Optional and default is 5000. the maximun number of dataset IDs in the results.

offsetint

Optional and default is 0. the number of records you wish to skip before selecting records.

**kwargs

Mission-specific keyword args. Any invalid keys are ignored by the API. All valid keys can be found by calling get_column_list function.

Returns
responselist of Response
query_region(*args, **kwargs)

Queries the service and returns a table object.

Given a sky position and radius, returns a list of matching dataset IDs.

Parameters
coordinatesstr or coordinates object

The target around which to search. It may be specified as a string or as the appropriate coordinates object.

radiusstr or Quantity object, optional

Default 3 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 3 arcminutes.

limitint

Optional and default is 5000. the maximun number of dataset IDs in the results.

offsetint

Optional and default is 0 the number of records you wish to skip before selecting records.

**kwargs

Other mission-specific keyword args. Any invalid keys are ignored by the API. All valid key names can be found using get_column_list function. For example one can specify the output columns(select_cols) or use other filters(conditions)

Returns
tableA Table object.
query_region_async(coordinates, *, radius=<Quantity 3. arcmin>, limit=5000, offset=0, **kwargs)[source]

Given a sky position and radius, returns a list of matching dataset IDs.

Parameters
coordinatesstr or coordinates object

The target around which to search. It may be specified as a string or as the appropriate coordinates object.

radiusstr or Quantity object, optional

Default 3 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 3 arcminutes.

limitint

Optional and default is 5000. the maximun number of dataset IDs in the results.

offsetint

Optional and default is 0 the number of records you wish to skip before selecting records.

**kwargs

Other mission-specific keyword args. Any invalid keys are ignored by the API. All valid key names can be found using get_column_list function. For example one can specify the output columns(select_cols) or use other filters(conditions)

Returns
responselist of Response
resolve_object(objectname)

Resolves an object name to a position on the sky.

Parameters
objectnamestr

Name of astronomical object to resolve.

Returns
responseSkyCoord

The sky position of the given object.

session_info(verbose=True)

Displays information about current MAST user, and returns user info dictionary.

Parameters
verbosebool, optional

Default True. Set to False to suppress output to stdout.

Returns
responsedict