Skip to content

numpydoc build on peakstability #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions src/diffpy/srmise/peakstability.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,17 @@ def plot(self, **kwds):
)

def setcurrent(self, idx):
"""Make the idxth model the active one."""
"""Make the idxth model the active one.

Parameters
----------
idx : int
The index of the model to be tested.

Returns
-------
None
"""
self.current = idx
if idx is not None:
result = self.results[idx]
Expand All @@ -140,11 +150,15 @@ def setcurrent(self, idx):
def animate(self, results=None, step=False, **kwds):
"""Show animation of extracted peaks from first to last.

Parameters:
step - Require keypress to show next plot
results - The indices of results to show
Keywords passed to pyplot.plot()

Keywords passed to pyplot.plot()"""
Parameters
----------
step : bool
Require keypress to show next plot
results array-like
The indices of results to show
"""
if results is None:
results = range(len(self.results))

Expand All @@ -165,9 +179,16 @@ def animate(self, results=None, step=False, **kwds):
self.setcurrent(oldcurrent)

def run(self, err, savecovs=False):
"""err is sequence of uncertainties to run at.
"""Running the uncertainty for the results.

Parameters
----------
err : array-like
The sequence of uncertainties to run at.
savecovs : bool
boolean to determine to save covariance matrix. Default is False.
If savecovs is True, return the covariance matrix for each final fit."""

If savecovs is True, return the covariance matrix for each final fit."""
self.results = []
covs = []
for i, e in enumerate(err):
Expand Down
Loading