pyExSi 0.43__tar.gz → 0.43.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. pyexsi-0.43.3/.github/workflows/python-package.yml +32 -0
  2. pyexsi-0.43.3/.github/workflows/release-and-publish-to-pypi.yml +28 -0
  3. pyexsi-0.43.3/.gitignore +132 -0
  4. pyexsi-0.43.3/CONTRIBUTING.rst +84 -0
  5. pyexsi-0.43.3/LICENSE +21 -0
  6. pyexsi-0.43.3/PKG-INFO +99 -0
  7. pyexsi-0.43.3/Showcase.ipynb +466 -0
  8. pyexsi-0.43.3/docs/Makefile +19 -0
  9. pyexsi-0.43.3/docs/make.bat +35 -0
  10. pyexsi-0.43.3/docs/requirements.txt +3 -0
  11. pyexsi-0.43.3/docs/source/code.rst +7 -0
  12. pyexsi-0.43.3/docs/source/conf.py +189 -0
  13. pyexsi-0.43.3/docs/source/examples/example_nonstationarity.rst +6 -0
  14. pyexsi-0.43.3/docs/source/examples/example_signals.rst +6 -0
  15. pyexsi-0.43.3/docs/source/examples.rst +9 -0
  16. pyexsi-0.43.3/docs/source/getting_started.rst +6 -0
  17. pyexsi-0.43.3/docs/source/index.rst +24 -0
  18. pyexsi-0.43.3/example/example_nonstationarity.py +121 -0
  19. pyexsi-0.43.3/example/example_signals.py +80 -0
  20. {pyExSi-0.43 → pyexsi-0.43.3}/pyExSi/__init__.py +2 -2
  21. {pyExSi-0.43 → pyexsi-0.43.3}/pyExSi/signals.py +854 -852
  22. pyexsi-0.43.3/pyproject.toml +45 -0
  23. pyexsi-0.43.3/readme.rst +65 -0
  24. pyexsi-0.43.3/readthedocs.yaml +35 -0
  25. pyexsi-0.43.3/requirements.dev.txt +10 -0
  26. pyexsi-0.43.3/requirements.txt +2 -0
  27. {pyExSi-0.43 → pyexsi-0.43.3}/setup.py +58 -58
  28. pyexsi-0.43.3/tests/generate_freezed_data.py +225 -0
  29. pyexsi-0.43.3/tests/test_basic.py +189 -0
  30. pyexsi-0.43.3/tests/test_data_nonstationarity.pkl +0 -0
  31. pyexsi-0.43.3/tests/test_data_signals.pkl +0 -0
  32. pyexsi-0.43.3/tests/test_scipy_chirp.py +66 -0
  33. pyExSi-0.43/PKG-INFO +0 -80
  34. pyExSi-0.43/pyExSi.egg-info/PKG-INFO +0 -80
  35. pyExSi-0.43/pyExSi.egg-info/SOURCES.txt +0 -8
  36. pyExSi-0.43/pyExSi.egg-info/dependency_links.txt +0 -1
  37. pyExSi-0.43/pyExSi.egg-info/requires.txt +0 -4
  38. pyExSi-0.43/pyExSi.egg-info/top_level.txt +0 -1
  39. pyExSi-0.43/setup.cfg +0 -4
