Skip to content

Commit

Permalink
Document syndynes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkelley committed Dec 9, 2023
1 parent de277d0 commit ea0f4b9
Show file tree
Hide file tree
Showing 12 changed files with 548 additions and 287 deletions.
451 changes: 451 additions & 0 deletions docs/sbpy/activity/dust.rst

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions docs/sbpy/activity/dust/dynamics.rst

This file was deleted.

212 changes: 0 additions & 212 deletions docs/sbpy/activity/dust/index.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/sbpy/activity/dust/syndynes.rst

This file was deleted.

12 changes: 7 additions & 5 deletions docs/sbpy/activity/index.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
Activity Module (`sbpy.activity`)
=================================

Introduction
------------

`sbpy.activity` models cometary dust and gas activity. It is separated into two main sub-modules: :doc:`dust/index` and :doc:`gas`. The base module itself defines photometric apertures that may be useful for observations of comets.
`sbpy.activity` models cometary dust and gas activity. It is separated into two main sub-modules: :doc:`dust` and :doc:`gas`. The base module itself defines photometric apertures that may be useful for observations of comets.

.. toctree::
:maxdepth: 2
:caption: Table of Contents

dust/index
dust
gas


Expand Down Expand Up @@ -54,3 +51,8 @@ Reference/API
-------------
.. automodapi:: sbpy.activity
:no-heading:
:include: Aperture
:include: CircularAperture
:include: AnnularAperture
:include: RectangularAperture
:include: GaussianAperture
2 changes: 1 addition & 1 deletion sbpy/activity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
SBPy Module for simulating cometary activity and observations.
Cometary activity and observations.
"""

from .core import *
Expand Down
4 changes: 0 additions & 4 deletions sbpy/activity/dust/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
sbpy Activity: dust
===================
All things comet dust related.
"""


Expand Down
70 changes: 42 additions & 28 deletions sbpy/activity/dust/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,25 +424,19 @@ def from_ephem(
)


_dynamical_model_parameters = """
Parameters
class DynamicalModel(abc.ABC):
"""Super-class for dynamical models.
Parameters
----------
**kwargs
Arguments passed on to `~scipy.integrate.solve_ivp`. Units are seconds,
km, and km/s, e.g., ``max_step`` is a float value in units of seconds.
For relative and absolute tolerance keywords, ``rtol`` and ``atol``,
6-element arrays may be used, where the first three elements are for
position, and the last three are for velocity.
"""

class DynamicalModel(abc.ABC):
"""Super-class for dynamical models.
{}
""".format(
_dynamical_model_parameters
)
"""

def __init__(self, **kwargs):
self.solver_kwargs: dict = dict(
Expand Down Expand Up @@ -552,12 +546,19 @@ def solve(


class FreeExpansion(DynamicalModel):
"""Particle motion in free space.
{}
""".format(
_dynamical_model_parameters
)
"""Equation of motion solver for particle motion in free space.
Parameters
----------
**kwargs
Arguments passed on to `~scipy.integrate.solve_ivp`. Units are seconds,
km, and km/s, e.g., ``max_step`` is a float value in units of seconds.
For relative and absolute tolerance keywords, ``rtol`` and ``atol``,
6-element arrays may be used, where the first three elements are for
position, and the last three are for velocity.
"""

@classmethod
def dx_dt(cls, t: float, rv: np.ndarray, *args) -> np.ndarray:
Expand All @@ -580,12 +581,19 @@ def df_drv(cls, t: float, rv: np.ndarray, *args) -> np.ndarray:


class SolarGravity(DynamicalModel):
"""Particle orbiting the Sun.
{}
""".format(
_dynamical_model_parameters
)
"""Equation of motion solver for a particle orbiting the Sun.
Parameters
----------
**kwargs
Arguments passed on to `~scipy.integrate.solve_ivp`. Units are seconds,
km, and km/s, e.g., ``max_step`` is a float value in units of seconds.
For relative and absolute tolerance keywords, ``rtol`` and ``atol``,
6-element arrays may be used, where the first three elements are for
position, and the last three are for velocity.
"""

_GM: float = (const.G * const.M_sun).to_value("km3/s2")

Expand Down Expand Up @@ -640,7 +648,7 @@ def df_drv(cls, t: float, rv: np.ndarray, *args) -> np.ndarray:


class SolarGravityAndRadiationPressure(DynamicalModel):
"""Particle orbiting the Sun considering radiation force.
"""Equation of motion solver for a particle orbiting the Sun, including radiation force.
Dust is parameterized with ``beta``, the ratio of the force from solar
Expand All @@ -662,10 +670,16 @@ class SolarGravityAndRadiationPressure(DynamicalModel):
Poynting-Roberston drag and general relativity are not included.
{}
""".format(
_dynamical_model_parameters
)
Parameters
----------
**kwargs
Arguments passed on to `~scipy.integrate.solve_ivp`. Units are seconds,
km, and km/s, e.g., ``max_step`` is a float value in units of seconds.
For relative and absolute tolerance keywords, ``rtol`` and ``atol``,
6-element arrays may be used, where the first three elements are for
position, and the last three are for velocity.
"""

# For quick reference
_GM: float = (const.G * const.M_sun).to_value("km3/s2")
Expand Down
Loading

0 comments on commit ea0f4b9

Please sign in to comment.