ZcutClass

class astroquery.mast.ZcutClass[source]

Bases: astroquery.mast.core.MastQueryWithLogin

MAST ZCUT cutout query class.

Class for accessing deep field full-frame image cutouts.

Methods Summary

__call__(*args, **kwargs)

init a fresh copy of self

authenticated()

disable_cloud_dataset()

Disables downloading public files from S3 instead of MAST

download_cutouts(coordinates[, size, …])

Download cutout FITS/image file(s) around the given coordinates with indicated size.

enable_cloud_dataset([provider, profile, …])

Enable downloading public files from S3 instead of MAST.

get_cutouts(coordinates[, size, survey])

Get cutout FITS file(s) around the given coordinates with indicated size, and return them as a list of HDUList objects.

get_surveys(coordinates[, radius])

Gives a list of deep field surveys available for a position in the sky

login([token, store_token, reenter_token])

Log into the MAST portal.

logout()

Log out of current MAST session.

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

download_cutouts(coordinates, size=5, survey=None, cutout_format='fits', path='.', inflate=True, **img_params)[source]

Download cutout FITS/image file(s) around the given coordinates with indicated size.

Parameters
coordinatesstr or astropy.coordinates object

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

sizeint, array-like, Quantity

Optional, default 5 pixels. The size of the cutout array. If size is a scalar number or a scalar Quantity, then a square cutout of size will be created. If size has two elements, they should be in (ny, nx) order. Scalar numbers in size are assumed to be in units of pixels. Quantity objects must be in pixel or angular units.

surveystr

Optional The survey to restrict the cutout. The survey parameter will restrict to only the matching survey. Default behavior is to return all matched surveys.

cutout_formatstr

Optional The cutout file format. Default is fits, valid options are fits, jpg, png.

pathstr

Optional. The directory in which the cutouts will be saved. Defaults to current directory.

inflatebool

Optional, default True. Cutout target pixel files are returned from the server in a zip file, by default they will be inflated and the zip will be removed. Set inflate to false to stop before the inflate step.

**img_paramsdict

Optional, only used if format is jpg or png Valid parameters are stretch, minmax_percent, minmax_value, and invert. These arguments are documented here: https://astrocut.readthedocs.io/en/latest/api/astrocut.img_cut.html The Column Name is the keyword, with the argument being one or more acceptable values for that parameter, except for fields with a float datatype where the argument should be in the form [minVal, maxVal].

Returns
responseTable

Cutout file(s) for given coordinates

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_cutouts(coordinates, size=5, survey=None)[source]

Get cutout FITS file(s) around the given coordinates with indicated size, and return them as a list of HDUList objects.

Parameters
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string or as the appropriate astropy.coordinates object. One and only one of coordinates and objectname must be supplied.

sizeint, array-like, Quantity

Optional, default 5 pixels. The size of the cutout array. If size is a scalar number or a scalar Quantity, then a square cutout of size will be created. If size has two elements, they should be in (ny, nx) order. Scalar numbers in size are assumed to be in units of pixels. Quantity objects must be in pixel or angular units.

surveystr

Optional The survey to restrict the cutout. The survey parameter will restrict to only the matching survey. Default behavior is to return all matched surveys.

Returns
responseA list of HDUList objects.

Cutoutfiles for given coordinates

get_surveys(coordinates, radius='0d')[source]

Gives a list of deep field surveys available for a position in the sky

Parameters
coordinatesstr or astropy.coordinates object

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

radiusstr, float, or Quantity object, optional

Default 0 degrees. If supplied as a float, degrees is the assumed unit. The string must be parsable by Angle. The appropriate Quantity object from astropy.units may also be used.

Returns
responselist

List of available deep field surveys at the given coordinates.

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.

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