Skip to content

Commit

Permalink
final typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akeeste committed Oct 30, 2023
1 parent 5574910 commit 8a17fc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions mhkit/loads/extreme.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from scipy import stats
from scipy import optimize
from mhkit.wave.resource import frequency_moment
import mhkit.utils.upcrossing as upcrossing
from mhkit.utils import upcrossing, custom


def global_peaks(t, data):
Expand Down Expand Up @@ -31,7 +31,7 @@ def global_peaks(t, data):
assert isinstance(data, np.ndarray), 'data must be of type np.ndarray'

# Find zero up-crossings
inds = upcrossing.upcrossing(t, data)
inds = upcrossing(t, data)

# We also include the final point in the dataset
inds = np.append(inds, len(data)-1)
Expand All @@ -44,7 +44,7 @@ def global_peaks(t, data):
# starts the zero crossing period, ind1.
func = lambda ind1, ind2: np.argmax(data[ind1:ind2]) + ind1

peak_inds = np.array(upcrossing.custom(t, data, func, inds), dtype=int)
peak_inds = np.array(custom(t, data, func, inds), dtype=int)

return t[peak_inds], data[peak_inds]

Expand Down
12 changes: 6 additions & 6 deletions mhkit/utils/upcrossing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def upcrossing(t, data):
Returns
-------
inds: np.array
Zero crossing indicies
Zero crossing indices
"""
if not isinstance(t, np.ndarray):
raise TypeError('t must be of type np.ndarray')
Expand Down Expand Up @@ -97,7 +97,7 @@ def peaks(t, data, inds=None):
data: np.array
Signal time-series.
inds: np.array
Optional indicies for the upcrossing. Useful
Optional indices for the upcrossing. Useful
when using several of the upcrossing methods
to avoid repeating the upcrossing analysis
each time.
Expand Down Expand Up @@ -128,7 +128,7 @@ def troughs(t, data, inds=None):
data: np.array
Signal time-series.
inds: np.array
Optional indicies for the upcrossing. Useful
Optional indices for the upcrossing. Useful
when using several of the upcrossing methods
to avoid repeating the upcrossing analysis
each time.
Expand Down Expand Up @@ -159,7 +159,7 @@ def heights(t, data, inds=None):
data: np.array
Signal time-series.
inds: np.array
Optional indicies for the upcrossing. Useful
Optional indices for the upcrossing. Useful
when using several of the upcrossing methods
to avoid repeating the upcrossing analysis
each time.
Expand Down Expand Up @@ -189,7 +189,7 @@ def periods(t, data, inds=None):
data: np.array
Signal time-series.
inds: np.array
Optional indicies for the upcrossing. Useful
Optional indices for the upcrossing. Useful
when using several of the upcrossing methods
to avoid repeating the upcrossing analysis
each time.
Expand Down Expand Up @@ -220,7 +220,7 @@ def custom(t, data, func, inds=None):
given t[ind1], t[ind2], where ind1 < ind2, correspond
to the start and end of an upcrossing section.
inds: np.array
Optional indicies for the upcrossing. Useful
Optional indices for the upcrossing. Useful
when using several of the upcrossing methods
to avoid repeating the upcrossing analysis
each time.
Expand Down

0 comments on commit 8a17fc5

Please sign in to comment.