Repository navigation
Archive ALMA
Atacama Large Millimeter/submillimeter Array science archive.
-
Module name:
alma -
Python class:
astroquery.alma.Alma - Functions: 23
Call any function below with the astroquery_execute MCP tool. Descriptions are taken from the upstream astroquery/astropy docstrings.
| Function | Summary |
|---|---|
auth |
Authentication session information for passing credentials to an OIDC instance |
authenticated |
Alma.authenticated |
clear_cache |
Removes all cache files. |
download_and_extract_files |
Given a list of tarball URLs, it extracts all the FITS files (or |
download_files |
Given a list of file URLs, download them |
get_adhoc_service_access_url |
Alma.get_adhoc_service_access_url |
get_adhoc_service_parameter |
Alma.get_adhoc_service_parameter |
get_cycle0_uid_contents |
List the file contents of a UID from Cycle 0. Will raise an error |
get_data_info |
Return information about the data associated with ALMA uid(s) |
get_files_from_tarballs |
Given a list of successfully downloaded tarballs, extract files |
get_project_metadata |
Get the metadata - specifically, the project abstract - for a given project ID. |
help |
Return the valid query parameters |
help_tap |
Alma.help_tap |
login |
Login to the ALMA Science Portal. |
query |
Queries the service and returns a table object. |
query_async |
Perform a generic query with user-specified payload |
query_object |
Queries the service and returns a table object. |
query_object_async |
Query the archive for a source name. |
query_region |
Queries the service and returns a table object. |
query_region_async |
Query the ALMA archive with a source name and radius |
query_sia |
Use standard SIA2 attributes to query the ALMA SIA service. |
query_tap |
Send query to the ALMA TAP. Results in TAPResults format. |
reset_cache_location |
Resets the cache location to the default astropy cache |
Authentication session information for passing credentials to an OIDC instance
Alma.auth(*args, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="auth",
params={},
)Assumes an OIDC system like Keycloak with a preconfigured client app called "oidc" to validate against. This does not use Tokens in the traditional OIDC sense, but rather uses the Keycloak specific endpoint to validate a username and password. Passwords are then kept in a Python keyring.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*args |
|||
**kwargs |
No description in upstream docstring.
Alma.authenticated()Call via MCP
astroquery_execute(
module_name="alma",
function_name="authenticated",
params={},
)Parameters
No parameters.
Removes all cache files.
Alma.clear_cache()Call via MCP
astroquery_execute(
module_name="alma",
function_name="clear_cache",
params={},
)Parameters
No parameters.
Given a list of tarball URLs, it extracts all the FITS files (or
Alma.download_and_extract_files(urls, *, delete=True, regex='.*\\.fits$', include_asdm=False, path='cache_path', verbose=True)Call via MCP
astroquery_execute(
module_name="alma",
function_name="download_and_extract_files",
params={"urls": "<urls>"},
)whatever matches the regex)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
urls (required)
|
str or list | A single URL or a list of URLs | |
delete |
True |
||
regex |
'.*\\.fits$' |
||
include_asdm |
bool | False |
Only affects cycle 1+ data. If set, the ASDM files will be downloaded in addition to the script and log files. By default, though, this file will be downloaded and deleted without extracting any information: you must change the regex if you want to extract data from an ASDM tarball |
path |
'cache_path' |
||
verbose |
True |
Given a list of file URLs, download them
Alma.download_files(files, *, savedir=None, cache=True, continuation=True, skip_unauthorized=True, verify_only=False)Call via MCP
astroquery_execute(
module_name="alma",
function_name="download_files",
params={"files": "<files>"},
)Note: Given a list with repeated URLs, each will only be downloaded once, so the return may have a different length than the input list
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
files (required)
|
list | List of URLs to download | |
savedir |
None or str | None |
The directory to save to. Default is the cache location. |
cache |
bool | True |
Cache the download? |
continuation |
bool | True |
Attempt to continue where the download left off (if it was broken) |
skip_unauthorized |
bool | True |
If you receive "unauthorized" responses for some of the download requests, skip over them. If this is False, an exception will be raised. |
verify_only |
bool | False |
Option to go through the process of checking the files to see if they're the right size, but not actually download them. This option may be useful if a previous download run failed partway. |
No description in upstream docstring.
Alma.get_adhoc_service_access_url(adhoc_service)Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_adhoc_service_access_url",
params={"adhoc_service": "<adhoc_service>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
adhoc_service (required)
|
No description in upstream docstring.
Alma.get_adhoc_service_parameter(adhoc_service, parameter_id)Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_adhoc_service_parameter",
params={"adhoc_service": "<adhoc_service>", "parameter_id": "<parameter_id>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
adhoc_service (required)
|
|||
parameter_id (required)
|
List the file contents of a UID from Cycle 0. Will raise an error
Alma.get_cycle0_uid_contents(uid)Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_cycle0_uid_contents",
params={"uid": "<uid>"},
)if the UID is from cycle 1+, since those data have been released in a different and more consistent format. See https://almascience.nrao.edu/documents-and-tools/cycle-2/ALMAQA2Productsv1.01.pdf for details.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
uid (required)
|
Return information about the data associated with ALMA uid(s)
Alma.get_data_info(uids, *, expand_tarfiles=False, with_auxiliary=True, with_rawdata=True)Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_data_info",
params={"uids": "<uids>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
uids (required)
|
list or str | A list of valid UIDs or a single UID. UIDs should have the form: 'uid://A002/X391d0b/X7b' | |
expand_tarfiles |
bool | False |
False to return information on the tarfiles packages containing the data or True to return information about individual files in these packages |
with_auxiliary |
bool | True |
True to include the auxiliary packages, False otherwise |
with_rawdata |
bool | True |
True to include raw data, False otherwise |
Returns
id (UID), —
Given a list of successfully downloaded tarballs, extract files
Alma.get_files_from_tarballs(downloaded_files, *, regex='.*\\.fits$', path='cache_path', verbose=True)Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_files_from_tarballs",
params={"downloaded_files": "<downloaded_files>"},
)with names matching a specified regular expression. The default is to extract all FITS files
NOTE: alma now supports direct listing and downloads of tarballs. See
get_data_info and download_and_extract_files
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
downloaded_files (required)
|
list | A list of downloaded files. These should be paths on your local machine. | |
regex |
str | '.*\\.fits$' |
A valid regular expression |
path |
'cache_path' or str | 'cache_path' |
If 'cache_path', will use the astroquery.Alma cache directory (Alma.cache_location), otherwise will use the specified path. Note that the subdirectory structure of the tarball will be maintained. |
verbose |
True |
Returns
list — A list of the extracted file locations on disk
Get the metadata - specifically, the project abstract - for a given project ID.
Alma.get_project_metadata(projectid, *, cache=True)Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_project_metadata",
params={"projectid": "<projectid>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
projectid (required)
|
|||
cache |
True |
Return the valid query parameters
Alma.help(cache=True)Call via MCP
astroquery_execute(
module_name="alma",
function_name="help",
params={},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
cache |
True |
No description in upstream docstring.
Alma.help_tap()Call via MCP
astroquery_execute(
module_name="alma",
function_name="help_tap",
params={},
)Parameters
No parameters.
Login to the ALMA Science Portal.
Alma.login(username=None, store_password=False, reenter_password=False, auth_urls=['asa.alma.cl', 'rh-cas.alma.cl'])Call via MCP
astroquery_execute(
module_name="alma",
function_name="login",
params={},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
username |
str | None |
Username to the ALMA Science Portal. If not given, it should be specified in the config file. |
store_password |
bool | False |
Stores the password securely in your keyring. Default is False. |
reenter_password |
bool | False |
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. |
auth_urls |
['asa.alma.cl', 'rh-cas.alma.cl'] |
Queries the service and returns a table object.
Alma.query(*args, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query",
params={},
)Perform a generic query with user-specified payload
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*args |
|||
**kwargs |
Returns
A Table object. —
Perform a generic query with user-specified payload
Alma.query_async(payload, *, public=True, science=True, legacy_columns=False, get_query_payload=False, maxrec=None, enhanced_results=False, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_async",
params={"payload": "<payload>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
payload (required)
|
dictionary | Please consult the help method |
|
public |
bool | True |
True to return only public datasets, False to return private only, None to return both |
science |
bool | True |
True to return only science datasets, False to return only calibration, None to return both |
legacy_columns |
bool | False |
True to return the columns from the obsolete ALMA advanced query, otherwise return the current columns based on ObsCore model. |
get_query_payload |
bool | False |
Flag to indicate whether to simply return the payload. |
maxrec |
integer | None |
Cap on the amount of records returned. Default is no limit. |
enhanced_results |
bool | False |
True to return a table with quantities instead of just values. It also returns the footprints as regions objects. |
**kwargs |
Returns
Table with results. Columns are those in the ALMA ObsCore model —
Queries the service and returns a table object.
Alma.query_object(*args, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_object",
params={},
)Query the archive for a source name.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*args |
|||
**kwargs |
Returns
A Table object. —
Query the archive for a source name.
Alma.query_object_async(object_name, *, public=True, science=True, payload=None, enhanced_results=False, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_object_async",
params={"object_name": "<object_name>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
object_name (required)
|
str | The object name. Will be resolved by astropy.coord.SkyCoord | |
public |
bool | True |
True to return only public datasets, False to return private only, None to return both |
science |
bool | True |
True to return only science datasets, False to return only calibration, None to return both |
payload |
dict | None |
Dictionary of additional keywords. See help. |
enhanced_results |
bool | False |
True to return a table with quantities instead of just values. It also returns the footprint as regions objects. |
**kwargs |
Queries the service and returns a table object.
Alma.query_region(*args, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_region",
params={},
)Query the ALMA archive with a source name and radius
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
*args |
|||
**kwargs |
Returns
A Table object. —
Query the ALMA archive with a source name and radius
Alma.query_region_async(coordinate, radius, *, public=True, science=True, payload=None, enhanced_results=False, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_region_async",
params={"coordinate": "<coordinate>", "radius": "<radius>"},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
coordinate (required)
|
|||
radius (required)
|
str / Quantity
|
the radius of the region | |
public |
bool | True |
True to return only public datasets, False to return private only, None to return both |
science |
bool | True |
True to return only science datasets, False to return only calibration, None to return both |
payload |
dict | None |
Dictionary of additional keywords. See help. |
enhanced_results |
bool | False |
True to return a table with quantities instead of just values. It also returns the footprints as regions objects. |
**kwargs |
Use standard SIA2 attributes to query the ALMA SIA service.
Alma.query_sia(*, pos=None, band=None, time=None, pol=None, field_of_view=None, spatial_resolution=None, spectral_resolving_power=None, exptime=None, timeres=None, publisher_did=None, facility=None, collection=None, instrument=None, data_type=None, calib_level=None, target_name=None, res_format=None, maxrec=None, **kwargs)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_sia",
params={},
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
pos |
single or list of tuples | None |
angle units (default: deg) the positional region(s) to be searched for data. Each region can be expressed as a tuple representing a CIRCLE, RANGE or POLYGON as follows: (ra, dec, radius) - for CIRCLE. (angle units - defaults to) (long1, long2, lat1, lat2) - for RANGE (angle units required) (ra, dec, ra, dec, ra, dec ... ) ra/dec points for POLYGON all in angle units |
band |
scalar, tuple(interval) or list of tuples | None |
(spectral units (default: meter) the energy interval(s) to be searched for data. |
time |
single or list of Time or compatible strings |
None |
the time interval(s) to be searched for data. |
pol |
single or list of str from pyvo.dam.obscore.POLARIZATION_STATES
|
None |
the polarization state(s) to be searched for data. |
field_of_view |
single or list of tuples | None |
angle units (default arcsec) the range(s) of field of view (size) to be searched for data |
spatial_resolution |
single or list of tuples | None |
angle units required the range(s) of spatial resolution to be searched for data |
spectral_resolving_power |
single or list of tuples | None |
the range(s) of spectral resolving power to be searched for data |
exptime |
single or list of tuples | None |
time units (default: second) the range(s) of exposure times to be searched for data |
timeres |
single of list of tuples | None |
time units (default: second) the range(s) of temporal resolution to be searched for data |
publisher_did |
single or list of str | None |
specifies the unique identifier of dataset(s). It is global because it must include information regarding the publisher (obs_publisher_did in ObsCore) |
facility |
single or list of str | None |
specifies the name of the facility (usually telescope) where the data was acquired. |
collection |
single or list of str | None |
name of the collection that the data belongs to |
instrument |
single or list of str | None |
specifies the name of the instrument with which the data was acquired. |
data_type |
'image'|'cube' | None |
specifies the type of the data |
calib_level |
single or list from enum | None |
pyvo.dam.obscore.CALIBRATION_LEVELS specifies the calibration level of the data. Can be a single value or a list of values |
target_name |
single or list of str | None |
specifies the name of the target (e.g. the intention of the original science program or observation) |
res_format |
single or list of strings | None |
specifies response format(s). |
maxrec |
None |
||
**kwargs |
Returns
Results in SIA2Results format. —
Send query to the ALMA TAP. Results in TAPResults format.
Alma.query_tap(query, *, maxrec=None, uploads=None)Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_tap",
params={"query": "<query>"},
)result.to_qtable in QTable format
Parameters
----------
query : str
ADQL query to be executed
maxrec : int
maximum number of records to return
uploads : dict
a mapping from temporary table names to objects containing a votable. These
temporary tables can be referred to in queries. The keys in the dictionary are
the names of temporary tables which need to be prefixed with the TAP_UPLOAD
schema in the actual query. The values are either astropy.table.Table instances
or file names or file like handles such as io.StringIO to table definition in
IVOA VOTable format.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query (required)
|
|||
maxrec |
None |
||
uploads |
None |
Examples
>>> uploads = {'tmptable': '/tmp/tmptable_def.xml'}
>>> rslt = query_tap(self, query, maxrec=None, uploads=uploads)
Return
------
result : `TAPResults`
TAP query resultResets the cache location to the default astropy cache
Alma.reset_cache_location()Call via MCP
astroquery_execute(
module_name="alma",
function_name="reset_cache_location",
params={},
)Parameters
No parameters.
Auto-generated from source docstrings on each release. Do not edit here — changes are overwritten.