Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion astropy_helpers
Submodule astropy_helpers updated 94 files
+0 −39 .circleci/config.yml
+2 −3 .gitignore
+0 −10 .readthedocs.yml
+29 −97 .travis.yml
+1 −164 CHANGES.rst
+0 −1 MANIFEST.in
+42 −19 README.rst
+87 −114 ah_bootstrap.py
+45 −0 appveyor.yml
+4 −1 astropy_helpers/__init__.py
+11 −3 astropy_helpers/commands/_dummy.py
+307 −0 astropy_helpers/commands/_test_compat.py
+435 −165 astropy_helpers/commands/build_ext.py
+39 −0 astropy_helpers/commands/build_py.py
+143 −105 astropy_helpers/commands/build_sphinx.py
+14 −0 astropy_helpers/commands/install.py
+14 −0 astropy_helpers/commands/install_lib.py
+53 −0 astropy_helpers/commands/register.py
+5 −0 astropy_helpers/commands/setup_package.py
+36 −14 astropy_helpers/commands/src/compiler.c
+12 −17 astropy_helpers/commands/test.py
+12 −0 astropy_helpers/compat/__init__.py
+3 −9 astropy_helpers/conftest.py
+0 −6 astropy_helpers/distutils_helpers.py
+11 −0 astropy_helpers/extern/__init__.py
+1 −0 astropy_helpers/extern/automodapi/__init__.py
+138 −0 astropy_helpers/extern/automodapi/autodoc_enhancements.py
+426 −0 astropy_helpers/extern/automodapi/automodapi.py
+686 −0 astropy_helpers/extern/automodapi/automodsumm.py
+107 −0 astropy_helpers/extern/automodapi/smart_resolver.py
+10 −0 astropy_helpers/extern/automodapi/templates/autosummary_core/base.rst
+65 −0 astropy_helpers/extern/automodapi/templates/autosummary_core/class.rst
+41 −0 astropy_helpers/extern/automodapi/templates/autosummary_core/module.rst
+214 −0 astropy_helpers/extern/automodapi/utils.py
+8 −0 astropy_helpers/extern/numpydoc/__init__.py
+624 −0 astropy_helpers/extern/numpydoc/docscrape.py
+425 −0 astropy_helpers/extern/numpydoc/docscrape_sphinx.py
+325 −0 astropy_helpers/extern/numpydoc/numpydoc.py
+16 −0 astropy_helpers/extern/numpydoc/templates/numpydoc_docstring.rst
+4 −0 astropy_helpers/extern/setup_package.py
+0 −2 astropy_helpers/git_helpers.py
+32 −226 astropy_helpers/openmp_helpers.py
+84 −96 astropy_helpers/setup_helpers.py
+8 −0 astropy_helpers/sphinx/__init__.py
+341 −2 astropy_helpers/sphinx/conf.py
+2 −0 astropy_helpers/sphinx/ext/__init__.py
+82 −0 astropy_helpers/sphinx/ext/changelog_links.py
+56 −0 astropy_helpers/sphinx/ext/doctest.py
+168 −0 astropy_helpers/sphinx/ext/edit_on_github.py
+0 −0 astropy_helpers/sphinx/ext/tests/__init__.py
+22 −0 astropy_helpers/sphinx/ext/tocdepthfix.py
+ astropy_helpers/sphinx/local/python2_local_links.inv
+25 −0 astropy_helpers/sphinx/local/python2_local_links.txt
+ astropy_helpers/sphinx/local/python3_local_links.inv
+38 −0 astropy_helpers/sphinx/local/python3_local_links.txt
+10 −0 astropy_helpers/sphinx/setup_package.py
+3 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/globaltoc.html
+96 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/layout.html
+3 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/localtoc.html
+7 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/searchbox.html
+75 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout_20.png
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.ico
+87 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo_32.png
+601 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/static/bootstrap-astropy.css
+63 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/static/copybutton.js
+160 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/static/sidebar.js
+10 −0 astropy_helpers/sphinx/themes/bootstrap-astropy/theme.conf
+13 −0 astropy_helpers/test_helpers.py
+0 −3 astropy_helpers/tests/__init__.py
+0 −0 astropy_helpers/tests/coveragerc
+1 −0 astropy_helpers/tests/test_ah_bootstrap.py
+16 −57 astropy_helpers/tests/test_git_helpers.py
+3 −32 astropy_helpers/tests/test_openmp_helpers.py
+208 −43 astropy_helpers/tests/test_setup_helpers.py
+568 −16 astropy_helpers/utils.py
+40 −94 astropy_helpers/version_helpers.py
+0 −19 docs/Makefile
+0 −22 docs/advanced.rst
+0 −14 docs/api.rst
+0 −273 docs/basic.rst
+0 −52 docs/conf.py
+0 −29 docs/developers.rst
+0 −36 docs/index.rst
+0 −12 docs/known_issues.rst
+0 −35 docs/make.bat
+0 −28 docs/updating.rst
+0 −53 docs/using.rst
+50 −0 licenses/LICENSE_COPYBUTTON.rst
+94 −0 licenses/LICENSE_NUMPYDOC.rst
+0 −3 pyproject.toml
+0 −37 setup.cfg
+44 −17 setup.py
21 changes: 21 additions & 0 deletions docs/sbpy/data/dastcom5.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
==============
Using DASTCOM5
==============


