File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed
astroquery/nasa_ads/tests Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 1+ from ... import nasa_ads
2+
3+ def test_simple (patch_post ):
4+ x = nasa_ads .ADS .query_simple ('^Persson Origin of water around deeply embedded low-mass protostars' )
5+ assert x [- 1 ]['authors' ][0 ] == 'Persson, M. V.'
Original file line number Diff line number Diff line change @@ -10,26 +10,42 @@ Getting Started
1010===============
1111
1212This module provides an interface to the online `SAO/NASA Astrophysics Data System `_.
13+ At the moment only the "simple search", i.e. omni-box search is available, and only
14+ a subset of the results are accessible.
1315
1416Examples
1517========
1618
17-
1819Search works by specific identifier
1920-----------------------------------
2021
22+ from astroquery import nasa_ads as na
23+ # the "^" makes ADS to return only papers where Persson
24+ # is first author
25+ results = na.ADS.query_simple('^Persson Origin of water\
26+ around deeply embedded low-mass protostars') results[0].title
27+
28+ # to sort after publication date
29+ results.sort(['pubdate'])
30+
31+ # get the title of the last hit
32+ title = results[-1]['title'][0]
33+
34+ # printout the authors of the last hit
35+ print results[-1]['authors']
36+
2137
2238Get links
2339---------
24-
40+ Not yet implemented.
2541
2642Download publisher/ArXiv PDF
2743----------------------------
28-
44+ Not yet implemented.
2945
3046Get Bibtex
3147----------
32-
48+ Not yet implemented.
3349
3450
3551
You can’t perform that action at this time.
0 commit comments