From 8e22153dc3076bfb78bff287e2e217de1eda0804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Mon, 7 Oct 2024 17:52:43 -0400 Subject: [PATCH] remove `sdba-` in references --- src/xsdba/adjustment.py | 18 +++++++++--------- src/xsdba/loess.py | 8 ++++---- src/xsdba/processing.py | 10 +++++----- src/xsdba/utils.py | 14 +++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/xsdba/adjustment.py b/src/xsdba/adjustment.py index 4ecbb2b..3e3bfec 100644 --- a/src/xsdba/adjustment.py +++ b/src/xsdba/adjustment.py @@ -412,7 +412,7 @@ class EmpiricalQuantileMapping(TrainAdjust): References ---------- - :cite:cts:`sdba-deque_frequency_2007` + :cite:cts:`deque_frequency_2007` """ _allow_diff_calendars = False @@ -511,7 +511,7 @@ class DetrendedQuantileMapping(TrainAdjust): References ---------- - :cite:cts:`sdba-cannon_bias_2015` + :cite:cts:`cannon_bias_2015` """ _allow_diff_calendars = False @@ -622,7 +622,7 @@ class QuantileDeltaMapping(EmpiricalQuantileMapping): References ---------- - :cite:cts:`sdba-cannon_bias_2015` + :cite:cts:`cannon_bias_2015` """ def _adjust(self, sim, interp="nearest", extrapolation="constant"): @@ -716,8 +716,8 @@ class ExtremeValues(TrainAdjust): References ---------- - :cite:cts:`sdba-roy_juliaclimateclimatetoolsjl_2021` - :cite:cts:`sdba-roy_extremeprecip_2023` + :cite:cts:`roy_juliaclimateclimatetoolsjl_2021` + :cite:cts:`roy_extremeprecip_2023` """ @classmethod @@ -839,7 +839,7 @@ class LOCI(TrainAdjust): References ---------- - :cite:cts:`sdba-schmidli_downscaling_2006` + :cite:cts:`schmidli_downscaling_2006` """ _allow_diff_calendars = False @@ -984,7 +984,7 @@ class PrincipalComponents(TrainAdjust): References ---------- - :cite:cts:`sdba-hnilica_multisite_2017,sdba-alavoine_distinct_2022` + :cite:cts:`hnilica_multisite_2017,sdba-alavoine_distinct_2022` """ @classmethod @@ -1184,7 +1184,7 @@ class NpdfTransform(Adjust): References ---------- - :cite:cts:`sdba-cannon_multivariate_2018,sdba-cannon_mbc_2020,sdba-pitie_n-dimensional_2005,sdba-mezzadri_how_2007,sdba-szekely_testing_2004` + :cite:cts:`cannon_multivariate_2018,sdba-cannon_mbc_2020,sdba-pitie_n-dimensional_2005,sdba-mezzadri_how_2007,sdba-szekely_testing_2004` """ @classmethod @@ -1367,7 +1367,7 @@ class MBCn(TrainAdjust): References ---------- - :cite:cts:`sdba-cannon_multivariate_2018,sdba-cannon_mbc_2020,sdba-pitie_n-dimensional_2005,sdba-mezzadri_how_2007,sdba-szekely_testing_2004` + :cite:cts:`cannon_multivariate_2018,sdba-cannon_mbc_2020,sdba-pitie_n-dimensional_2005,sdba-mezzadri_how_2007,sdba-szekely_testing_2004` Notes ----- diff --git a/src/xsdba/loess.py b/src/xsdba/loess.py index 057d400..4cf1f53 100644 --- a/src/xsdba/loess.py +++ b/src/xsdba/loess.py @@ -86,9 +86,9 @@ def _loess_nb( References ---------- - :cite:cts:`sdba-cleveland_robust_1979` + :cite:cts:`cleveland_robust_1979` - Code adapted from: :cite:cts:`sdba-gramfort_lowess_2015` + Code adapted from: :cite:cts:`gramfort_lowess_2015` """ if skipna: nan = np.isnan(y) @@ -232,9 +232,9 @@ def loess_smoothing( References ---------- - :cite:cts:`sdba-cleveland_robust_1979` + :cite:cts:`cleveland_robust_1979` - Code adapted from: :cite:cts:`sdba-gramfort_lowess_2015` + Code adapted from: :cite:cts:`gramfort_lowess_2015` """ x = da[dim] x = ((x - x[0]) / (x[-1] - x[0])).astype(float) diff --git a/src/xsdba/processing.py b/src/xsdba/processing.py index 2faaaa6..3ffdd6f 100644 --- a/src/xsdba/processing.py +++ b/src/xsdba/processing.py @@ -92,7 +92,7 @@ def adapt_freq( References ---------- - :cite:cts:`sdba-themesl_empirical-statistical_2012` + :cite:cts:`themesl_empirical-statistical_2012` """ out = _adapt_freq(xr.Dataset(dict(sim=sim, ref=ref)), group=group, thresh=thresh) @@ -369,7 +369,7 @@ def reordering(ref: xr.DataArray, sim: xr.DataArray, group: str = "time") -> xr. References ---------- - :cite:cts:`sdba-cannon_multivariate_2018`. + :cite:cts:`cannon_multivariate_2018`. """ ds = xr.Dataset({"sim": sim, "ref": ref}) out: xr.Dataset = _reordering(ds, group=group).reordered @@ -435,7 +435,7 @@ def escore( References ---------- - :cite:cts:`sdba-baringhaus_new_2004,sdba-cannon_multivariate_2018,sdba-cannon_mbc_2020,sdba-szekely_testing_2004`. + :cite:cts:`baringhaus_new_2004,sdba-cannon_multivariate_2018,sdba-cannon_mbc_2020,sdba-szekely_testing_2004`. """ pts_dim, obs_dim = dims @@ -554,7 +554,7 @@ def to_additive_space( References ---------- - :cite:cts:`sdba-alavoine_distinct_2022`. + :cite:cts:`alavoine_distinct_2022`. """ # with units.context(infer_context(data.attrs.get("standard_name"))): lower_bound_array = np.array(lower_bound).astype(float) @@ -650,7 +650,7 @@ def from_additive_space( References ---------- - :cite:cts:`sdba-alavoine_distinct_2022`. + :cite:cts:`alavoine_distinct_2022`. """ if trans is None and lower_bound is None and units is None: try: diff --git a/src/xsdba/utils.py b/src/xsdba/utils.py index e977fa6..2b23ea1 100644 --- a/src/xsdba/utils.py +++ b/src/xsdba/utils.py @@ -642,7 +642,7 @@ def best_pc_orientation_simple( References ---------- - :cite:cts:`sdba-hnilica_multisite_2017` + :cite:cts:`hnilica_multisite_2017` """ m = R.shape[0] P = np.diag(val * np.ones(m)) @@ -691,7 +691,7 @@ def best_pc_orientation_full( References ---------- - :cite:cts:`sdba-alavoine_distinct_2022` + :cite:cts:`alavoine_distinct_2022` See Also -------- @@ -735,7 +735,7 @@ def get_clusters_1d( References ---------- - `getcluster` of Extremes.jl (:cite:cts:`sdba-jalbert_extreme_2022`). + `getcluster` of Extremes.jl (:cite:cts:`jalbert_extreme_2022`). """ # Boolean array, True where data is over u2 # We pad with values under u2, so that clusters never start or end at boundaries. @@ -876,7 +876,7 @@ def rand_rot_matrix( References ---------- - :cite:cts:`sdba-mezzadri_how_2007` + :cite:cts:`mezzadri_how_2007` """ if num > 1: return xr.concat([rand_rot_matrix(crd, num=1) for i in range(num)], "matrices") @@ -971,7 +971,7 @@ def bin_width_estimator(X): References ---------- - :cite:cts:`sdba-robin_2021` + :cite:cts:`robin_2021` """ if isinstance(X, list): return np.min([bin_width_estimator(x) for x in X], axis=0) @@ -1019,7 +1019,7 @@ def optimal_transport(gridX, gridY, muX, muY, num_iter_max, normalization): References ---------- - :cite:cts:`sdba-robin_2021` + :cite:cts:`robin_2021` """ try: from ot import emd # pylint: disable=import-outside-toplevel @@ -1060,7 +1060,7 @@ def eps_cholesky(M, nit=26): References ---------- - :cite:cts:`sdba-robin_2021,sdba-higham_1988,sdba-knol_1989` + :cite:cts:`robin_2021,sdba-higham_1988,sdba-knol_1989` """ MC = None try: