Skip to content

Commit 445d2c4

Browse files
Update documentation -- QM and QDM formulas (#62)
1 parent ea93a78 commit 445d2c4

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

cmethods/distribution.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def quantile_mapping(
3737
**kwargs: Any,
3838
) -> np.ndarray:
3939
r"""
40-
**Do not call this function directly, please use :func:`cmethods.CMethods.adjust`**
40+
**Do not call this function directly, please use :func:`cmethods.adjust`**
4141
See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#quantile-mapping
4242
"""
4343
check_adjust_called(
@@ -205,7 +205,7 @@ def quantile_delta_mapping(
205205
**kwargs: Any,
206206
) -> NPData:
207207
r"""
208-
**Do not call this function directly, please use :func:`cmethods.CMethods.adjust`**
208+
**Do not call this function directly, please use :func:`cmethods.adjust`**
209209
210210
See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#quantile-delta-mapping
211211
"""

cmethods/scaling.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def linear_scaling(
3737
**kwargs: Any,
3838
) -> NPData:
3939
r"""
40-
**Do not call this function directly, please use :func:`cmethods.CMethods.adjust`**
40+
**Do not call this function directly, please use :func:`cmethods.adjust`**
4141
4242
See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#linear-scaling
4343
"""
@@ -125,7 +125,7 @@ def delta_method(
125125
**kwargs: Any,
126126
) -> NPData:
127127
r"""
128-
**Do not call this function directly, please use :func:`cmethods.CMethods.adjust`**
128+
**Do not call this function directly, please use :func:`cmethods.adjust`**
129129
See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#delta-method
130130
"""
131131
check_adjust_called(

doc/src/methods.rst

+7-11
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ In the following the equations of Alex J. Cannon (2015) are shown and explained:
269269

270270
**Multiplicative**:
271271

272-
.. math::
273-
274-
X^{*QM}_{sim,p}(i) = F^{-1}_{obs,h}\Biggl\{F_{sim,h}\left[\frac{\mu{X_{sim,h}} \cdot X_{sim,p}(i)}{\mu{X_{sim,p}(i)}}\right]\Biggr\}\frac{\mu{X_{sim,p}(i)}}{\mu{X_{sim,h}}}
272+
The formula is the same as for the additive variant, but the values are
273+
bound to the lower level of zero. The upper and lower boundary can be
274+
adjusted by passing the hidden arguments ``val_min`` and ``val_max``.
275275

276276
.. code-block:: python
277277
:linenos:
@@ -324,24 +324,20 @@ Preserve Changes in Quantiles and Extremes?"*
324324
The following equations qre based on Alex J. Cannon (2015) but extended the
325325
shift of :math:`X_{sim,p}(i)`:
326326

327-
**Shift of value range**:
328-
329-
.. math::
330-
331-
X_{sim,p}^{*DT}(i) = X_{sim,p}(i) + \Delta\mu
332-
333327
**Additive**:
334328

335329
.. math::
336330
337-
X_{sim,p}^{*DQM}(i) = F_{obs,h}^{-1}\left\{F_{sim,h}\left[X_{sim,p}^{*DT}(i)\right]\right\}
331+
X_{sim,p}^{*DT}(i) & = X_{sim,p}(i) + \Delta\mu \\[1pt]
332+
X_{sim,p}^{*DQM}(i) & = F_{obs,h}^{-1}\left\{F_{sim,h}\left[X_{sim,p}^{*DT}(i)\right]\right\}
338333
339334
340335
**Multiplicative**:
341336

342337
.. math::
343338
344-
X^{*DQM}_{sim,p}(i) = F^{-1}_{obs,h}\Biggl\{F_{sim,h}\left[\frac{\mu{X_{sim,h}} \cdot X_{sim,p}^{*DT}(i)}{\mu{X_{sim,p}^{*DT}(i)}}\right]\Biggr\}\frac{\mu{X_{sim,p}^{*DT}(i)}}{\mu{X_{sim,h}}}
339+
X_{sim,p}^{*DT}(i) & = X_{sim,p}(i) \cdot \Delta\mu \\[1pt]
340+
X^{*DQM}_{sim,p}(i) & = F^{-1}_{obs,h}\Biggl\{F_{sim,h}\left[\frac{\mu{X_{sim,h}} \cdot X_{sim,p}^{*DT}(i)}{\mu{X_{sim,p}^{*DT}(i)}}\right]\Biggr\}\frac{\mu{X_{sim,p}^{*DT}(i)}}{\mu{X_{sim,h}}}
345341
346342
347343
.. code-block:: python

0 commit comments

Comments
 (0)