Skip to content

Commit 9819ea9

Browse files
committed
Cleaning up extra codeblocks and some more whitespace
1 parent 6686a03 commit 9819ea9

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

docs/alma/alma.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ supports object and region based querying and data staging and retrieval.
2222
You can get interactive help to find out what keywords to query for:
2323

2424
.. code-block:: python
25+
2526
>>> from astroquery.alma import Alma
26-
>>> Alma.help() # doctest: +IGNORE_OUTPUT
27+
>>> Alma.help() # doctest: +IGNORE_OUTPUT
2728
<BLANKLINE>
2829
Most common ALMA query keywords are listed below. These keywords are part of the ALMA ObsCore model, an IVOA standard for metadata representation (3rd column). They were also present in original ALMA Web form and, for backwards compatibility can be accessed with their old names (2nd column).
2930
More elaborate queries on the ObsCore model are possible with `query_sia` or `query_tap` methods
@@ -123,8 +124,8 @@ Querying Targets and Regions
123124
124125
You can query by object name or by circular region:
125126
126-
.. code-block:: python
127127
.. doctest-remote-data::
128+
128129
>>> from astroquery.alma import Alma
129130
>>> m83_data = Alma.query_object('M83')
130131
>>> m83_data.colnames # doctest: +IGNORE_OUTPUT
@@ -147,8 +148,9 @@ You can query by object name or by circular region:
147148
148149
Region queries are just like any other in astroquery:
149150
150-
.. code-block:: python
151+
151152
.. doctest-remote-data::
153+
152154
>>> from astropy import coordinates
153155
>>> from astropy import units as u
154156
>>> galactic_center = coordinates.SkyCoord(0*u.deg, 0*u.deg,
@@ -167,22 +169,22 @@ Querying by other parameters
167169
As of version 0.3.4, you can also query other fields by keyword. For example,
168170
if you want to find all projects in a region with a particular PI, you could do:
169171
170-
.. code-block:: python
172+
.. doctest-remote-data::
171173
172-
>>> rslt = Alma.query_region('W51', radius=25*u.arcmin, pi_name='*Ginsburg*') # doctest: +REMOTE_DATA
174+
>>> rslt = Alma.query_region('W51', radius=25*u.arcmin, pi_name='*Ginsburg*')
173175
174176
or if you wanted all projects by a given PI:
175177
176-
.. code-block:: python
178+
.. doctest-remote-data::
177179
178-
>>> rslt = Alma.query(payload=dict(pi_name='Ginsburg, Adam')) # doctest: +REMOTE_DATA
180+
>>> rslt = Alma.query(payload=dict(pi_name='Ginsburg, Adam'))
179181
180182
The ''query_sia'' method offers another way to query ALMA using the IVOA SIA
181183
subset of keywords returning results in 'ObsCore' format. For example,
182184
to query for all images that have `XX` polarization (note that this query is too large
183185
to run, it is just shown as an example):
184186
185-
.. code-block:: python
187+
.. doctest-remote-data::
186188
187189
>>> Alma.query_sia(pol='XX') # doctest: +SKIP
188190
@@ -191,7 +193,6 @@ metadata. This method is used to send queries to the service using the
191193
'ObsCore' columns as constraints. The returned result is also in 'ObsCore'
192194
format.
193195
194-
.. code-block:: python
195196
.. doctest-remote-data::
196197
197198
>>> Alma.query_tap("select * from ivoa.obscore where target_name like '%M83%'") # doctest: +IGNORE_OUTPUT
@@ -204,7 +205,6 @@ format.
204205
205206
One can also query by keyword, spatial resolution, etc:
206207
207-
.. code-block:: python
208208
.. doctest-remote-data::
209209
210210
>>> Alma.query_tap("select * from ivoa.obscore WHERE spatial_resolution<=0.1 AND science_keyword "
@@ -296,8 +296,8 @@ You can download ALMA data with astroquery, but be forewarned, many data sets
296296
are >100 GB!
297297
298298
299-
.. code-block:: python
300299
.. doctest-remote-data::
300+
301301
>>> import numpy as np
302302
>>> from astroquery.alma import Alma
303303
>>> m83_data = Alma.query_object('M83')
@@ -314,7 +314,6 @@ data such as the file names, their urls, sizes etc (this method replaces
314314
```stage_data```, which served the same role in older versions of astroquery
315315
but is now deprecated):
316316
317-
.. code-block:: python
318317
.. doctest-remote-data::
319318
320319
>>> link_list = Alma.get_data_info(uids[:3])
@@ -323,7 +322,7 @@ By default, ALMA data is delivered as tarball files. However, the content of
323322
some of these files can be listed and accessed individually. To get information
324323
on the individual files:
325324
326-
.. code-block:: python
325+
327326
.. doctest-remote-data::
328327
329328
>>> link_list = Alma.get_data_info(uids[:3], expand_tarfiles=True)
@@ -333,7 +332,7 @@ that repeat queries of the same file will not re-download the data. The
333332
default cache directory is ``~/.astropy/cache/astroquery/Alma/``, but this can
334333
be changed by changing the ``cache_location`` variable:
335334
336-
.. code-block:: python
335+
337336
.. doctest-remote-data::
338337
.. doctest-skip::
339338
@@ -365,8 +364,8 @@ Downloading FITS data
365364
If you want just the QA2-produced FITS files, you can directly access the FITS
366365
files:
367366
368-
.. code-block:: python
369367
.. doctest-remote-data::
368+
370369
>>> from astroquery.alma.core import Alma
371370
>>> from astropy import coordinates
372371
>>> from astropy import units as u
@@ -381,7 +380,6 @@ files:
381380
You might want to look at the READMEs from a bunch of files so you know what
382381
kind of S/N to expect:
383382
384-
.. code-block:: python
385383
.. doctest-remote-data::
386384
387385
>>> readmes = [url for url in uid_url_table['access_url'] if 'README' in url]

0 commit comments

Comments
 (0)