Skip to content

Commit c21b57f

Browse files
committed
Add text about DASTCOM5 to docs
1 parent 5de6c70 commit c21b57f

File tree

1 file changed

+60
-41
lines changed

1 file changed

+60
-41
lines changed

docs/sbpy/data.rst

Lines changed: 60 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ options in different cases:
7070
>>> print(orb) # doctest: +SKIP
7171
<QTable length=1>
7272
a e i argper node epoch true_anom
73-
AU deg deg deg d deg
74-
float64 float64 float64 float64 float64 float64 float64
73+
AU deg deg deg d deg
74+
float64 float64 float64 float64 float64 float64 float64
7575
------- ------- ------- ------- ------- --------- ---------
7676
1.234 0.1234 12.34 123.4 45.2 2451200.5 23.1
7777

@@ -102,11 +102,11 @@ options in different cases:
102102
>>> dec = [-12.42123, -12.41562, -12.40435]*u.deg
103103
>>> epoch = (2451523.5 + array([0.1234, 0.2345, 0.3525]))*u.d
104104
>>> obs = Ephem.from_array([ra, dec, epoch], names=['ra', 'dec', 't'])
105-
>>> print(obs)
105+
>>> print(obs)
106106
<QTable length=3>
107-
ra dec t
108-
deg deg d
109-
float64 float64 float64
107+
ra dec t
108+
deg deg d
109+
float64 float64 float64
110110
--------- --------- ------------
111111
10.223423 -12.42123 2451523.6234
112112
10.233453 -12.41562 2451523.7345
@@ -180,8 +180,8 @@ Just like in any `~astropy.table.Table` or `~astropy.table.QTable` object, you c
180180

