Skip to content

Commit

Permalink
Docstring fixes (#565)
Browse files Browse the repository at this point in the history
* fix see also formatting

* add jupyter execute syntax

* Delete scratch.ipynb

---------

Co-authored-by: Alexander James <[email protected]>
  • Loading branch information
jordanplanders and alexkjames authored Jun 2, 2024
1 parent f87f764 commit 082667c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyleoclim/core/multipleseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,7 @@ def resolution(self,time_unit=None,verbose=True,statistic='median'):
If a recognized statistic is passed, this function will simply output that statistic applied to the resolution of each series in the MulitipleSeries object. Options are 'mean' or 'median'.
If statistic is None, then the function will return a new MultipleResolution class with plotting capabilities.
See Also
See also
--------
pyleoclim.core.resolutions.MultipleResolution
Expand Down
1 change: 1 addition & 0 deletions pyleoclim/core/psds.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ def beta_est(self, fmin=None, fmax=None, logf_binning_step='max', verbose=False)
See also
--------
pyleoclim.core.series.Series.spectral : spectral analysis
pyleoclim.utils.spectral.beta_estimation : Estimate the scaling exponent of a power spectral density
Expand Down
7 changes: 1 addition & 6 deletions pyleoclim/core/resolutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class Resolution:
timeseries : pyleoclim.Series
Original pyleoclim timeseries object.
See Also
--------
'''

Expand Down Expand Up @@ -385,9 +383,6 @@ def dashboard(self, figsize=[11, 8], title=None, plot_kwargs=None, histplot_kwar
The axis
See also
--------
Examples
--------
Expand Down Expand Up @@ -474,7 +469,7 @@ class MultipleResolution:
time_unit : str
The unit of time for the resolution.
See Also
See also
--------
Resolution : The base class from which MultipleResolution is derived.
Expand Down
2 changes: 1 addition & 1 deletion pyleoclim/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4276,7 +4276,7 @@ def resolution(self):
resolution : Resolution
Resolution object
See Also
See also
--------
pyleoclim.core.resolutions.Resolution
Expand Down
15 changes: 12 additions & 3 deletions pyleoclim/core/surrogateseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def from_series(self, target_series):
--------
pyleoclim.utils.tsmodel.ar1_sim : AR(1) simulator
pyleoclim.utils.tsmodel.uar1_sim : maximum likelihood AR(1) simulator
pyleoclim.utils.tsutils.phaseran2 : phase randomization
Examples
Expand Down Expand Up @@ -211,14 +213,21 @@ def from_param(self, param, length=50, time_pattern = 'even', settings=None):
--------
pyleoclim.utils.tsmodel.ar1_sim : AR(1) simulator
pyleoclim.utils.tsmodel.colored_noise: simulating from a power law spectrum, $S(f) \propto f^{-\beta}$
pyleoclim.utils.tsmodel.random_time_axis : Generate time increment vector according to a specific probability model
Examples
--------
ar1 = pyleo.SurrogateSeries(method='ar1sim', number=10)
ar1.from_param(length=100, param = [2,2])
ar1.plot_envelope(title=rf'AR(1) synthetic series ($\tau={2},\sigma^2={2}$)')
.. jupyter-execute::
import pyleoclim as pyleo
ar1 = pyleo.SurrogateSeries(method='ar1sim', number=10)
ar1.from_param(length=100, param = [2,2])
ar1.plot_envelope(title=rf'AR(1) synthetic series ($\tau={2},\sigma^2={2}$)')
'''
param = param if isinstance(param, list) else [param] # coerce param into a list, no matter the original format
Expand Down

0 comments on commit 082667c

Please sign in to comment.