Skip to content

Commit aa0da64

Browse files
committed
many minor doc fixes
1 parent ed2d0a6 commit aa0da64

File tree

5 files changed

+31
-26
lines changed

5 files changed

+31
-26
lines changed

stagpy/plates.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ def detect_plates(snap: Step, vz_thres_ratio: float = 0) -> tuple[NDArray, NDArr
4545
This function is cached for convenience.
4646
4747
Args:
48-
snap: a :class:`~stagpy._step.Step` of a StagyyData instance.
48+
snap: a `Step` of a `StagyyData` instance.
4949
vz_thres_ratio: if above zero, an additional check based on the
5050
vertical velocities is performed. Limits detected above a region
51-
where the vertical velocity is below vz_thres_ratio * mean(vzabs)
51+
where the vertical velocity is below `vz_thres_ratio * mean(vzabs)`
5252
are ignored.
5353
Returns:
5454
tuple (itrenches, iridges). 1D arrays containing phi-index of detected
@@ -215,10 +215,11 @@ def plot_at_surface(
215215
"""Plot surface diagnostics.
216216
217217
Args:
218-
snap: a :class:`~stagpy._step.Step` of a StagyyData instance.
218+
snap: a `Step` of a `StagyyData` instance.
219219
names: names of requested surface diagnotics. They are organized by
220220
figures, plots and subplots. Surface diagnotics can be valid
221221
surface field names, field names, or `"dv2"` which is d(vphi)/dphi.
222+
conf: configuration.
222223
"""
223224
if conf is None:
224225
conf = Config.default_()
@@ -336,9 +337,10 @@ def plot_scalar_field(
336337
"""Plot scalar field with plate information.
337338
338339
Args:
339-
snap: a :class:`~stagpy._step.Step` of a StagyyData instance.
340+
snap: a `Step` of a `StagyyData` instance.
340341
fieldname: name of the field that should be decorated with plate
341342
informations.
343+
conf: configuration.
342344
"""
343345
if conf is None:
344346
conf = Config.default_()

stagpy/processing.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def dtime(sdat: StagyyData) -> Tseries:
3030
Compute dt as a function of time.
3131
3232
Args:
33-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
33+
sdat: a `StagyyData` instance.
3434
Returns:
3535
dt and time arrays.
3636
"""
@@ -46,7 +46,7 @@ def dt_dt(sdat: StagyyData) -> Tseries:
4646
Compute dT/dt as a function of time using an explicit Euler scheme.
4747
4848
Args:
49-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
49+
sdat: a `StagyyData` instance.
5050
Returns:
5151
derivative of temperature and time arrays.
5252
"""
@@ -64,7 +64,7 @@ def ebalance(sdat: StagyyData) -> Tseries:
6464
Euler scheme. This should be zero if energy is conserved.
6565
6666
Args:
67-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
67+
sdat: a `StagyyData` instance.
6868
Returns:
6969
energy balance and time arrays.
7070
"""
@@ -89,7 +89,7 @@ def mobility(sdat: StagyyData) -> Tseries:
8989
Compute the ratio vsurf / vrms.
9090
9191
Args:
92-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
92+
sdat: a `StagyyData` instance.
9393
Returns:
9494
mobility and time arrays.
9595
"""
@@ -107,7 +107,7 @@ def delta_r(step: Step) -> Rprof:
107107
"""Compute cell thicknesses.
108108
109109
Args:
110-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
110+
step: a `Step` of a `StagyyData` instance.
111111
Returns:
112112
the thickness of the cells and radius.
113113
"""
@@ -130,7 +130,7 @@ def diff_prof(step: Step) -> Rprof:
130130
"""Compute diffusion flux.
131131
132132
Args:
133-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
133+
step: a `Step` of a `StagyyData` instance.
134134
Returns:
135135
the diffusion and radius.
136136
"""
@@ -152,7 +152,7 @@ def diffs_prof(step: Step) -> Rprof:
152152
This computation takes sphericity into account if necessary.
153153
154154
Args:
155-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
155+
step: a `Step` of a `StagyyData` instance.
156156
Returns:
157157
the diffusion and radius.
158158
"""
@@ -167,7 +167,7 @@ def advts_prof(step: Step) -> Rprof:
167167
This computation takes sphericity into account if necessary.
168168
169169
Args:
170-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
170+
step: a `Step` of a `StagyyData` instance.
171171
Returns:
172172
the scaled advection and radius.
173173
"""
@@ -184,7 +184,7 @@ def advds_prof(step: Step) -> Rprof:
184184
This computation takes sphericity into account if necessary.
185185
186186
Args:
187-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
187+
step: a `Step` of a `StagyyData` instance.
188188
Returns:
189189
the scaled downward advection and radius.
190190
"""
@@ -201,7 +201,7 @@ def advas_prof(step: Step) -> Rprof:
201201
This computation takes sphericity into account if necessary.
202202
203203
Args:
204-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
204+
step: a `Step` of a `StagyyData` instance.
205205
Returns:
206206
the scaled upward advection and radius.
207207
"""
@@ -218,7 +218,7 @@ def energy_prof(step: Step) -> Rprof:
218218
This computation takes sphericity into account if necessary.
219219
220220
Args:
221-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
221+
step: a `Step` of a `StagyyData` instance.
222222
Returns:
223223
the energy flux and radius.
224224
"""
@@ -238,7 +238,7 @@ def advth(step: Step) -> Rprof:
238238
radius.
239239
240240
Args:
241-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
241+
step: a `Step` of a `StagyyData` instance.
242242
Returns:
243243
the theoretical advection and radius.
244244
"""
@@ -262,7 +262,7 @@ def init_c_overturn(step: Step) -> Rprof:
262262
crystallization of a SMO is assumed.
263263
264264
Args:
265-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
265+
step: a `Step` of a `StagyyData` instance.
266266
Returns:
267267
the composition and radius.
268268
"""
@@ -298,7 +298,7 @@ def c_overturned(step: Step) -> Rprof:
298298
overturn happens.
299299
300300
Args:
301-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
301+
step: a `Step` of a `StagyyData` instance.
302302
Returns:
303303
the composition and radius.
304304
"""
@@ -314,7 +314,7 @@ def stream_function(step: Step) -> Field:
314314
"""Compute the stream function in 2D geometry.
315315
316316
Args:
317-
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
317+
step: a `Step` of a `StagyyData` instance.
318318
Returns:
319319
the stream function field.
320320
"""

stagpy/refstate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def plot_ref(sdat: StagyyData, var: str, conf: Optional[Config] = None) -> None:
1616
"""Plot one reference state.
1717
1818
Args:
19-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
19+
sdat: a `StagyyData` instance.
2020
var: refstate variable, a key of :data:`~stagpy.phyvars.REFSTATE`.
21+
conf: configuration.
2122
"""
2223
if conf is None:
2324
conf = Config.default_()

stagpy/rprof.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def plot_rprofs(
2727
rprofs: a radial profile collection, such as `Step.rprofs` or
2828
[`StepsView.rprofs_averaged`][stagpy.stagyydata.StepsView.rprofs_averaged].
2929
names: profile names organized by figures, plots and subplots.
30+
conf: configuration.
3031
"""
3132
if conf is None:
3233
conf = Config.default_()
@@ -75,8 +76,8 @@ def plot_grid(step: Step, conf: Optional[Config] = None) -> None:
7576
The figure is call grid_N.pdf where N is replace by the step index.
7677
7778
Args:
78-
step (:class:`~stagpy._step.Step`): a step of a StagyyData
79-
instance.
79+
step: a `Step` of a `StagyyData` instance.
80+
conf: configuration.
8081
"""
8182
if conf is None:
8283
conf = Config.default_()

stagpy/time_series.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
def _collect_marks(sdat: StagyyData, conf: Config) -> list[float]:
23-
"""Concatenate mark* config variable."""
23+
"""Concatenate `mark*` config variable."""
2424
times = list(conf.time.marktimes)
2525
times.extend(step.timeinfo["t"] for step in sdat.snaps[conf.time.marksnaps])
2626
times.extend(step.timeinfo["t"] for step in sdat.steps[conf.time.marksteps])
@@ -35,8 +35,9 @@ def plot_time_series(
3535
"""Plot requested time series.
3636
3737
Args:
38-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
38+
sdat: a `StagyyData` instance.
3939
names: time series names organized by figures, plots and subplots.
40+
conf: configuration.
4041
"""
4142
if conf is None:
4243
conf = Config.default_()
@@ -99,13 +100,13 @@ def compstat(
99100
"""Compute statistics from series output by StagYY.
100101
101102
Args:
102-
sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
103+
sdat: a `StagyyData` instance.
103104
names: variables whose statistics should be computed.
104105
tstart: starting time. Set to None to start at the beginning of
105106
available data.
106107
tend: ending time. Set to None to stop at the end of available data.
107108
Returns:
108-
a :class:`pandas.DataFrame` with statistics. 'mean' and 'rms' as index,
109+
a `pandas.DataFrame` with statistics. 'mean' and 'rms' as index,
109110
variable names as columns.
110111
"""
111112
stats = pd.DataFrame(columns=names, index=["mean", "rms"])

0 commit comments

Comments
 (0)