Skip to content

Commit 39bfbc0

Browse files
committed
More doc updates..
1 parent 0f10646 commit 39bfbc0

File tree

1 file changed

+18
-52
lines changed

1 file changed

+18
-52
lines changed

docs/cosmosim/cosmosim.rst

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ Exploring Database Schema
186186
A database exploration tool is available to help the user navigate
187187
the structure of any simulation database in the CosmoSim database.
188188

189+
Note: '@' precedes entries which are dictionaries
190+
189191
.. code-block:: python
190192
191193
>>> CS.explore_db()
@@ -334,9 +336,11 @@ line, or alternatively they can be stored on your local machine.
334336
.. code-block:: python
335337
336338
>>> CS.check_all_jobs()
337-
{'359750704009965': 'COMPLETED'}
338-
>>> data = CS.download(jobid='359750704009965')
339-
[<Response [200]>]
339+
JobID Phase
340+
--------------- ---------
341+
359750704009965 COMPLETED
342+
343+
>>> data = CS.download(jobid='359750704009965',format='csv')
340344
>>> print(data)
341345
(['row_id', 'log_mass', 'num'],
342346
[[1, 10.88, 3683],
@@ -359,31 +363,15 @@ line, or alternatively they can be stored on your local machine.
359363
[18, 15.12, 68],
360364
[19, 15.38, 4]])
361365
362-
.. code-block:: python
366+
Unless the filename attribute is specified, data is not saved out to
367+
file.
363368

364-
>>> CS.download(jobid='359750704009965',filename='/Users/username/Desktop/MDR1massfunction.dat')
365-
[<Response [200]>]
366-
Data written to file: /Users/username/Desktop/MDR1massfunction.dat
367-
(['row_id', 'log_mass', 'num'],
368-
[[1, 10.88, 3683],
369-
[2, 11.12, 452606],
370-
[3, 11.38, 3024674],
371-
[4, 11.62, 3828931],
372-
[5, 11.88, 2638644],
373-
[6, 12.12, 1572685],
374-
[7, 12.38, 926764],
375-
[8, 12.62, 544650],
376-
[9, 12.88, 312360],
377-
[10, 13.12, 174164],
378-
[11, 13.38, 95263],
379-
[12, 13.62, 50473],
380-
[13, 13.88, 25157],
381-
[14, 14.12, 11623],
382-
[15, 14.38, 4769],
383-
[16, 14.62, 1672],
384-
[17, 14.88, 458],
385-
[18, 15.12, 68],
386-
[19, 15.38, 4]])
369+
>>> data = CS.download(jobid='359750704009965',filename='/Users/uname/Desktop/test.csv',format='csv')
370+
|==========================================================================================================================| 1.5k/1.5k (100.00%) 0s
371+
372+
Other formats include votable, votableb1, and votableb2 (the latter
373+
two are binary files, for easier handling of large data sets; these
374+
formats can not be used in an interactive python session).
387375

388376
Data can be stored and/or written out as a `VOTable`_.
389377

@@ -392,33 +380,11 @@ Data can be stored and/or written out as a `VOTable`_.
392380
.. code-block:: python
393381
394382
>>> data = CS.download(jobid='359750704009965',format='votable')
395-
[<Response [200]>]
396383
>>> data
397384
<astropy.io.votable.tree.VOTableFile at 0x10b440150>
398-
>>> data.to_xml('/Users/username/Desktop/data.xml')
399-
>>> CS.download(jobid='359750704009965',filename='/Users/username/Desktop/MDR1massfunction.dat')
400-
[<Response [200]>]
401-
Data written to file: /Users/username/Desktop/MDR1massfunction.dat
402-
(['row_id', 'log_mass', 'num'],
403-
[[1, 10.88, 3683],
404-
[2, 11.12, 452606],
405-
[3, 11.38, 3024674],
406-
[4, 11.62, 3828931],
407-
[5, 11.88, 2638644],
408-
[6, 12.12, 1572685],
409-
[7, 12.38, 926764],
410-
[8, 12.62, 544650],
411-
[9, 12.88, 312360],
412-
[10, 13.12, 174164],
413-
[11, 13.38, 95263],
414-
[12, 13.62, 50473],
415-
[13, 13.88, 25157],
416-
[14, 14.12, 11623],
417-
[15, 14.38, 4769],
418-
[16, 14.62, 1672],
419-
[17, 14.88, 458],
420-
[18, 15.12, 68],
421-
[19, 15.38, 4]])
385+
>>>data = CS.download(jobid='359750704009965',filename='/Users/uname/Desktop/test.xml',format='votable')
386+
>>> |==========================================================================================================================| 4.9k/4.9k (100.00%) 0s
387+
422388
423389
Reference/API
424390
=============

0 commit comments

Comments
 (0)