Skip to content

Commit 43fd9d3

Browse files
committed
General spelling corrections.
1 parent a899fcb commit 43fd9d3

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ or use the new function that also contains the stability chart and more:
5454
a.select_poles()
5555

5656
The stability chart displayes calculated poles and the user can hand-pick the stable ones. Reconstruction is done on-the-fly.
57-
In this case the reconstruction is not necessary since the user can access FRF matrix and modal constant matrix:
57+
In this case the reconstruction is not necessary since the user can access the FRF matrix and modal constant matrix:
5858

5959
::
6060

pyEMA Showcase.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"cell_type": "markdown",
2323
"metadata": {},
2424
"source": [
25-
"The experiment is shown in the figure below; the beam was excited at 6 locations with a impact hammer, while the response was measured at 7 locations using piezo accelerometers (camera data is not used in this showcase; for image EMA, see https://github.com/ladisk/ImageBasedModalAnalysisTutorial):\n",
25+
"The experiment is shown in the figure below; the beam was excited at 6 locations with an impact hammer, while the response was measured at 7 locations using piezo accelerometers (camera data is not used in this showcase; for image EMA, see https://github.com/ladisk/ImageBasedModalAnalysisTutorial):\n",
2626
"<img width=500 src=\"./data/experiment_1.jpg\">"
2727
]
2828
},
@@ -77,7 +77,7 @@
7777
"cell_type": "markdown",
7878
"metadata": {},
7979
"source": [
80-
"And from the FRF (`H1_main` is of dimensions: #inputs, #outputs, frequency) only the response accelerometer position at index 1 will be later used:"
80+
"And from the FRF (`H1_main` is of dimensions: #inputs, #outputs, frequency) only the response accelerometer position at index 1 will be used later:"
8181
]
8282
},
8383
{
@@ -197,7 +197,7 @@
197197
"cell_type": "markdown",
198198
"metadata": {},
199199
"source": [
200-
"Alternatively to selecting from stabilisation chart, the frequencies can be defines as a list, e.g. (comment out to use):"
200+
"As an alternative to selecting from the stabilisation chart, the frequencies can be defined as a list, e.g. (comment out to use):"
201201
]
202202
},
203203
{

pyEMA/pole_picking.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(self, Model):
7676
self.get_stability()
7777
self.plot_stability()
7878

79-
# Integrate matplotib figure
79+
# Integrate matplotlib figure
8080
canvas = FigureCanvasTkAgg(self.fig, self.root)
8181
canvas.get_tk_widget().pack(side='top', fill='both', expand=1)
8282
NavigationToolbar2Tk(canvas, self.root)
@@ -132,7 +132,7 @@ def plot_frf(self, initial=False):
132132
def get_stability(self, fn_temp=0.001, xi_temp=0.05):
133133
"""Get the stability matrix.
134134
135-
:param fn_temp: Natural frequency stability crieterion.
135+
:param fn_temp: Natural frequency stability criterion.
136136
:param xi_temp: Damping stability criterion.
137137
"""
138138
Nmax = self.Model.pol_order_high
@@ -145,13 +145,13 @@ def plot_stability(self, update_ticks=False):
145145
self.ax1.clear()
146146
self.ax1.grid(True)
147147

148-
# stable eigenfrequencues, unstable damping ratios
148+
# stable eigenfrequencies, unstable damping ratios
149149
a = np.argwhere((self.test_fn > 0) & ((self.test_xi == 0) | (self.xi_temp <= 0)))
150150
# stable eigenfrequencies, stable damping ratios
151151
b = np.argwhere((self.test_fn > 0) & ((self.test_xi > 0) & (self.xi_temp > 0)))
152-
# unstable eigenfrequencues, unstable damping ratios
152+
# unstable eigenfrequencies, unstable damping ratios
153153
c = np.argwhere((self.test_fn == 0) & ((self.test_xi == 0) | (self.xi_temp <= 0)))
154-
# unstable eigenfrequencues, stable damping ratios
154+
# unstable eigenfrequencies, stable damping ratios
155155
d = np.argwhere((self.test_fn == 0) & ((self.test_xi > 0) & (self.xi_temp > 0)))
156156

157157
p1 = self.ax1.plot(self.fn_temp[a[:, 0], a[:, 1]], 1+a[:, 1], 'bx',
@@ -202,13 +202,13 @@ def plot_cluster(self, update_ticks=False):
202202
self.ax1.clear()
203203
self.ax1.grid(True)
204204

205-
# stable eigenfrequencues, unstable damping ratios
205+
# stable eigenfrequencies, unstable damping ratios
206206
a = np.argwhere((self.test_fn > 0) & ((self.test_xi == 0) | (self.xi_temp <= 0)))
207207
# stable eigenfrequencies, stable damping ratios
208208
b = np.argwhere((self.test_fn > 0) & ((self.test_xi > 0) & (self.xi_temp > 0)))
209-
# unstable eigenfrequencues, unstable damping ratios
209+
# unstable eigenfrequencies, unstable damping ratios
210210
c = np.argwhere((self.test_fn == 0) & ((self.test_xi == 0) | (self.xi_temp <= 0)))
211-
# unstable eigenfrequencues, stable damping ratios
211+
# unstable eigenfrequencies, stable damping ratios
212212
d = np.argwhere((self.test_fn == 0) & ((self.test_xi > 0) & (self.xi_temp > 0)))
213213

214214
p1 = self.ax1.plot(self.fn_temp[a[:, 0], a[:, 1]], self.xi_temp[a[:, 0], a[:, 1]], 'bx',
@@ -270,7 +270,7 @@ def get_closest_poles_cluster(self):
270270
min_.append([y_ind, sel, np.abs(self.Model.pole_freq[y_ind][sel]-self.x_data_pole), np.abs(self.Model.pole_xi[y_ind][sel]-self.y_data_pole[0])])
271271

272272
min_a = np.asarray(min_)
273-
# select the poles that have the frequency within 2% of observed range
273+
# select the poles that have a frequency within 2% of the observed range
274274
mask = min_a[:, 2] < (self.Model.upper - self.Model.lower) * 0.02
275275
min_ind_x = np.argmin(min_a[mask][:, 3])
276276

@@ -284,7 +284,7 @@ def get_closest_poles_cluster(self):
284284

285285

286286
def on_click(self, event):
287-
# on button 1 press (left mouse button) + shift is held
287+
# on button 1 press (left mouse button) + SHIFT is held
288288
if event.button == 1 and self.shift_is_held:
289289
self.y_data_pole = [event.ydata]
290290
self.x_data_pole = event.xdata
@@ -324,13 +324,13 @@ def on_click(self, event):
324324

325325

326326
def on_key_press(self, event):
327-
"""Function triggered on key press (shift)."""
327+
"""Function triggered on key press (SHIFT)."""
328328
if event.key == 'shift':
329329
self.shift_is_held = True
330330

331331

332332
def on_key_release(self, event):
333-
"""Function triggered on key release (shift)."""
333+
"""Function triggered on key release (SHIFT)."""
334334
if event.key == 'shift':
335335
self.shift_is_held = False
336336

pyEMA/pyEMA.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ def __init__(self,
4949
except:
5050
raise Exception('lower must be float or integer')
5151
if self.lower < 0:
52-
raise Exception('lower must be positive or equal to zero')
52+
raise Exception('lower must be more than or equal to zero')
5353

5454
try:
5555
self.upper = float(upper)
5656
except:
57-
raise Exception('upper must be flaot or integer')
57+
raise Exception('upper must be float or integer')
5858
if self.upper < self.lower:
5959
raise Exception('upper must be greater than lower')
6060

@@ -64,7 +64,7 @@ def __init__(self,
6464
try:
6565
self.frf = np.asarray(frf)
6666
except:
67-
raise Exception('cannot contert frf to numpy ndarray')
67+
raise Exception('cannot convert frf to numpy ndarray')
6868
if self.frf.ndim == 1:
6969
self.frf = np.array([self.frf])
7070

@@ -88,7 +88,7 @@ def __init__(self,
8888
except:
8989
raise Exception('cannot convert pol_order_high to integer')
9090
if self.pol_order_high <= 0:
91-
raise Exception('pol_order_high must be positive')
91+
raise Exception('pol_order_high must be more than zero')
9292

9393
if not pyfrf:
9494
self.omega = 2 * np.pi * self.freq
@@ -101,7 +101,7 @@ def __init__(self,
101101

102102
def add_frf(self, pyfrf_object):
103103
"""
104-
Add a FRF at a next location.
104+
Add an FRF at a next location.
105105
106106
This method can be used in relation to pyFRF from Open Modal (https://github.com/openmodal)
107107
@@ -128,7 +128,7 @@ def get_poles(self, method='lscf', show_progress=True):
128128
Source: https://github.com/openmodal/OpenModal/blob/master/OpenModal/analysis/lscf.py
129129
130130
The LSCF method is an frequency-domain Linear Least Squares
131-
estimator optimized for modal parameter estimation. The choice of
131+
estimator optimized for modal parameter estimation. The choice of
132132
the most important algorithm characteristics is based on the
133133
results in [1] (Section 5.3.3.) and can be summarized as:
134134
@@ -184,7 +184,7 @@ def get_poles(self, method='lscf', show_progress=True):
184184
"""
185185
if method != 'lscf':
186186
raise Exception(
187-
f'no method "{method}". Currently only "lscf" method is implemented.')
187+
f'no method "{method}". Currently only the "lscf" method is implemented.')
188188

189189
if show_progress:
190190
def tqdm_range(x): return tqdm(x, ncols=100)

0 commit comments

Comments
 (0)