Skip to content

Commit dd34480

Browse files
committed
docs: added references to plotting API. added references in each docstring to where the function is used in the tutorials. Added and fixed multiple docs references. Added changelogs in docstrings with versionchanged/versionadded directives to outline major changes. Added optional label to multiple args in docstrings
ft: re-added xlabel_rotation for comparison_plots fix: typos in docstrings build-sphinx: rewrite "make clean" directive, to effectively delete generated sphinx-gallery and sphinx-autodocs material.
1 parent aebad73 commit dd34480

15 files changed

+398
-173
lines changed

csep/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def query_gns(start_time, end_time, min_magnitude=2.950,
333333
verbose (bool): print catalog summary statistics
334334
335335
Returns:
336-
:class:`csep.core.catalogs.CSEPCatalog
336+
:class:`csep.core.catalogs.CSEPCatalog`
337337
"""
338338

339339
# Timezone should be in UTC

csep/utils/plots.py

Lines changed: 311 additions & 152 deletions
Large diffs are not rendered by default.

docs/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ livehtml:
1717

1818
clean:
1919
rm -rf $(BUILDDIR)/*
20-
rm -rf auto_examples/
20+
rm -rf tutorials/*
21+
rm -rf reference/generated
2122

2223
.PHONY: help Makefile
2324

docs/concepts/evaluations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ statistics from these catalogs and compare them against one another.
9191

9292
We provide four statistics that probe fundamental aspects of the earthquake forecasts. Please see
9393
:ref:`Savran et al., 2020<savran-2020>` for a complete description of the individual tests. For the implementation
94-
details please follow the links below and see the :ref:`example<catalog-forecast-evaluation>` for catalog-based
94+
details please follow the links below and see the :ref:`Example <tutorial-catalog-forecast-evaluation>` for catalog-based
9595
forecast evaluation for an end-to-end walk through.
9696

9797
.. automodule:: csep.core.catalog_evaluations

docs/concepts/forecasts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Working with catalog-based forecasts
129129

130130
.. autosummary:: csep.core.forecasts.CatalogForecast
131131

132-
Please see visit :ref:`this<catalog-forecast-evaluation>` example for an end-to-end tutorial on how to evaluate a catalog-based
132+
Please see visit :ref:`this Example <tutorial-catalog-forecast-evaluation>` for an end-to-end tutorial on how to evaluate a catalog-based
133133
earthquake forecast. An example of a catalog-based forecast stored in the default pyCSEP format can be found
134134
`here <https://github.com/SCECcode/pycsep/blob/dev/csep/artifacts/ExampleForecasts/CatalogForecasts/ucerf3-landers_1992-06-28T11-57-34-14.csv>`__.
135135

docs/concepts/regions.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Regions
66

77
.. automodule:: csep.core.regions
88
:no-index:
9-
.. automodule:: csep.utils.basic_types
10-
:no-index:
119

1210
PyCSEP includes commonly used CSEP testing regions and classes that facilitate working with gridded data sets. This
1311
module is early in development and will be a focus of future development.

docs/getting_started/theory.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ examples use the Helmstetter et al (2007) smoothed seismicity forecast
104104
Found 24 events in the ComCat catalog.
105105
106106
107+
.. _theory-consistency-tests:
108+
107109
Consistency tests
108110
~~~~~~~~~~~~~~~~~
109111

@@ -655,6 +657,8 @@ case, the model with aftershocks performs statistically worse than the
655657
benchmark model. We note that this comparison is used for demonstation
656658
purposes only.
657659

660+
.. _theory-catalog-forecasts:
661+
658662
Catalog-based forecast tests
659663
----------------------------
660664

docs/reference/api_reference.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,28 +234,30 @@ Region utilities:
234234
.. currentmodule:: csep.utils.plots
235235
.. automodule:: csep.utils.plots
236236

237+
.. _api-plot-functions:
238+
237239
Plotting
238240
--------
239241

240-
General plotting:
242+
PyCSEP offers multiple plot functionalities to visually explore forecasts, catalogs and results.
243+
244+
Exploratory plotting:
241245

242246
.. autosummary::
243247
:toctree: generated
244248

245249
plot_magnitude_versus_time
246250
plot_cumulative_events_versus_time
247251
plot_magnitude_histogram
248-
plot_basemap
249-
plot_catalog
250-
plot_gridded_dataset
251252

252-
Plotting catalog-based evaluations:
253+
Spatial plotting:
253254

254255
.. autosummary::
255256
:toctree: generated
256257

257-
plot_test_distribution
258-
plot_calibration_test
258+
plot_basemap
259+
plot_catalog
260+
plot_gridded_dataset
259261

260262
Plotting grid-based evaluations:
261263

@@ -265,6 +267,14 @@ Plotting grid-based evaluations:
265267
plot_comparison_test
266268
plot_consistency_test
267269

270+
Plotting catalog-based evaluations:
271+
272+
.. autosummary::
273+
:toctree: generated
274+
275+
plot_test_distribution
276+
plot_calibration_test
277+
268278
Plotting alarm-based evaluations:
269279

270280
.. autosummary::

examples/tutorials/catalog_filtering.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100

101101

102102
####################################################################################################################################
103+
#
104+
# .. _tutorial-catalog-filtering-plot:
105+
#
103106
# Plot catalog
104107
# -------------
105108
#

examples/tutorials/catalog_forecast_evaluation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@
102102
comcat_catalog.plot(show=True)
103103

104104
####################################################################################################################################
105+
#
106+
# .. _catalog-forecast-evaluation-exploratory:
107+
#
105108
# Exploratory visualizations
106109
# --------------------------
107110
#
@@ -126,6 +129,9 @@
126129
number_test_result = catalog_evaluations.number_test(forecast, comcat_catalog)
127130

128131
####################################################################################################################################
132+
#
133+
# .. _catalog-forecast-evaluation-plot:
134+
#
129135
# Plot number test result
130136
# -----------------------
131137
#

0 commit comments

Comments
 (0)