Skip to content

Commit 75d4b8c

Browse files
committed
Fix indentation on documentation directives.
Some directives were ignored because they were incorrectly indented.
1 parent 462f453 commit 75d4b8c

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

docs/development/design-principles.rst

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,49 @@ Use sbpy ``DataClass`` objects
3030

3131
* The classes enable easy parameter passing from online sources. Compare the following:
3232

33-
.. code-block:: python
33+
.. code-block:: python
3434
35-
eph = Ephem.from_horizons('2P')
36-
# rh, delta required, phase angle is optional:
37-
Afrho(wave, fluxd, aper, eph['rh'], eph['delta'], phase=eph['phase'])
38-
# more to the point:
39-
Afrho(wave, fluxd, aper, eph)
35+
eph = Ephem.from_horizons('2P')
36+
# rh, delta required, phase angle is optional:
37+
Afrho(wave, fluxd, aper, eph['rh'], eph['delta'], phase=eph['phase'])
38+
# more to the point:
39+
Afrho(wave, fluxd, aper, eph)
4040
4141
Carefully document which fields are used by your function or method.
4242
4343
* Dictionary-like objects may be allowed for user input, but should be internally converted to a ``DataClass`` object with the `~sbpy.data.dataclass_input` decorator:
4444

45-
.. code-block:: python
45+
.. code-block:: python
4646
47-
@dataclass_input(eph=Ephem)
48-
def H11(eph):
49-
...
47+
@dataclass_input(eph=Ephem)
48+
def H11(eph):
49+
...
5050
5151
The same, but using function annotations:
5252
53-
.. code-block:: python
53+
.. code-block:: python
5454
55-
@dataclass_input
56-
def H11(eph: Ephem):
57-
...
55+
@dataclass_input
56+
def H11(eph: Ephem):
57+
...
5858
5959
* Exceptions are allowed when only one parameter is needed, e.g., ``phase_func(phase)``. But instead consider using the relevant ``DataClass`` object, and decorating the function with `~sbpy.data.quantity_to_dataclass`:
6060

61-
.. code-block:: python
61+
.. code-block:: python
6262
63-
@quantity_to_dataclass(eph=(Ephem, 'phase'))
64-
def phase_func(eph):
65-
...
63+
@quantity_to_dataclass(eph=(Ephem, 'phase'))
64+
def phase_func(eph):
65+
...
6666
6767
The decorator may be stacked with ``dataclass_input`` for maximum
6868
flexibility:
6969
70-
.. code-block:: python
70+
.. code-block:: python
7171
72-
@dataclass_input
73-
@quantity_to_dataclass(eph=(Ephem, 'phase'))
74-
def phase_func(eph):
75-
...
72+
@dataclass_input
73+
@quantity_to_dataclass(eph=(Ephem, 'phase'))
74+
def phase_func(eph):
75+
...
7676
7777
7878
Append fields to ``DataClass`` at the user's request
@@ -94,11 +94,11 @@ Cite relevant works
9494
9595
* Citations may be executed internally with :func:`sbpy.bib.register`, or via the `~sbpy.bib.cite` decorator:
9696
97-
.. code-block:: python
97+
.. code-block:: python
9898
99-
@cite({'method': '1687pnpm.book.....N'})
100-
def force(mass, acceleration):
101-
return mass * acceleration
99+
@cite({'method': '1687pnpm.book.....N'})
100+
def force(mass, acceleration):
101+
return mass * acceleration
102102
103103
* Labels describing references (``'method'`` in the above example) are
104104
required to start with the following strings: ``'method'`` (for

docs/sbpy/activity/dust.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ Dust comae (`sbpy.activity.dust`)
88

99
The *Afρ* parameter of A'Hearn et al (1984) is based on observations of idealized cometary dust comae. It is proportional to the observed flux density within a circular aperture. The quantity is the product of dust albedo, dust filling factor, and the radius of the aperture at the distance of the comet. It carries the units of *ρ* (length), and under certain assumptions is proportional to the dust production rate of the comet:
1010

11-
.. math::
11+
.. math::
1212
13-
Afρ = \frac{4 Δ^2 r_h^2}{ρ}\frac{F_c}{F_⊙}
13+
Afρ = \frac{4 Δ^2 r_h^2}{ρ}\frac{F_c}{F_⊙}
1414
1515
where *Δ* and *ρ* have the same (linear) units, but :math:`r_h` is in units of au. :math:`F_c` * is the flux density of the comet in the aperture, and :math:`F_⊙` is that of the Sun at 1 au in the same units. See A'Hearn et al. (1984) and Fink & Rubin (2012) for more details.
1616

1717
The *εfρ* parameter is the thermal emission counterpart to *Afρ*, replacing albedo with IR emissivity, *ε*, and the solar spectrum with the Planck function, *B*:
1818

19-
.. math::
19+
.. math::
2020
21-
εfρ = \frac{F_c Δ^2}{π ρ B(T_c)}
21+
εfρ = \frac{F_c Δ^2}{π ρ B(T_c)}
2222
2323
where :math:`T_c` is the spectral temperature of the continuum (Kelley et al. 2013).
2424

docs/sbpy/data/obs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Observational Data Objects (`sbpy.data.Obs`)
88
For instance, this class allows you to query observations reported to the Minor
99
Planet Center for a given target via `astroquery.mpc.MPCClass.get_observations`:
1010

11-
.. doctest-remote-data::
11+
.. doctest-remote-data::
1212

1313
>>> from sbpy.data import Obs
1414
>>> data = Obs.from_mpc('2019 AA', id_type='asteroid designation')
@@ -37,7 +37,7 @@ function makes use of the query functions that are part of
3737
`~sbpy.data.Ephem` and allows you to pick a service from which you
3838
would like to obtain the data.
3939

40-
.. doctest-remote-data::
40+
.. doctest-remote-data::
4141

4242
>>> data.field_names
4343
['number', 'desig', 'discovery', 'note1', 'note2', 'epoch', 'RA', 'DEC', 'mag', 'band', 'observatory']

0 commit comments

Comments
 (0)