Skip to content

Cookie #105

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 65 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5684c18
Lint check & fix to python3 format (#18)
stevenhua0320 Jul 29, 2024
a4221ff
lint check & change to python3 & pre-commit check (#19)
stevenhua0320 Jul 29, 2024
866e714
lint check and fix print and exception python2 issue (#20)
stevenhua0320 Jul 29, 2024
c28b97b
lint check and fix python2 print and exception issues (#21)
stevenhua0320 Jul 29, 2024
ff0fc58
finish parenthesizing print statements (#24)
sbillinge Jul 29, 2024
7c77b11
fix too many leading #, import modules, and unused var (#29)
stevenhua0320 Jul 30, 2024
21d1a53
requirements (#30)
sbillinge Jul 30, 2024
181a54a
fix import module not used & string check (#25)
stevenhua0320 Jul 30, 2024
8772a95
fix too many leading "#" in string block (#26)
stevenhua0320 Jul 30, 2024
ffe5fc7
lint check, remove unused import modules & remove too many "#". (#27)
stevenhua0320 Jul 30, 2024
edaa35d
remove unused modules, ambiguous variable name (#28)
stevenhua0320 Jul 30, 2024
1f67292
cleaning (#31)
sbillinge Jul 30, 2024
30d0909
Copyright (#32)
sbillinge Jul 30, 2024
7dd69bc
lint check, fix break import modules, remove unused import modules, r…
stevenhua0320 Jul 30, 2024
81b261b
fix break import modules, remove unused import modules, fix docstring…
stevenhua0320 Jul 30, 2024
978dca1
fix formatting issue and typo in copyright (#35)
stevenhua0320 Jul 30, 2024
c0d43e6
clean out inits (#38)
sbillinge Jul 31, 2024
9a2d7cc
peakextraction.py and init (#40)
sbillinge Jul 31, 2024
d237df0
move untrack doc and requirement files (#41)
stevenhua0320 Jul 31, 2024
f3cdb58
add pyproject.toml (#42)
stevenhua0320 Jul 31, 2024
9ecf5e8
move diffpy files to src dir (#44)
stevenhua0320 Jul 31, 2024
e1a5e58
LICENSE (#45)
stevenhua0320 Jul 31, 2024
0b46507
add untrack files and add cookiecut.rst news (#46)
stevenhua0320 Jul 31, 2024
c1886a1
fix py2 -> py3, fix broken import, remove deprecation warning (#47)
stevenhua0320 Aug 2, 2024
f31d3d4
fix broken import, remove deprecated pkg_resource (#50)
stevenhua0320 Aug 2, 2024
ee8f1b2
change import path to make it work. (#48)
stevenhua0320 Aug 2, 2024
8f6c376
fix import modules, py2->py3 (#49)
stevenhua0320 Aug 2, 2024
9f81b5f
fix broken import in doc, change README to rst file. (#51)
stevenhua0320 Aug 6, 2024
8270200
fix p2 to p3 (#52)
stevenhua0320 Aug 6, 2024
89c8c0b
add test for dataclusters (#54)
stevenhua0320 Aug 10, 2024
5aad8bd
Eq tests (#59)
sbillinge Aug 10, 2024
5be09d5
add attributes in eq method (#60)
stevenhua0320 Aug 11, 2024
d1bf3d4
Add set data test cases (#61)
stevenhua0320 Aug 13, 2024
48c5d64
fix arbitrary.py to numpydoc format (#68)
stevenhua0320 Aug 14, 2024
20b4d01
print things correctly (#71)
stevenhua0320 Aug 14, 2024
6e62077
change createpeak to actualize function (#72)
stevenhua0320 Aug 15, 2024
578a972
fix import and counting to make it work (#74)
stevenhua0320 Aug 16, 2024
3773bcf
refactor makeclusters to make it work (#73)
stevenhua0320 Aug 16, 2024
abfdb5b
deprecation remove (#78)
stevenhua0320 Aug 16, 2024
e58e0c7
Revert "refactor makeclusters to make it work (#73)" (#79)
stevenhua0320 Aug 16, 2024
ee41be5
try out py2 before py3 refactor to make sure correct workflow (#75)
stevenhua0320 Aug 17, 2024
abe0c2a
fix false counting and numpy to int (#80)
stevenhua0320 Aug 19, 2024
8716a9d
numpydoc edition (#81)
stevenhua0320 Aug 19, 2024
e87962f
numpydoc build (#82)
stevenhua0320 Aug 19, 2024
6458a3e
numpydoc build on peakstability (#83)
stevenhua0320 Aug 19, 2024
35a2ef4
numpydoc build for ModelCluster (#85)
stevenhua0320 Aug 20, 2024
df43be6
numpydoc build for multimodelselection.py (#87)
stevenhua0320 Aug 20, 2024
4d3d8ff
numpydoc documentation build for ModelCluster class (#86)
stevenhua0320 Aug 20, 2024
def4a2d
numpydoc build for pdfdataset (#88)
stevenhua0320 Aug 21, 2024
4cb462e
numpydoc build for pdfpeakextraction.py (#89)
stevenhua0320 Aug 21, 2024
03b18c1
numpydoc build for gaussianoverr.py (#91)
stevenhua0320 Aug 22, 2024
d55b946
terminationripples.py numpydoc build (#92)
stevenhua0320 Aug 22, 2024
d722872
numpydoc build for gaussian.py (#90)
stevenhua0320 Aug 22, 2024
a66843b
numpydoc build for base.py (#95)
stevenhua0320 Aug 23, 2024
e7e53cb
numpydoc build for polynomial.py (#97)
stevenhua0320 Aug 23, 2024
608a1c1
numpydoc build for fromsequence.py (#99)
stevenhua0320 Aug 23, 2024
bb71671
numpydoc build for nanospherical.py (#98)
stevenhua0320 Aug 23, 2024
f7cc015
numpydoc build for base.py in Baseline class (#96)
stevenhua0320 Aug 23, 2024
2b8c446
numpydoc build for aic.py (#93)
stevenhua0320 Aug 23, 2024
caab0af
numpydoc build for aicc.py (#94)
stevenhua0320 Aug 23, 2024
16039d6
numpydoc build for ModelCovariance (#84)
stevenhua0320 Aug 23, 2024
38ab653
numpydoc build for modelparts.py (#100)
stevenhua0320 Aug 24, 2024
e47955f
numpydoc build for basefunction.py (#101)
stevenhua0320 Aug 24, 2024
356129a
api workflow build for diffpy.srmise (#102)
stevenhua0320 Aug 26, 2024
30f856e
add changed news (#103)
stevenhua0320 Sep 4, 2024
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
Prev Previous commit
Next Next commit
Revert "refactor makeclusters to make it work (#73)" (#79)
This reverts commit 3773bcf.
  • Loading branch information
stevenhua0320 authored Aug 16, 2024
commit e58e0c7019451af4cf5c2cbac8ab8c955cdc091d
13 changes: 7 additions & 6 deletions src/diffpy/srmise/dataclusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _setdata(self, x, y, res):
self.lastcluster_idx = None
return

def cluster_next_point(self):
def next(self):
"""Cluster point with largest y-coordinate left, returning self.

next() always adds at least one additional point to the existing
Expand Down Expand Up @@ -217,13 +217,14 @@ def cluster_next_point(self):
else:
# insert right of nearest cluster
self.lastcluster_idx = nearest_cluster[0] + 1
self.clusters = np.insert(self.clusters, int(self.lastcluster_idx), [test_idx, test_idx], 0)
self.clusters = np.insert(self.clusters, self.lastcluster_idx, [test_idx, test_idx], 0)
return self

def makeclusters(self):
"""Cluster all remaining data."""
while self.current_idx > 0:
self.cluster_next_point()
for i in self:
pass
return

def find_nearest_cluster2(self, x):
"""Return [cluster index, distance] for cluster nearest to x.
Expand Down Expand Up @@ -285,8 +286,8 @@ def find_nearest_cluster(self, idx):
# Calculate which of the two nearest clusters is closer
distances = np.array(
[
self.x[idx] - self.x[self.clusters[int(near_idx) - 1, 1]],
self.x[idx] - self.x[self.clusters[int(near_idx), 0]],
self.x[idx] - self.x[self.clusters[near_idx - 1, 1]],
self.x[idx] - self.x[self.clusters[near_idx, 0]],
]
)
if distances[0] < np.abs(distances[1]):
Expand Down
Loading