ALMA
Atacama Large Millimeter/submillimeter Array science archive.
Module name:
almaPython class:
astroquery.alma.AlmaFunctions: 23
Call any function below with the astroquery_execute MCP tool. Descriptions are taken from the upstream astroquery/astropy docstrings.
Function |
Summary |
|---|---|
Authentication session information for passing credentials to an OIDC instance |
|
Alma.authenticated |
|
Removes all cache files. |
|
Given a list of tarball URLs, it extracts all the FITS files (or |
|
Given a list of file URLs, download them |
|
Alma.get_adhoc_service_access_url |
|
Alma.get_adhoc_service_parameter |
|
List the file contents of a UID from Cycle 0. Will raise an error |
|
Return information about the data associated with ALMA uid(s) |
|
Given a list of successfully downloaded tarballs, extract files |
|
Get the metadata - specifically, the project abstract - for a given project ID. |
|
Return the valid query parameters |
|
Alma.help_tap |
|
Login to the ALMA Science Portal. |
|
Queries the service and returns a table object. |
|
Perform a generic query with user-specified payload |
|
Queries the service and returns a table object. |
|
Query the archive for a source name. |
|
Queries the service and returns a table object. |
|
Query the ALMA archive with a source name and radius |
|
Use standard SIA2 attributes to query the ALMA SIA service. |
|
Send query to the ALMA TAP. Results in |
|
Resets the cache location to the default astropy cache |
Functions
auth
Call via MCP
astroquery_execute(
module_name="alma",
function_name="auth",
params={},
)
- property AlmaClass.auth
authenticated
Call via MCP
astroquery_execute(
module_name="alma",
function_name="authenticated",
params={},
)
- AlmaClass.authenticated()
clear_cache
Call via MCP
astroquery_execute(
module_name="alma",
function_name="clear_cache",
params={},
)
- AlmaClass.clear_cache()
Removes all cache files.
download_and_extract_files
Call via MCP
astroquery_execute(
module_name="alma",
function_name="download_and_extract_files",
params={"urls": "<urls>"},
)
- AlmaClass.download_and_extract_files(urls, *, delete=True, regex='.*\\.fits$', include_asdm=False, path='cache_path', verbose=True)
Given a list of tarball URLs, it extracts all the FITS files (or whatever matches the regex)
- Parameters:
include_asdm (
bool) – 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
download_files
Call via MCP
astroquery_execute(
module_name="alma",
function_name="download_files",
params={"files": "<files>"},
)
- AlmaClass.download_files(files, *, savedir=None, cache=True, continuation=True, skip_unauthorized=True, verify_only=False)
Given a list of file URLs, download them
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:
files (
list) – List of URLs to downloadsavedir (
Noneorstr) – The directory to save to. Default is the cache location.cache (
bool) – Cache the download?continuation (
bool) – Attempt to continue where the download left off (if it was broken)skip_unauthorized (
bool) – 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) – 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.
get_adhoc_service_access_url
Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_adhoc_service_access_url",
params={"adhoc_service": "<adhoc_service>"},
)
- AlmaClass.get_adhoc_service_access_url(adhoc_service)
get_adhoc_service_parameter
Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_adhoc_service_parameter",
params={"adhoc_service": "<adhoc_service>", "parameter_id": "<parameter_id>"},
)
- AlmaClass.get_adhoc_service_parameter(adhoc_service, parameter_id)
get_cycle0_uid_contents
Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_cycle0_uid_contents",
params={"uid": "<uid>"},
)
- AlmaClass.get_cycle0_uid_contents(uid)
List the file contents of a UID from Cycle 0. Will raise an error 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.
get_data_info
Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_data_info",
params={"uids": "<uids>"},
)
- AlmaClass.get_data_info(uids, *, expand_tarfiles=False, with_auxiliary=True, with_rawdata=True)
Return information about the data associated with ALMA uid(s)
- Parameters:
uids (
listorstr) – A list of valid UIDs or a single UID. UIDs should have the form: ‘uid://A002/X391d0b/X7b’expand_tarfiles (
bool) – False to return information on the tarfiles packages containing the data or True to return information about individual files in these packageswith_auxiliary (
bool) – True to include the auxiliary packages, False otherwisewith_rawdata (
bool) – True to include raw data, False otherwise
- Returns:
Table with results or None. Table has the following columns (
id (UID),)access_url (URLtoaccess data),service_def,content_length,content_type (MIMEtype),semantics,description (optional),error_message (optional)
get_files_from_tarballs
Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_files_from_tarballs",
params={"downloaded_files": "<downloaded_files>"},
)
- AlmaClass.get_files_from_tarballs(downloaded_files, *, regex='.*\\.fits$', path='cache_path', verbose=True)
Given a list of successfully downloaded tarballs, extract 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_infoanddownload_and_extract_files- Parameters:
downloaded_files (
list) – A list of downloaded files. These should be paths on your local machine.regex (
str) – A valid regular expressionpath (
'cache_path'orstr) – 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.
- Returns:
filelist – A list of the extracted file locations on disk
- Return type:
get_project_metadata
Call via MCP
astroquery_execute(
module_name="alma",
function_name="get_project_metadata",
params={"projectid": "<projectid>"},
)
- AlmaClass.get_project_metadata(projectid, *, cache=True)
Get the metadata - specifically, the project abstract - for a given project ID.
help
Call via MCP
astroquery_execute(
module_name="alma",
function_name="help",
params={},
)
- AlmaClass.help(cache=True)
Return the valid query parameters
help_tap
Call via MCP
astroquery_execute(
module_name="alma",
function_name="help_tap",
params={},
)
- AlmaClass.help_tap()
login
Call via MCP
astroquery_execute(
module_name="alma",
function_name="login",
params={},
)
- AlmaClass.login(username=None, store_password=False, reenter_password=False, auth_urls=['asa.alma.cl', 'rh-cas.alma.cl'])
Login to the ALMA Science Portal.
- Parameters:
username (
str, optional) – Username to the ALMA Science Portal. If not given, it should be specified in the config file.store_password (
bool, optional) – Stores the password securely in your keyring. Default is False.reenter_password (
bool, optional) – 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.
query
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query",
params={},
)
- AlmaClass.query(*args, **kwargs)
Queries the service and returns a table object.
Perform a generic query with user-specified payload
- Parameters:
payload (
dictionary) – Please consult thehelpmethodpublic (
bool) – True to return only public datasets, False to return private only, None to return bothscience (
bool) – True to return only science datasets, False to return only calibration, None to return bothlegacy_columns (
bool) – True to return the columns from the obsolete ALMA advanced query, otherwise return the current columns based on ObsCore model.get_query_payload (
bool) – Flag to indicate whether to simply return the payload.maxrec (
integer) – Cap on the amount of records returned. Default is no limit.enhanced_results (
bool) – True to return a table with quantities instead of just values. It also returns the footprints asregionsobjects.model (Table with results. Columns are those in the ALMA ObsCore)
True. ((see help_tap) unless legacy_columns argument is set to)
- Returns:
table
- Return type:
A `~astropy.table.Tableobject.`
query_async
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_async",
params={"payload": "<payload>"},
)
- AlmaClass.query_async(payload, *, public=True, science=True, legacy_columns=False, get_query_payload=False, maxrec=None, enhanced_results=False, **kwargs)
Perform a generic query with user-specified payload
- Parameters:
payload (
dictionary) – Please consult thehelpmethodpublic (
bool) – True to return only public datasets, False to return private only, None to return bothscience (
bool) – True to return only science datasets, False to return only calibration, None to return bothlegacy_columns (
bool) – True to return the columns from the obsolete ALMA advanced query, otherwise return the current columns based on ObsCore model.get_query_payload (
bool) – Flag to indicate whether to simply return the payload.maxrec (
integer) – Cap on the amount of records returned. Default is no limit.enhanced_results (
bool) – True to return a table with quantities instead of just values. It also returns the footprints asregionsobjects.
- Returns:
Table with results. Columns are those in the ALMA ObsCore model(see ``help_tap`) unlesslegacy_columnsargument is set` toTrue.
query_object
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_object",
params={},
)
- AlmaClass.query_object(*args, **kwargs)
Queries the service and returns a table object.
Query the archive for a source name.
- Parameters:
object_name (
str) – The object name. Will be resolved by astropy.coord.SkyCoordpublic (
bool) – True to return only public datasets, False to return private only, None to return bothscience (
bool) – True to return only science datasets, False to return only calibration, None to return bothenhanced_results (
bool) – True to return a table with quantities instead of just values. It also returns the footprint asregionsobjects.payload (
dict) – Dictionary of additional keywords. Seehelp.
- Returns:
table
- Return type:
A `~astropy.table.Tableobject.`
query_object_async
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_object_async",
params={"object_name": "<object_name>"},
)
- AlmaClass.query_object_async(object_name, *, public=True, science=True, payload=None, enhanced_results=False, **kwargs)
Query the archive for a source name.
- Parameters:
object_name (
str) – The object name. Will be resolved by astropy.coord.SkyCoordpublic (
bool) – True to return only public datasets, False to return private only, None to return bothscience (
bool) – True to return only science datasets, False to return only calibration, None to return bothenhanced_results (
bool) – True to return a table with quantities instead of just values. It also returns the footprint asregionsobjects.payload (
dict) – Dictionary of additional keywords. Seehelp.
query_region
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_region",
params={},
)
- AlmaClass.query_region(*args, **kwargs)
Queries the service and returns a table object.
Query the ALMA archive with a source name and radius
- Parameters:
coordinates (
str / `astropy.coordinates`) – the identifier or coordinates around which to query.radius (
str / `~astropy.units.Quantity`, optional) – the radius of the regionpublic (
bool) – True to return only public datasets, False to return private only, None to return bothscience (
bool) – True to return only science datasets, False to return only calibration, None to return bothpayload (
dict) – Dictionary of additional keywords. Seehelp.enhanced_results (
bool) – True to return a table with quantities instead of just values. It also returns the footprints asregionsobjects.
- Returns:
table
- Return type:
A `~astropy.table.Tableobject.`
query_region_async
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_region_async",
params={"coordinate": "<coordinate>", "radius": "<radius>"},
)
- AlmaClass.query_region_async(coordinate, radius, *, public=True, science=True, payload=None, enhanced_results=False, **kwargs)
Query the ALMA archive with a source name and radius
- Parameters:
coordinates (
str / `astropy.coordinates`) – the identifier or coordinates around which to query.radius (
str / `~astropy.units.Quantity`, optional) – the radius of the regionpublic (
bool) – True to return only public datasets, False to return private only, None to return bothscience (
bool) – True to return only science datasets, False to return only calibration, None to return bothpayload (
dict) – Dictionary of additional keywords. Seehelp.enhanced_results (
bool) – True to return a table with quantities instead of just values. It also returns the footprints asregionsobjects.
query_sia
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_sia",
params={},
)
- AlmaClass.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)
Use standard SIA2 attributes to query the ALMA SIA service.
- Parameters:
pos (
singleorlistoftuples) – 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 unitsband (
scalar,tuple(interval)orlistoftuples) – (spectral units (default: meter) the energy interval(s) to be searched for data.time (
singleorlistofTimeorcompatible strings) – the time interval(s) to be searched for data.pol (
singleorlistofstr from ``pyvo.dam.obscore.POLARIZATION_STATES``) – the polarization state(s) to be searched for data.field_of_view (
singleorlistoftuples) – angle units (default arcsec) the range(s) of field of view (size) to be searched for dataspatial_resolution (
singleorlistoftuples) – angle units required the range(s) of spatial resolution to be searched for dataspectral_resolving_power (
singleorlistoftuples) – the range(s) of spectral resolving power to be searched for dataexptime (
singleorlistoftuples) – time units (default: second) the range(s) of exposure times to be searched for datatimeres (
singleoflistoftuples) – time units (default: second) the range(s) of temporal resolution to be searched for datapublisher_did (
singleorlistofstr) – specifies the unique identifier of dataset(s). It is global because it must include information regarding the publisher (obs_publisher_did in ObsCore)collection (
singleorlistofstr) – name of the collection that the data belongs tofacility (
singleorlistofstr) – specifies the name of the facility (usually telescope) where the data was acquired.instrument (
singleorlistofstr) – specifies the name of the instrument with which the data was acquired.data_type (
'image'|``’cube’``) – specifies the type of the datacalib_level (
singleorlist from enum) –pyvo.dam.obscore.CALIBRATION_LEVELSspecifies the calibration level of the data. Can be a single value or a list of valuestarget_name (
singleorlistofstr) – specifies the name of the target (e.g. the intention of the original science program or observation)res_format (
singleorlistofstrings) – specifies response format(s).max_records (
int) – allows the client to limit the number or records in the response**kwargs (
custom query parameters) – single or a list of values (or tuples for intervals) custom query parameters that a specific service accepts. The values of the parameters need to follow the SIA2 format and represent the appropriate quantities (where applicable).
- Returns:
Results in `~pyvo.dal.sia2.SIA2Resultsformat.`result.to_qtable in `~astropy.table.QTableformat`
query_tap
Call via MCP
astroquery_execute(
module_name="alma",
function_name="query_tap",
params={"query": "<query>"},
)
- AlmaClass.query_tap(query, *, maxrec=None, uploads=None)
Send query to the ALMA TAP. Results in
TAPResultsformat. result.to_qtable inQTableformat- querystr
ADQL query to be executed
- maxrecint
maximum number of records to return
- uploadsdict
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.
Examples
>>> uploads = {'tmptable': '/tmp/tmptable_def.xml'} >>> rslt = query_tap(self, query, maxrec=None, uploads=uploads)
- result
TAPResults TAP query result
reset_cache_location
Call via MCP
astroquery_execute(
module_name="alma",
function_name="reset_cache_location",
params={},
)
- AlmaClass.reset_cache_location()
Resets the cache location to the default astropy cache