ATK.Tools.query#

ATK.Tools.query(kind: str, targets: int | SkyCoord | Target | list[int | SkyCoord | Target], **kwargs) DataSet[source]#

Performs a query to retrieve astronomical data.

Parameters:
kind{‘vizier’, ‘image’, ‘lightcurve’, ‘spectrum’, ‘sed’, ‘hrd’, ‘datatable’}, optional

Type of query to perform.

targetsint, SkyCoord, Target, or iterable of these

Targets of search (see here).

pathstr or Path, optional

Path of local FITS file to which result should be saved. query() will attempt to read this file instead of retrieving new data under all but the following situations:

  • Changes to query parameters

  • Changes to the working version of ATK

  • If an exception was encountered during data retrieval prior to file creation (i.e. exception is True)

correctionsbool, optional

If True, perform automatic proper motion correction (where possible, see here).

Default is True.

**kwargs

Accepted keyword arguments are specific to each kind (see below).

Returns:
DataSet

Dataset containing data matching kind.

See also

Record

Vizier data container, stored in DataSets returned by vizier queries.

Image

Image data container, stored in DataSets returned by image queries.

Lightcurve

Light curve data container, stored in DataSets returned by lightcurve queries.

Spectrum

Spectrum data container, stored in DataSets returned by spectrum queries.

SED

SED data container, stored in DataSets returned by sed queries.

HRD

HRD data container, stored in DataSets returned by hrd queries.

DataTable

Table data container, stored in DataSets returned by datatable queries.

Notes

The keyword arguments that are available to query() depend on the kind of data that is being requested. These are outlined below:


kind='vizier'

surveystr

Vizier catalogue or Vizier catalogue alias (see here).

radiusfloat or Quantity, optional

Search radius around each target. If float, unit taken from query_settings.default_scale config key (see here).

Default taken from query_settings.query_radius config key (see here).



kind='image'

surveystr

Target survey (see here).

bandstr

Photometric band of image (see here).

sizefloat or Quantity, optional

Width and height of image. If float, unit taken from query_settings.default_scale config key (see here).

Default taken from query_settings.image_size config key (see here).

overlayslist of str, optional

List of detection overlays to generate (see here).

Default is None



kind='lightcurve'

surveystr

Target survey (see here).

radiusfloat or Quantity, optional

Search radius around each target. If float, unit taken from query_settings.default_scale config key (see here).

Default taken from query_settings.query_radius config key (see here).

splitbool, optional

If True, photometry is separated by a per-survey ID.

Default is False

filterbool, optional

If True, optional data quality filtering is performed.

Default is True

usernamestr, optional

ATLAS forced photometry username, only required in ATLAS queries.

passwordstr, optional

ATLAS forced photometry password, only required in ATLAS queries.



kind='spectrum'

surveystr

Target survey (see here).

radiusfloat or Quantity, optional

Search radius around each target. If float, unit taken from query_settings.default_scale config key (see here).

Default taken from query_settings.query_radius config key (see here).



kind='sed'

radiusfloat or Quantity, optional

Search radius around each target. If float, unit taken from query_settings.default_scale config key (see here).

Default taken from query_settings.query_radius config key (see here).



kind='hrd'

colourstr, optional

Gaia colour in format band1-band2, where each band is a photometry column in Vizier.

Default is 'BPmag-RPmag'.

magstr, optional

Gaia absolute magnitude, as listed in Vizier.

Default is 'Gmag'.



kind='datatable'

columnsdict

Table columns in format survey: cols, where survey is a Vizier catalogue or Vizier catalogue alias (see here) and cols is a list of columns in that catalogue.

Example: {'gaia': ['Gmag', 'BPmag', 'RPmag'], 'II/328/allwise': ['W1mag', 'W2mag', 'W3mag', 'W4mag']}