From 251b15ed54cdeed3f59b2ee5dcbd320a1543b5d3 Mon Sep 17 00:00:00 2001 From: "Adam Ginsburg (keflavich)" Date: Tue, 15 Nov 2016 21:15:32 -0700 Subject: [PATCH] fix ALMA parameter handling: kwargs should always have been accepted since they're validated --- astroquery/alma/core.py | 3 ++- docs/alma/alma.rst | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/astroquery/alma/core.py b/astroquery/alma/core.py index 9d56bb4ad4..beeabb779f 100644 --- a/astroquery/alma/core.py +++ b/astroquery/alma/core.py @@ -105,7 +105,7 @@ def query_region_async(self, coordinate, radius, cache=True, public=True, science=science, **kwargs) def query_async(self, payload, cache=True, public=True, science=True, - view_format='raw', get_query_payload=False): + view_format='raw', get_query_payload=False, **kwargs): """ Perform a generic query with user-specified payload @@ -125,6 +125,7 @@ def query_async(self, payload, cache=True, public=True, science=True, url = urljoin(self._get_dataarchive_url(), 'aq/') + payload.update(kwargs) payload.update({'result_view': view_format, 'format': 'VOTABLE', 'download': 'true'}) if public: diff --git a/docs/alma/alma.rst b/docs/alma/alma.rst index d808769fa0..ec2f8b297d 100644 --- a/docs/alma/alma.rst +++ b/docs/alma/alma.rst @@ -127,6 +127,16 @@ Region queries are just like any other in astroquery: >>> print(len(gc_data)) 383 +Querying by other parameters +============================ + +As of version 0.3.4, you can also query other fields by keyword. For example, +if you want to find all projects with a particular PI, you could do: + +.. code-block:: python + + >>> rslt = Alma.query_object('W51', pi_name='Ginsburg', public=False) + Downloading Data ================