@@ -127,7 +127,9 @@ You can query by object name or by circular region:
127
127
.. doctest- remote- data::
128
128
129
129
>> > from astroquery.alma import Alma
130
- >> > m83_data = Alma.query_object(' M83' )
130
+ >> > alma = Alma()
131
+ >> > alma.archive_url = ' https://almascience.eso.org' # optional to make doctest work
132
+ >> > m83_data = alma.query_object(' M83' )
131
133
>> > m83_data.colnames # doctest: +IGNORE_OUTPUT
132
134
[' obs_publisher_did' , ' obs_collection' , ' facility_name' , ' instrument_name' ,
133
135
' obs_id' , ' dataproduct_type' , ' calib_level' , ' target_name' , ' s_ra' ,
@@ -155,7 +157,9 @@ Region queries are just like any other in astroquery:
155
157
>> > from astropy import units as u
156
158
>> > galactic_center = coordinates.SkyCoord(0 * u.deg, 0 * u.deg,
157
159
... frame = ' galactic' )
158
- >> > gc_data = Alma.query_region(galactic_center, 1 * u.deg)
160
+ >> > alma = Alma()
161
+ >> > alma.archive_url = ' https://almascience.eso.org' # optional to make doctest work
162
+ >> > gc_data = alma.query_region(galactic_center, 1 * u.deg)
159
163
>> > print (gc_data) # doctest: +IGNORE_OUTPUT
160
164
obs_publisher_did obs_collection facility_name ... scientific_category lastModified
161
165
...
@@ -306,7 +310,9 @@ are >100 GB!
306
310
307
311
>> > import numpy as np
308
312
>> > from astroquery.alma import Alma
309
- >> > m83_data = Alma.query_object(' M83' )
313
+ >> > alma = Alma()
314
+ >> > alma.archive_url = ' https://almascience.eso.org' # optional to make doctest work
315
+ >> > m83_data = alma.query_object(' M83' )
310
316
>> > uids = np.unique(m83_data[' member_ous_uid' ])
311
317
>> > print (uids)
312
318
member_ous_uid
@@ -320,7 +326,9 @@ data such as the file names, their urls, sizes etc.
320
326
321
327
.. doctest- remote- data::
322
328
323
- >> > link_list = Alma.get_data_info(uids[:3 ])
329
+ >> > alma = Alma()
330
+ >> > alma.archive_url = ' https://almascience.eso.org' # optional to make doctest work
331
+ >> > link_list = alma.get_data_info(uids[:3 ])
324
332
325
333
By default, ALMA data is delivered as tarball files. However, the content of
326
334
some of these files can be listed and accessed individually. To get information
@@ -329,7 +337,9 @@ on the individual files:
329
337
330
338
.. doctest- remote- data::
331
339
332
- >> > link_list = Alma.get_data_info(uids[:3 ], expand_tarfiles = True )
340
+ >> > alma = Alma()
341
+ >> > alma.archive_url = ' https://almascience.eso.org' # optional to make doctest work
342
+ >> > link_list = alma.get_data_info(uids[:3 ], expand_tarfiles = True )
333
343
334
344
You can then go on to download those files. The download will be cached so
335
345
that repeat queries of the same file will not re- download the data. The
@@ -374,11 +384,13 @@ files:
374
384
>> > from astropy import units as u
375
385
>> > s255ir = coordinates.SkyCoord(93.26708333 , 17.97888889 , frame = ' fk5' ,
376
386
... unit = (u.deg, u.deg))
377
- >> > result = Alma.query_region(s255ir, radius = 0.034 * u.deg)
378
- >> > uid_url_table = Alma.get_data_info(result[' obs_id' ][0 ], expand_tarfiles = True )
387
+ >> > alma = Alma()
388
+ >> > alma.archive_url = ' https://almascience.eso.org' # optional to make doctest work
389
+ >> > result = alma.query_region(s255ir, radius = 0.034 * u.deg)
390
+ >> > uid_url_table = alma.get_data_info(result[' obs_id' ][0 ], expand_tarfiles = True )
379
391
>> > # downselect to just the FITSf files
380
392
>> > fits_urls = [url for url in uid_url_table[' access_url' ] if ' .fits' in url]
381
- >> > filelist = Alma .download_files(fits_urls[:5 ]) # doctest: +SKIP
393
+ >> > filelist = alma .download_files(fits_urls[:5 ]) # doctest: +SKIP
382
394
383
395
You might want to look at the READMEs from a bunch of files so you know what
384
396
kind of S/ N to expect:
0 commit comments