Skip to content

Commit

Permalink
Various minor changes to clean up doc build log of all warnings
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
loicdtx committed Jul 29, 2024
1 parent 018db32 commit 30164c9
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 26 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions docs/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,5 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:noindex:

2 changes: 1 addition & 1 deletion docs/classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ disturbances.

.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN

.. figure:: images/concept.png
.. figure:: _static/concept.png

|copy| Copyright European Union, 2022; Jonas Viehweger

Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns = ['gallery/README.rst']


# -- Options for HTML output -------------------------------------------------
Expand All @@ -71,8 +71,8 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['images']
html_logo = "images/logo.png"
html_static_path = ['_static']
html_logo = "_static/logo.png"
html_theme_options = {
'logo_only': True,
'display_version': False,
Expand Down
6 changes: 3 additions & 3 deletions docs/gallery/dontplot_bolivia_stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- Generate a simple rule-based forest mask
- Simulate a near real-time monitoring scenario
"""
# sphinx_gallery_thumbnail_path = 'images/iqr_results_bolivia.png'
# sphinx_gallery_thumbnail_path = '_static/iqr_results_bolivia.png'

#############################################
# Define the study area
Expand Down Expand Up @@ -262,7 +262,7 @@
ax.set_yticks([])

###############################################################################
# .. image:: ../../_static/forest_mask_bolivia.png
# .. image:: ../_static/forest_mask_bolivia.png

###############################################################################
# Monitoring simulation
Expand Down Expand Up @@ -316,7 +316,7 @@
ax.set_yticks([])

###############################################################################
# .. image:: ../../_static/iqr_results_bolivia.png
# .. image:: ../_static/iqr_results_bolivia.png
#
# The resulting mask reveals clear signs of agricultural expansion in the
# east and south-west of the study area, as well as more subtle traces of
Expand Down
32 changes: 17 additions & 15 deletions nrt/monitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ class and must implement the abstract methods ``fit()``, ``monitor()``
mask (numpy.ndarray): A 2D numpy array containing pixels that should
be monitored (1) and not (0). The mask may be updated following
historing period stability check, and after a call to monitor
following a confirmed break. Values are as follow.
``{0: 'Not monitored',
1: 'monitored',
2: 'Unstable history',
3: 'Confirmed break - no longer monitored',
4: 'Not enough observations - not monitored'}``
following a confirmed break. Values are as follow::
{0: 'Not monitored',
1: 'monitored',
2: 'Unstable history',
3: 'Confirmed break - no longer monitored',
4: 'Not enough observations - not monitored'}
trend (bool): Indicate whether stable period fit is performed with
trend or not
harmonic_order (int): The harmonic order of the time-series regression
Expand All @@ -66,7 +68,7 @@ class and must implement the abstract methods ``fit()``, ``monitor()``
when using stable fitting algorithms
update_mask (bool): Specifies whether to update the mask and halt
further monitoring when values exceed boundary limits during a
`.monitor()` call. A ``True`` value indicates that crossing the
``.monitor()`` call. A ``True`` value indicates that crossing the
boundary limits will trigger a mask update and stop successive
observation monitoring.
Expand All @@ -81,7 +83,7 @@ class and must implement the abstract methods ``fit()``, ``monitor()``
harmonic_order (int): The harmonic order of the time-series regression
save_fit_start (bool): If start of the fit should be reported in the
model. Only applicable to stable fits (e.g. 'ROC', 'CCDC-stable').
If true, the data will be saved in the attribute `fit_start`
If true, the data will be saved in the attribute ``fit_start``
x_coords (numpy.ndarray): x coordinates
y_coords (numpy.ndarray): y coordinates
process (numpy.ndarray): 2D numpy array containing the
Expand All @@ -95,7 +97,7 @@ class and must implement the abstract methods ``fit()``, ``monitor()``
when using stable fitting algorithms
update_mask (bool): Specifies whether to update the mask and halt
further monitoring when values exceed boundary limits during a
`.monitor()` call. A ``True`` value (default) indicates that
``.monitor()`` call. A ``True`` value (default) indicates that
crossing the boundary limits will trigger a mask update and stop
successive observation monitoring.
"""
Expand Down Expand Up @@ -329,9 +331,9 @@ def _report(self, layers, dtype):
the report. Valid options are ``'mask'`` (the main output layer
containing confirmed breaks, non-monitored pixels, etc), ``'detection_date'``
(an integer value matching each confirmed break and indicating the date
the break was confirmed in days since epoch), ``'process'`` (the process
value). The process value has a different meaning and interpretation
for each monitoring method.
the break was confirmed in days since epoch), ``'process'`` (the process
value). The process value has a different meaning and interpretation
for each monitoring method.
dtype (type): The datatype of the stacked layers. Note that when returning
process value for MoSum, CuSum or EWMA the ``dtype`` should be set
to a float type to retain values
Expand All @@ -356,9 +358,9 @@ def report(self, filename, layers=['mask', 'detection_date'],
the report. Valid options are ``'mask'`` (the main output layer
containing confirmed breaks, non-monitored pixels, etc), ``'detection_date'``
(an integer value matching each confirmed break and indicating the date
the break was confirmed in days since epoch), ``'process'`` (the process
value). The process value has a different meaning and interpretation
for each monitoring method.
the break was confirmed in days since epoch), ``'process'`` (the process
value). The process value has a different meaning and interpretation
for each monitoring method.
dtype (type): The datatype of the stacked layers. Note that when returning
process value for MoSum, CuSum or EWMA the ``dtype`` should be set
to a float type to retain values
Expand Down
8 changes: 4 additions & 4 deletions nrt/utils_efp.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def history_roc(X, y, alpha=0.05, crit=0.9478982340418134):
crit (float): Critical value corresponding to the chosen alpha. Can be
calculated with ``_cusum_rec_test_crit``.
Default is the value for alpha=0.05
Returns:
(int) Index of structural change in y.
0: y completely stable
>0: y stable after this index
Returns:
int: Index of structural change in y.
``0`` - y completely stable
``>0`` - y stable after this index
"""
# Index, where instability in time-series is detected
# 0: time-series completely stable
Expand Down

0 comments on commit 30164c9

Please sign in to comment.