Skip to content

Commit c077a65

Browse files
committed
preparation for first release
1 parent f879501 commit c077a65

File tree

6 files changed

+181
-79
lines changed

6 files changed

+181
-79
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ wheels/
2626
.installed.cfg
2727
*.egg
2828
MANIFEST
29+
distribution.bat
2930

3031
# PyInstaller
3132
# Usually these files are written by a python script from a template

LSCF_Showcase.ipynb

+152-68
Large diffs are not rendered by default.

__init__.py

-1
This file was deleted.

lscf/__init__.py

-1
This file was deleted.

lscf/lscf.py renamed to pyEMA.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import matplotlib.pyplot as plt
33
import time
44
import scipy.linalg
5-
from tqdm import tqdm_notebook as tqdm
5+
from tqdm import tqdm
66
from scipy.linalg import toeplitz
77

88

@@ -152,11 +152,15 @@ def add_frf(self, pyfrf_object):
152152
else:
153153
self.frf = np.concatenate((self.frf, new_frf.T), axis=0)
154154

155-
def get_poles(self):
155+
def get_poles(self, show_progress=False):
156156
"""Compute poles.
157157
158158
Source: https://github.com/openmodal/OpenModal/blob/master/OpenModal/analysis/lscf.py
159159
"""
160+
if show_progress:
161+
tqdm_range = tqdm
162+
else:
163+
tqdm_range = lambda x:x
160164

161165
self.all_poles = []
162166
self.pole_freq = []
@@ -183,7 +187,7 @@ def get_poles(self):
183187
r = toeplitz(r)
184188

185189
sr_list = []
186-
for j in tqdm(range(2, n+1, 2)):
190+
for j in tqdm_range(range(2, n+1, 2)):
187191
d = 0
188192
for i in range(nr):
189193
rinv = np.linalg.inv(r[:j+1, :j+1])
@@ -447,9 +451,6 @@ def redundant_values(omega, xi, prec):
447451
:param omega: eiqenfrquencies vector
448452
:param xi: damping ratios vector
449453
:param prec: absoulute precision in order to distinguish between two values
450-
451-
@author: Blaz Starc
452-
453454
"""
454455

455456
N = len(omega)
@@ -488,9 +489,6 @@ def stabilisation(sr, nmax, err_fn, err_xi):
488489
:return xi_temp: updated damping matrix
489490
:return test_fn: updated eigenfrequencies stabilisation test matrix
490491
:return test_xi: updated damping stabilisation test matrix
491-
492-
@author: Blaz Starc
493-
494492
"""
495493

496494
# TODO: check this later for optimisation # this doffers by LSCE and LSCF

setup.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
desc = """\
4+
Experimental and operational modal analysis
5+
=============
6+
This module supports experimental and operational modal analysis.
7+
8+
For the showcase see: https://github.com/ladisk/pyEMA/blob/master/pyEMA%20Showcase.ipynb
9+
"""
10+
11+
from setuptools import setup
12+
setup(name='pyEMA',
13+
version='0.10',
14+
author='Klemen Zaletelj, Tomaž Bregar, Domen Gorjup, Janko Slavič',
15+
16+
description='Experimental and operational modal analysis.',
17+
url='https://github.com/ladisk/pyEMA',
18+
py_modules=['pyEMA'],
19+
long_description=desc,
20+
install_requires=['numpy', 'tqdm', 'scipy', 'matplotlib']
21+
)

0 commit comments

Comments
 (0)