Skip to content

Commit 1ba77cc

Browse files
committed
add example of how to get non-public (proprietary) data
1 parent 1ebd810 commit 1ba77cc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/alma/alma.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,25 @@ or if you wanted all projects by a given PI:
178178
179179
>>> Alma.query(payload=dict(pi_name='Ginsburg, Adam'))
180180
181+
Querying For Proprietary Data
182+
-----------------------------
183+
184+
To query for proprietary data (non-public data), you need to first authenticate using the ``login`` method,
185+
and then set ``public_data=False`` in your query:
186+
187+
.. doctest-skip::
188+
189+
>>> from astroquery.alma import Alma
190+
>>> alma = Alma()
191+
>>> # First login to access proprietary data
192+
>>> alma.login("username") # Will prompt for password
193+
>>> # Now query including proprietary data
194+
>>> proprietary_data = alma.query(payload=dict(project_code='2017.1.01355.L', public_data=False))
195+
>>> # Or restrict to only proprietary data
196+
>>> only_proprietary = alma.query_region('W51', radius=25*u.arcmin, public_data=False)
197+
198+
When you set ``public_data=False``, the query will include only proprietary data by adding a condition equivalent to ``data_rights='Proprietary'`` in the underlying SQL query.
199+
181200
The ``query_sia`` method offers another way to query ALMA using the IVOA SIA
182201
subset of keywords returning results in 'ObsCore' format. For example,
183202
to query for all images that have ``'XX'`` polarization (note that this query is too large

0 commit comments

Comments
 (0)