Skip to content

Commit

Permalink
2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed May 20, 2022
1 parent 9ed1a19 commit aea5292
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion findpeaks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

__author__ = 'Erdogan Tasksen'
__email__ = '[email protected]'
__version__ = '2.4.0'
__version__ = '2.4.1'

# module level doc-string
__doc__ = """
Expand Down
21 changes: 18 additions & 3 deletions findpeaks/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,25 @@
# print(findpeaks.__version__)

# pip install opencv-python
import matplotlib.pyplot as plt
# import matplotlib.pyplot as plt
# from findpeaks import findpeaks

# %% issue #12
# https://github.com/erdogant/findpeaks/issues/12
import numpy as np

X = np.sin(np.linspace(0, 1, 100))
from findpeaks import findpeaks
fp = findpeaks(method='caerus', params_caerus={'window': 50, 'minperc': 3, 'nlargest': 10, 'threshold': 0.25})
results = fp.fit(X)

# %%
from caerus import caerus
cs = caerus(window=50, threshold=0.25, minperc=10, nlargest=10)
cs.fit(X, verbose=3)
cs.plot()


# %% Issue
from findpeaks import findpeaks
fp = findpeaks(method="mask", denoise=None, window=3, limit=None, verbose=0)
X = fp.import_example("2dpeaks_image")
Expand Down Expand Up @@ -60,7 +75,7 @@
# results['df']
fp.plot()
fp.plot_persistence()
fp.plot_mesh(view=(90,0))
fp.plot_mesh(view=(90, 0))


# %%
Expand Down
9 changes: 4 additions & 5 deletions findpeaks/findpeaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
import requests
from urllib.parse import urlparse

# import sys
# fpath = os.path.join(os.path.dirname(__file__), 'utils')
# print(fpath)
# if not np.isin(fpath, sys.path): sys.path.append(fpath)
# sys.path.append(fpath)
# import stats as stats
# from stats import disable_tqdm
# import interpolate as interpolate

import findpeaks.stats as stats
from findpeaks.stats import disable_tqdm
import findpeaks.interpolate as interpolate
Expand Down
7 changes: 7 additions & 0 deletions findpeaks/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
from findpeaks.filters.frost import frost_filter
from findpeaks.filters.median import median_filter
from findpeaks.filters.mean import mean_filter
# import union_find as union_find
# from filters.lee import lee_filter
# from filters.lee_enhanced import lee_enhanced_filter
# from filters.kuan import kuan_filter
# from filters.frost import frost_filter
# from filters.median import median_filter
# from filters.mean import mean_filter

from scipy.ndimage.morphology import generate_binary_structure, binary_erosion
from scipy.ndimage.filters import maximum_filter
Expand Down

0 comments on commit aea5292

Please sign in to comment.