181181
>>> print(obs['ra', 'dec']) # doctest: +SKIP
182182
<QTable length=3>
183-
ra dec
184-
deg deg
183+
ra dec
184+
deg deg
185185
--------- ---------
186186
10.223423 -12.42123
187187
10.233453 -12.41562
@@ -221,9 +221,9 @@ object:
221221
5
222222
>>> print(obs)
223223
<QTable length=5>
224-
ra dec t
225-
deg deg d
226-
float64 float64 float64
224+
ra dec t
225+
deg deg d
226+
float64 float64 float64
227227
--------- --------- -------------
228228
10.223423 -12.42123 2451523.6234
229229
10.233453 -12.41562 2451523.7345
@@ -238,8 +238,8 @@ or if you want to add a column to your object:
238238
>>> print(obs)
239239
<QTable length=5>
240240
ra dec t filter
241-
deg deg d
242-
float64 float64 float64 str1
241+
deg deg d
242+
float64 float64 float64 str1
243243
--------- --------- ------------- ------
244244
10.223423 -12.42123 2451523.6234 V
245245
10.233453 -12.41562 2451523.7345 V
@@ -371,11 +371,11 @@ Mauna Kea Observatory (IAU observatory code ``568``) from the `JPL Horizons serv
371371
>>> eph = Ephem.from_horizons('Ceres',
372372
... location='568',
373373
... epochs=epoch)
374-
>>> print(eph)
374+
>>> print(eph)
375375
<QTable masked=True length=1>
376376
targetname datetime_str datetime_jd ... PABLat timescale
377-
d ... deg
378-
str7 str24 float64 ... float64 str3
377+
d ... deg
378+
str7 str24 float64 ... float64 str3
379379
---------- ------------------------ ----------------- ... ------- ---------
380380
1 Ceres 2018-Aug-03 14:20:00.000 2458334.097222222 ... 9.3473 UTC
381381

@@ -412,8 +412,8 @@ full flexibility of the latter function:
412412
>>> print(eph)
413413
<QTable masked=True length=26>
414414
targetname datetime_str datetime_jd ... PABLon PABLat timescale
415-
d ... deg deg
416-
str7 str17 float64 ... float64 float64 str3
415+
d ... deg deg
416+
str7 str17 float64 ... float64 float64 str3
417417
---------- ----------------- ----------------- ... -------- ------- ---------
418418
1 Ceres 2018-Aug-03 14:20 2458334.097222222 ... 171.275 9.3473 UTC
419419
1 Ceres 2018-Aug-03 14:30 2458334.104166667 ... 171.2774 9.3472 UTC
@@ -441,8 +441,8 @@ concatenate queries for a number of objects:
441441
>>> print(eph)
442442
<QTable masked=True length=4>
443443
targetname datetime_str ... PABLat timescale
444-
... deg
445-
str26 str24 ... float64 str3
444+
... deg
445+
str26 str24 ... float64 str3
446446
-------------------------- ------------------------ ... -------- ---------
447447
1 Ceres 2018-Aug-03 14:20:00.000 ... 9.3473 UTC
448448
2 Pallas 2018-Aug-03 14:20:00.000 ... -20.1396 UTC
@@ -466,8 +466,8 @@ ephemerides from the Minor Planet Center:
466466
>>> print(eph)
467467
<QTable length=5>
468468
Date timescale ... Moon distance Moon altitude
469-
... deg deg
470-
object str3 ... float64 float64
469+
... deg deg
470+
object str3 ... float64 float64
471471
----------------------- --------- ... ------------- -------------
472472
2018-10-22 00:00:00.000 UTC ... 28.0 -33.0
473473
2018-10-23 00:00:00.000 UTC ... 41.0 -41.0
@@ -487,12 +487,12 @@ from the Discovery Channel Telescope:
487487
>>> from astropy.time import Time
488488
>>> epochs = Time.now().jd + np.arange(0, 10, 1/24)
489489
>>> ceres = Orbit.from_horizons('1')
490-
>>> eph = Ephem.from_oo(ceres, epochs, 'G37') # doctest: +SKIP
491-
>>> print(eph) # doctest: +SKIP
490+
>>> eph = Ephem.from_oo(ceres, epochs, 'G37') # doctest: +SKIP
491+
>>> print(eph) # doctest: +SKIP
492492
<QTable length=240>
493-
targetname epoch ... obsz trueanom
494-
d ... AU deg
495-
str7 float64 ... float64 float64
493+
targetname epoch ... obsz trueanom
494+
d ... AU deg
495+
str7 float64 ... float64 float64
496496
---------- ------------------ ... ----------------------- -----------------
497497
1 Ceres 2458519.2878717002 ... 4.886414464166933e-06 68.07980642088688
498498
1 Ceres 2458519.3295383668 ... 2.3814767035612583e-06 68.0893160393968
@@ -507,7 +507,7 @@ from the Discovery Channel Telescope:
507507
1 Ceres 2458529.1628717002 ... 1.4786143903738891e-05 70.32753120140761
508508
1 Ceres 2458529.2045383668 ... 1.4213398342149963e-05 70.33698944971509
509509
1 Ceres 2458529.2462050337 ... 1.2724269065650384e-05 70.34644748067402
510-
510+
511511
The properties computed by pyoorb and listed in the resulting table
512512
are defined in the `pyoorb documentation
513513
<https://github.com/oorb/oorb/tree/master/python>`_. Note that this function requires pyoorb to be installed, which is not a requirement for `sbpy`.
@@ -526,8 +526,8 @@ body osculating elements from the `JPL Horizons service
526526
>>> print(elem) # doctest: +SKIP
527527
<QTable masked=True length=1>
528528
targetname datetime_jd ... P timescale
529-
d ... d
530-
str7 float64 ... float64 str2
529+
d ... d
530+
str7 float64 ... float64 str2
531531
---------- ----------- ... ----------------- ---------
532532
1 Ceres 2458252.5 ... 1681.218128428134 TT
533533
>>> print(elem.column_names)
@@ -547,8 +547,8 @@ orbital elements for a number of targets:
547547
>>> print(elem) # doctest: +SKIP
548548
<QTable length=2>
549549
targetname datetime_jd ... P timescale
550-
d ... d
551-
str21 float64 ... float64 str2
550+
d ... d
551+
str21 float64 ... float64 str2
552552
--------------------- ----------------- ... ----------------- ---------
553553
3749 Balam (1982 BG1) 2458334.097222222 ... 1221.865723414031 TT
554554
312497 (2009 BR60) 2458334.097222222 ... 1221.776912893334 TT
@@ -566,12 +566,12 @@ In order to transform some current orbits to a state vector in
566566
cartesian coordinates, one could use the following code:
567567

568568
>>> elem = Orbit.from_horizons(['Ceres', 'Pallas', 'Vesta'])
569-
>>> statevec = elem.oo_transform('CART') # doctest: +SKIP
569+
>>> statevec = elem.oo_transform('CART') # doctest: +SKIP
570570
>>> print(statevec) # doctest: +SKIP
571571
<QTable length=3>
572572
id x y ... H G timescale
573-
AU AU ... mag
574-
str8 float64 float64 ... float64 float64 str2
573+
AU AU ... mag
574+
str8 float64 float64 ... float64 float64 str2
575575
-------- ------------------- -------------------- ... ------- ------- ---------
576576
1 Ceres -1.9673670927605356 -1.788869179608663 ... 3.34 0.12 TT
577577
2 Pallas -2.354147777522819 -0.20413910825654025 ... 4.13 0.11 TT
@@ -588,12 +588,12 @@ orbit of Ceres back to year 2000:
588588

589589
>>> elem = Orbit.from_horizons('Ceres')
590590
>>> epoch = Time('2000-01-01', format='iso')
591-
>>> newelem = elem.oo_propagate(epoch) # doctest: +SKIP
591+
>>> newelem = elem.oo_propagate(epoch) # doctest: +SKIP
592592
>>> print(newelem) # doctest: +SKIP
593593
<QTable length=1>
594594
id a e ... H G timescale
595-
AU ... mag
596-
str7 float64 float64 ... float64 float64 str3
595+
AU ... mag
596+
str7 float64 float64 ... float64 float64 str3
597597
------- ------------------ ------------------- ... ------- ------- ---------
598598
1 Ceres 2.7664942134894703 0.07837504303420217 ... 3.34 0.12 UTC
599599

@@ -619,14 +619,14 @@ small number of asteroids:
619619
>>> print(phys['targetname', 'H', 'diameter']) # doctest: +SKIP
620620
<QTable length=3>
621621
targetname H diameter
622-
km
623-
str26 float64 float64
622+
km
623+
str26 float64 float64
624624
-------------------------- ------- --------
625625
1 Ceres 3.34 939.4
626626
12893 Mommert (1998 QS55) 13.9 5.214
627627
3552 Don Quixote (1983 SA) 12.9 19.0
628628

629-
629+
630630
Please note that the SBDB database is not complete with respect to
631631
physical properties and should be considered as a sparse dataset.
632632

@@ -696,6 +696,25 @@ comparisons are made whenever possible:
696696
>>> sorted(comets, key=natural_sort_key)
697697
['2P/Encke', '9P/Tempel 1', '10P/Tempel 2', '101P/Chernykh']
698698

699+
How to use the DASTCOM5 Module
700+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
701+
702+
For using the DASTCOM5 Module, you have to first download the databse locally.
703+
That can be done by:
704+
705+
>>> from sbpy.utils import dastcom5
706+
>>> dastcom5.download_dastcom5()
707+
708+
After the database is downloaded, all the queries can be done easily.
709+
710+
DASTCOM5 is a subset of Small Body Database provided by JPL, NASA.
711+
For querying the database, either name or record number for the object
712+
can be used.
713+
714+
>>> dastcom5.orbit_from_name('atira')
715+
>>> dastcom5.orbit_from_record(900001)
716+
717+
More information about the DASTCOM5 Database can be taken from it's README file.
699718

700719
Reference/API
701720
-------------

0 commit comments

Comments
 (0)