For using the DASTCOM5 Module, you have to first download the databse locally.
That can be done by:

>>> from sbpy.data.utils import dastcom5
>>> dastcom5.download_dastcom5() # doctest: +SKIP

After the database is downloaded, all the queries can be done easily.

DASTCOM5 is a subset of Small Body Database provided by JPL, NASA.
For querying the database, either name or record number for the object
can be used.

>>> dastcom5.orbit_from_name('atira') # doctest: +SKIP
>>> dastcom5.orbit_from_record(900001) # doctest: +SKIP

More information about the DASTCOM5 Database can be taken from it's README file.
1 change: 1 addition & 0 deletions docs/sbpy/data/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Content
.. toctree::
:maxdepth: 2

dastcom5.rst
dataclass.rst
ephem.rst
obs.rst
Expand Down
34 changes: 32 additions & 2 deletions sbpy/data/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

from ..bib import cite
from ..exceptions import SbpyException
from . import conf, DataClass, QueryError, TimeScaleWarning
from . import conf, utils, DataClass, QueryError, TimeScaleWarning



__all__ = ['Orbit', 'OrbitError', 'OpenOrbError']

Expand Down Expand Up @@ -180,9 +182,37 @@ def from_horizons(cls, targetids, id_type='smallbody',

return cls.from_table(all_elem)

@classmethod
def from_dastcom5(cls, name):
"""Load orbital elements from the DASTCOM5 Database
(ftp://ssd.jpl.nasa.gov/pub/ssd/dastcom5.zip).

Parameters
----------
name: str, mandatory
Name of NEO

Returns
-------
`~Orbit` object

Examples
--------
>>> from sbpy.data import Orbit
>>> orb = Orbit.from_dastcom5('atira') # doctest: +REMOTE_DATA
>>> orb # doctest: +SKIP

"""
dastcom5_dir = os.path.join(utils.dastcom5.SBPY_LOCAL_PATH, "dastcom5")
if not os.path.isdir(dastcom5_dir):
utils.dastcom5.download_dastcom5()

tb = utils.dastcom5.orbit_from_name(name=name)
return cls.from_table(tb)

@classmethod
@cite({'data source':
'https://minorplanetcenter.net/iau/MPEph/MPEph.html'})
'https://minorplanetcenter.net/iau/MPEph/MPEph.html'})
@cite({'software: astroquery': '2019AJ....157...98G'})
def from_mpc(cls, targetids, id_type=None, target_type=None, **kwargs):
"""Load latest orbital elements from the
Expand Down
6 changes: 6 additions & 0 deletions sbpy/data/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst

# This sub-module is destined for common non-package specific utility
# functions.

from sbpy.data.utils import dastcom5
Loading