Skip to content

fix broken import in doc, change README to rst file. #51

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 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion devutils/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
import sys

__basedir__ = os.getcwdu()
__basedir__ = os.getcwd()

from numpy.compat import unicode

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/examples/extract_single_peak.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import matplotlib.pyplot as plt

from diffpy.srmise.applications.plot import makeplot
from diffpy.srmise.baselines import Polynomial
from diffpy.srmise.baselines.polynomial import Polynomial
from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction


Expand Down
7 changes: 4 additions & 3 deletions doc/examples/fit_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@

import matplotlib.pyplot as plt

from diffpy.srmise import PDFPeakExtraction
from diffpy.srmise.applications.plot import makeplot
from diffpy.srmise.baselines import FromSequence
from diffpy.srmise.peaks import Peaks, TerminationRipples
from diffpy.srmise.baselines.fromsequence import FromSequence
from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction
from diffpy.srmise.peaks.base import Peaks
from diffpy.srmise.peaks.terminationripples import TerminationRipples


def run(plot=True):
Expand Down
3 changes: 2 additions & 1 deletion doc/examples/multimodel_known_dG1.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
import numpy as np

import diffpy.srmise.srmiselog as sml
from diffpy.srmise import MultimodelSelection, PDFPeakExtraction
from diffpy.srmise.multimodelselection import MultimodelSelection
from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction


def run(plot=True):
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/multimodel_known_dG2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import numpy as np

import diffpy.srmise.srmiselog as sml
from diffpy.srmise import MultimodelSelection
from diffpy.srmise.applications.plot import makeplot
from diffpy.srmise.multimodelselection import MultimodelSelection

# distances from ideal Ag (refined to PDF)
dcif = np.array(
Expand Down
5 changes: 3 additions & 2 deletions doc/examples/multimodel_unknown_dG1.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
import numpy as np

import diffpy.srmise.srmiselog as sml
from diffpy.srmise import MultimodelSelection, PDFPeakExtraction
from diffpy.srmise.baselines import FromSequence
from diffpy.srmise.baselines.fromsequence import FromSequence
from diffpy.srmise.multimodelselection import MultimodelSelection
from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction


def run(plot=True):
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/multimodel_unknown_dG2.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
import numpy as np

import diffpy.srmise.srmiselog as sml
from diffpy.srmise import MultimodelSelection
from diffpy.srmise.applications.plot import makeplot
from diffpy.srmise.multimodelselection import MultimodelSelection

# distances from ideal (unrefined) C60
dcif = np.array(
Expand Down
6 changes: 3 additions & 3 deletions doc/examples/parameter_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

import matplotlib.pyplot as plt

from diffpy.srmise import PDFPeakExtraction
from diffpy.srmise.applications.plot import makeplot
from diffpy.srmise.baselines import Polynomial
from diffpy.srmise.peaks import GaussianOverR
from diffpy.srmise.baselines.polynomial import Polynomial
from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction
from diffpy.srmise.peaks.gaussianoverr import GaussianOverR


def run(plot=True):
Expand Down
3 changes: 2 additions & 1 deletion doc/examples/query_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
import matplotlib.pyplot as plt
import numpy as np

from diffpy.srmise import ModelCovariance, PDFPeakExtraction
from diffpy.srmise.modelcluster import ModelCovariance
from diffpy.srmise.pdfpeakextraction import PDFPeakExtraction


def run(plot=True):
Expand Down
4 changes: 2 additions & 2 deletions src/diffpy/srmise/multimodelselection.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ def plot3dclassprobs(self, **kwds):
probfilter = kwds.pop("probfilter", [0.0, 1.0])
class_size = kwds.pop("class_size", "number")
norm = kwds.pop("norm", "auto")
cmap = kwds.pop("cmap", cm.jet)
highlight_cmap = kwds.pop("highlight_cmap", cm.gray)
cmap = kwds.pop("cmap", cm.get_cmap("jet"))
highlight_cmap = kwds.pop("highlight_cmap", cm.get_cmap("gray"))
title = kwds.pop("title", True)
p_alpha = kwds.pop("p_alpha", 0.7)
scale = kwds.pop("scale", 1.0)
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/srmise/peaks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def match_at(self, x, y):
return False
return any_scaled

def sort(self, key="position"):
def sort(self, reverse=False, key="position"):
"""Sort peaks in order specified by key."""
keypars = np.array([p[key] for p in self])
order = keypars.argsort()
Expand Down
Loading