Skip to content

Archive HEASARC

github-actions[bot] edited this page Sep 28, 2026 · 1 revision

High Energy Astrophysics Science Archive (X-ray and gamma-ray missions).

  • Module name: heasarc
  • Python class: astroquery.heasarc.Heasarc
  • Functions: 13

Call any function below with the astroquery_execute MCP tool. Descriptions are taken from the upstream astroquery/astropy docstrings.

Function Summary
clear_cache Removes all cache files.
download_data Download data products in links with a choice of getting the
enable_cloud Enable downloading public files from the cloud.
get_default_radius Get a mission-appropriate default radius for a catalog
list_catalogs Return a table of all available catalogs with two columns
list_columns Return the columns available in catalog_name as a table
locate_data Get links to data products
query_mission_cols Deprecated: 0.4.8
query_mission_list Deprecated: 0.4.8
query_object Deprecated: 0.4.8
query_region Queries the HEASARC TAP server around a coordinate and returns a
query_tap Send query to HEASARC's Xamin TAP using ADQL.
reset_cache_location Resets the cache location to the default astropy cache

Functions

clear_cache

Removes all cache files.

Heasarc.clear_cache()

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="clear_cache",
    params={},
)

Parameters

No parameters.

download_data

Download data products in links with a choice of getting the

Heasarc.download_data(links, host='heasarc', location='.')

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="download_data",
    params={"links": "<links>"},
)

data from either the heasarc server, sciserver, or the cloud in AWS.

Parameters

Parameter Type Default Description
links (required) astropy.table.Table or astropy.table.Row The result from locate_data
host str 'heasarc' The data host. The options are: heasarc (default), sciserver, aws. If host == 'sciserver', data is copied from the local mounted data drive. If host == 'aws', data is downloaded from Amazon S3 Open Data Repository.
location str '.' local folder where the downloaded file will be saved. Default is current working directory

enable_cloud

Enable downloading public files from the cloud.

Heasarc.enable_cloud(provider='aws', profile=None)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="enable_cloud",
    params={},
)

Requires the boto3 library to function.

Parameters

Parameter Type Default Description
provider str 'aws' Which cloud data provider to use. Currently, only 'aws' is supported.
profile str None Profile to use to identify yourself to the cloud provider (usually in ~/.aws/config).

get_default_radius

Get a mission-appropriate default radius for a catalog

Heasarc.get_default_radius(catalog_name)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="get_default_radius",
    params={"catalog_name": "<catalog_name>"},
)

Parameters

Parameter Type Default Description
catalog_name (required) str The name of catalog as a str

Returns

The radius as Quantity`` —

list_catalogs

Return a table of all available catalogs with two columns

Heasarc.list_catalogs(*, master=False, keywords=None)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="list_catalogs",
    params={},
)

(name, description)

Parameters

Parameter Type Default Description
master bool False Select only master catalogs. Default is False
keywords str or list None a str or a list of str of keywords used as search terms for catalogs. Words with a str separated by a space are AND'ed, while words in a list are OR'ed

Returns

name, description —

list_columns

Return the columns available in catalog_name as a table

Heasarc.list_columns(catalog_name, full=False)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="list_columns",
    params={"catalog_name": "<catalog_name>"},
)

Parameters

Parameter Type Default Description
catalog_name (required) str The name of catalog as a str
full bool False If True, return all columns, otherwise, return the standard list of columns

Returns

Table — A table with columns: name, description, unit

locate_data

Get links to data products

Heasarc.locate_data(query_result=None, catalog_name=None)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="locate_data",
    params={},
)

Use vo/datalinks to query the data products for some query_results.

Parameters

Parameter Type Default Description
query_result astropy.table.Table or astropy.table.Row None A table that contain the search results. Typically as returned by query_region. If None, use the table from the most recent query_region call.
catalog_name str None The catalog name for the which the query_result belongs to. If None, use the one from the most recent query_region call.

Returns

A Table object. —

query_mission_cols

No description in upstream docstring.

Heasarc.query_mission_cols(mission, *, cache=True, get_query_payload=False, **kwargs)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="query_mission_cols",
    params={"mission": "<mission>"},
)

Parameters

Parameter Type Default Description
mission (required) str Mission catalog (short name) to search from
cache bool True Defaults to True. If set overrides global caching behavior. See astroquery_cache.
get_query_payload False
**kwargs

query_mission_list

No description in upstream docstring.

Heasarc.query_mission_list(*, cache=True, get_query_payload=False)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="query_mission_list",
    params={},
)

Parameters

Parameter Type Default Description
cache True
get_query_payload False

query_object

No description in upstream docstring.

Heasarc.query_object(object_name, mission, *, cache=True, get_query_payload=False, **kwargs)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="query_object",
    params={"object_name": "<object_name>", "mission": "<mission>"},
)

Parameters

Parameter Type Default Description
object_name (required) str Object to query around. To set search radius use the 'radius' parameter.
mission (required) str Mission catalog to search from
cache bool True Defaults to True. If set overrides global caching behavior. See astroquery_cache.
get_query_payload False
**kwargs

query_region

Queries the HEASARC TAP server around a coordinate and returns a

Heasarc.query_region(position=None, catalog=None, radius=None, *, spatial='cone', width=None, polygon=None, add_offset=False, get_query_payload=False, columns=None, cache=False, verbose=False, maxrec=None, **kwargs)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="query_region",
    params={},
)

Table object.

Parameters

Parameter Type Default Description
position str, astropy.coordinates object None Gives the position of the center of the cone or box if performing a cone or box search. Required if spatial is 'cone' or 'box'. Ignored if spatial is 'polygon' or 'all-sky'.
catalog str None The catalog to query. To list the available catalogs, use list_catalogs.
radius str or Quantity object, [optional for None spatial == 'cone']. The string must be parsable by Angle. The appropriate Quantity object from astropy.units may also be used. If None, a default value appropriate for the selected catalog is used. To see the default radius for the catalog, see get_default_radius.
spatial str 'cone' Type of spatial query: 'cone', 'box', 'polygon', and 'all-sky'. Defaults to 'cone'.
width str, Quantity object [Required for None spatial == 'box'.] The string must be parsable by Angle. The appropriate Quantity object from astropy.units may also be used.
polygon list, [Required for spatial is 'polygon'] None A list of (ra, dec) pairs (as tuples), in decimal degrees, outlining the polygon to search in. It can also be a list of astropy.coordinates object or strings that can be parsed by astropy.coordinates.ICRS.
add_offset bool False If True and spatial=='cone', add a search_offset column that indicates the separation (in arcmin) between the requested coordinate and the entry coordinates in the catalog. Default is False.
get_query_payload bool False If True then returns the generated ADQL query as str. Defaults to False.
columns str None Target column list with value separated by a comma(,). Use * for all the columns. The default is to return a subset of the columns that are generally the most useful.
cache False
verbose bool False If False, suppress vo warnings.
maxrec int None Maximum number of records
**kwargs

Returns

A Table object. —

query_tap

Send query to HEASARC's Xamin TAP using ADQL.

Heasarc.query_tap(query, *, maxrec=None)

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="query_tap",
    params={"query": "<query>"},
)

Results in TAPResults format. result.to_table gives Table format.

Parameters

Parameter Type Default Description
query (required) str ADQL query to be executed
maxrec int None maximum number of records to return

Returns

TAPResults — TAP query result.

reset_cache_location

Resets the cache location to the default astropy cache

Heasarc.reset_cache_location()

Call via MCP

astroquery_execute(
    module_name="heasarc",
    function_name="reset_cache_location",
    params={},
)

Parameters

No parameters.

Clone this wiki locally