Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from mommermi/phys
data.Phys initial implementation
- Loading branch information
Showing
4 changed files
with
201 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
|
||
import pytest | ||
|
||
from sbpy.data import Phys | ||
from sbpy import bib | ||
|
||
|
||
@pytest.mark.remote_data | ||
def test_from_sbdb(): | ||
""" test from_horizons method""" | ||
|
||
# query one object | ||
data = Phys.from_sbdb('Ceres') | ||
assert len(data.table) == 1 | ||
|
||
# query several objects | ||
with bib.Tracking(): | ||
data = Phys.from_sbdb([n+1 for n in range(5)]) | ||
assert len(data.table) == 5 | ||
|
||
assert data['H'].unit == 'mag' | ||
assert data['G'].unit is None | ||
|
||
#assert 'sbpy.data.Phys.from_sbdb' in bib.to_text() |