@@ -0,0 +1,32 @@
1
+ name: Testing
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ python-version: ["3.11", "3.12", "3.13"]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Set up Python ${{ matrix.python-version }}
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install flake8 pytest
23
+ if [ -f requirements.dev.txt ]; then pip install -r requirements.dev.txt; fi
24
+ - name: Lint with flake8
25
+ run: |
26
+ # stop the build if there are Python syntax errors or undefined names
27
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
29
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30
+ - name: Test with pytest
31
+ run: |
32
+ pytest
@@ -0,0 +1,28 @@
1
+ name: Release and Publish to PyPI
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*'
6
+ jobs:
7
+ publish:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Checkout code
11
+ uses: actions/checkout@v2
12
+
13
+ - name: Set up Python
14
+ uses: actions/setup-python@v2
15
+ with:
16
+ python-version: '3.11'
17
+
18
+ - name: Install dependencies
19
+ run: pip install -U build
20
+
21
+ - name: Build package
22
+ run: python -m build
23
+
24
+ - name: Publish to PyPI
25
+ uses: pypa/gh-action-pypi-publish@v1.4.2
26
+ with:
27
+ user: __token__
28
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,132 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ distribution.bat
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ pip-wheel-metadata/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ .python-version
87
+
88
+ # pipenv
89
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
91
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
92
+ # install all needed dependencies.
93
+ #Pipfile.lock
94
+
95
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
96
+ __pypackages__/
97
+
98
+ # Celery stuff
99
+ celerybeat-schedule
100
+ celerybeat.pid
101
+
102
+ # SageMath parsed files
103
+ *.sage.py
104
+
105
+ # Environments
106
+ .env
107
+ .venv
108
+ env/
109
+ venv/
110
+ ENV/
111
+ env.bak/
112
+ venv.bak/
113
+
114
+ # Spyder project settings
115
+ .spyderproject
116
+ .spyproject
117
+
118
+ # Rope project settings
119
+ .ropeproject
120
+
121
+ # mkdocs documentation
122
+ /site
123
+
124
+ # mypy
125
+ .mypy_cache/
126
+ .dmypy.json
127
+ dmypy.json
128
+
129
+ # Pyre type checker
130
+ .pyre/
131
+ # VC Code
132
+ .vscode/
@@ -0,0 +1,84 @@
1
+ Contributing Guide
2
+ ==================
3
+
4
+ Contributions are welcome and greatly appreciated!
5
+
6
+
7
+ .. _contributing-workflow-label:
8
+
9
+ Workflow
10
+ --------
11
+
12
+ A bug-fix or enhancement is delivered using a pull request. A good pull request
13
+ should cover one bug-fix or enhancement feature. This ensures the change set is
14
+ easier to review and less likely to need major re-work or even be rejected.
15
+
16
+ The workflow that developers typically use to fix a bug or add enhancements
17
+ is as follows.
18
+
19
+ * Fork the ``pyExSi`` repo into your account.
20
+
21
+ * Obtain the source by cloning it onto your development machine.
22
+
23
+ .. code-block:: console
24
+
25
+ $ git clone ttps://github.com/ladisk/pyExSi.git
26
+ $ cd pyExSi
27
+
28
+ To begin development, install the required packages with :
29
+
30
+ .. code-block:: console
31
+
32
+ $ python -m pip install -r requirements.dev.txt
33
+
34
+ * Create a branch for local development:
35
+
36
+ .. code-block:: console
37
+
38
+ $ git checkout -b name-of-your-bugfix-or-feature
39
+
40
+ Now you can make your changes locally.
41
+
42
+
43
+ * Develop fix or enhancement:
44
+
45
+ * Make a fix or enhancement (e.g. modify a class, method, function, module,
46
+ etc).
47
+
48
+ * Update an existing unit test or create a new unit test module to verify
49
+ the change works as expected.
50
+
51
+ * Run the test suite.
52
+
53
+ .. code-block:: console
54
+
55
+ $ pytest
56
+
57
+
58
+ * The docs should be updated for anything but trivial bug fixes.
59
+
60
+
61
+ Perform docs check.
62
+
63
+ .. code-block:: console
64
+
65
+ $ cd docs
66
+ $ make clean
67
+ $ make html
68
+
69
+
70
+ * Commit and push changes to your fork.
71
+
72
+ .. code-block:: console
73
+
74
+ $ git add .
75
+ $ git commit -m "A detailed description of the changes."
76
+ $ git push origin name-of-your-bugfix-or-feature
77
+
78
+ A pull request should preferably only have one commit upon the current
79
+ master HEAD, (via rebases and squash).
80
+
81
+ * Submit a pull request through the service website (e.g. Github, Gitlab).
82
+
83
+ * Check automated continuous integration steps all pass. Fix any problems
84
+ if necessary and update the pull request.
pyexsi-0.43.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Ladisk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pyexsi-0.43.3/PKG-INFO ADDED
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyExSi
3
+ Version: 0.43.3
4
+ Summary: Excitation signals as used in structural dynamics and vibration fatigue.
5
+ Project-URL: homepage, https://github.com/ladisk/pyExSi
6
+ Project-URL: documentation, https://pyexsi.readthedocs.io/en/latest/index.html
7
+ Project-URL: source, https://github.com/sdypy/pyExSi
8
+ Author-email: "Aleš Zorman, Domen Gorjup, Janko Slavič" <janko.slavic@fs.uni-lj.si>
9
+ Maintainer-email: "Janko Slavič, Domen Gorjup, Aleš Zorman" <janko.slavic@fs.uni-lj.si>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: dynamic testing,excitation signal,structural dynamics
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Requires-Python: >=3.10
19
+ Requires-Dist: numpy>=1.18
20
+ Requires-Dist: pylint
21
+ Requires-Dist: pytest
22
+ Requires-Dist: scipy
23
+ Provides-Extra: dev
24
+ Requires-Dist: black; extra == 'dev'
25
+ Requires-Dist: build; extra == 'dev'
26
+ Requires-Dist: matplotlib; extra == 'dev'
27
+ Requires-Dist: pytest; extra == 'dev'
28
+ Requires-Dist: sphinx; extra == 'dev'
29
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == 'dev'
30
+ Requires-Dist: sphinx-rtd-theme; extra == 'dev'
31
+ Requires-Dist: twine; extra == 'dev'
32
+ Requires-Dist: wheel; extra == 'dev'
33
+ Description-Content-Type: text/x-rst
34
+
35
+ |DOI| |Build Status| |Docs Status|
36
+
37
+ pyExSi - Excitation signals as used in structural dynamics and vibration fatigue
38
+ --------------------------------------------------------------------------------
39
+ Supported excitation signals are:
40
+
41
+ - pulse (e.g. half-sine)
42
+ - random:
43
+
44
+ - uniform random distribution
45
+ - normal random distribution
46
+ - pseudorandom distribution
47
+
48
+ - random, defined by power spectral density (PSD):
49
+
50
+ - stationary Gaussian
51
+ - stationary non-Gaussian
52
+ - non-stationary non-Gaussian random process
53
+
54
+ - burst random
55
+ - sine sweep
56
+
57
+
58
+ Simple example
59
+ ---------------
60
+
61
+ A simple example on how to generate random signals on PSD basis:
62
+
63
+ .. code-block:: python
64
+
65
+ import pyExSi as es
66
+ import numpy as np
67
+
68
+
69
+ N = 2**16 # number of data points of time signal
70
+ fs = 1024 # sampling frequency [Hz]
71
+ t = np.arange(0,N)/fs # time vector
72
+
73
+ # define frequency vector and one-sided flat-shaped PSD
74
+ M = N//2 + 1 # number of data points of frequency vector
75
+ freq = np.arange(0, M, 1) * fs / N # frequency vector
76
+ freq_lower = 50 # PSD lower frequency limit [Hz]
77
+ freq_upper = 100 # PSD upper frequency limit [Hz]
78
+ PSD = es.get_psd(freq, freq_lower, freq_upper) # one-sided flat-shaped PSD
79
+
80
+ #get gaussian stationary signal
81
+ gausian_signal = es.random_gaussian((N, PSD, fs)
82
+
83
+ #get non-gaussian non-stationary signal, with kurtosis k_u=10
84
+ #amplitude modulation, modulating signal defined by PSD
85
+ PSD_modulating = es.get_psd(freq, freq_lower=1, freq_upper=10)
86
+ #define array of parameters delta_m and p
87
+ delta_m_list = np.arange(.1,2.1,.5)
88
+ p_list = np.arange(.1,2.1,.5)
89
+ #get signal
90
+ nongaussian_nonstationary_signal = es.nonstationary_signal(N,PSD,fs,k_u=5,modulating_signal=('PSD', PSD_modulating),param1_list=p_list,param2_list=delta_m_list)
91
+
92
+ .. |Docs Status| image:: https://readthedocs.org/projects/pyexsi/badge/
93
+ :target: https://pyexsi.readthedocs.io
94
+
95
+ .. |Build Status| image:: https://travis-ci.com/ladisk/pyExSi.svg?branch=main
96
+ :target: https://travis-ci.com/ladisk/pyExSi
97
+
98
+ .. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4431844.svg
99
+ :target: https://doi.org/10.5281/zenodo.4431844