Metadata-Version: 2.5
Name: pyFRF
Version: 1.6.0
Summary: Frequency response function as used in structural dynamics (port of sdypy-FRF).
Project-URL: homepage, https://github.com/ladisk/pyFRF
Project-URL: documentation, https://pyfrf.readthedocs.io/en/latest/
Project-URL: source, https://github.com/sdypy/sdypy-FRF
Project-URL: issues, https://github.com/sdypy/sdypy-FRF/issues
Author-email: "Janko Slavič, Luka Novak, Martin Česnik, et al." <janko.slavic@fs.uni-lj.si>
Maintainer-email: "Janko Slavič, Luka Novak, Martin Česnik, et al." <janko.slavic@fs.uni-lj.si>
License-Expression: MIT
License-File: LICENSE
Keywords: FRF,MIMO,ODS,SIMO
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.13
Requires-Dist: sdypy-frf>=0.4.0
Provides-Extra: dev
Requires-Dist: jupyter; extra == 'dev'
Requires-Dist: nbsphinx; extra == 'dev'
Requires-Dist: nbsphinx-link; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: sphinx; extra == 'dev'
Requires-Dist: sphinx-book-theme; extra == 'dev'
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Requires-Dist: wheel; extra == 'dev'
Description-Content-Type: text/x-rst

pyFRF
=====

Frequency response function as used in structural dynamics.
-----------------------------------------------------------

``pyFRF`` is a port of `sdypy-FRF`_, which is part of the `SDyPy`_ project. The code is
maintained in ``sdypy-FRF``; this package makes the same code available under the
``pyFRF`` name, so that existing code keeps working.

**Please report issues and open pull requests at** `sdypy-FRF`_.

Installing ``pyFRF`` also installs ``sdypy-FRF``. These two imports give the same code:

.. code:: python

   import pyFRF
   from sdypy import FRF as pyFRF

For new code, use ``sdypy-FRF`` directly:

.. code:: cmd

   pip install sdypy-FRF

.. code:: python

   from sdypy import FRF

For more information check out the showcase examples and see documentation_.

Basic ``pyFRF`` usage:
----------------------

Make an instance of ``FRF`` class:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    a = pyFRF.FRF(
        sampling_freq,
        exc=None,
        resp=None,
        exc_type='f', resp_type='a',
        window='none',
        weighting='linear',
        fft_len=None,
        nperseg=None,
        noverlap=None,
        archive_time_data=False,
        frf_estimator='H1',
        copy=True
    )

Adding data:
~~~~~~~~~~~~
We can add the excitation and response data at the beginning through ``exc`` and ``resp`` arguments, otherwise, the excitation and response 
data can be added later via ``add_data()`` method:

.. code:: python

    a.add_data(exc, resp)

Computing FRF:
~~~~~~~~~~~~~~
Preferable way to get the frequency response functions is via ``get_FRF()`` method:

.. code:: python

    frf = a.get_FRF(frf_estimator="default", frf_form="receptance")

We can also directly get the requested FRF via other methods: ``get_H1()``, ``get_H2()``, ``get_Hv()`` and, ``get_ods_frf()``:

.. code:: python

    H1 = a.get_H1()
    H2 = a.get_H2()
    Hv = a.get_Hv()
    ods_frf = a.get_ods_frf()

Changes in 1.5.1:
~~~~~~~~~~~~~~~~~~
Segment averaging (``nperseg``) now also works on 32-bit platforms, for example
in the browser with Pyodide. Results are unchanged.

Changes in 1.5.0:
~~~~~~~~~~~~~~~~~~
The ``FRF`` constructor keyword ``frf_estimator`` and the ``get_FRF()`` keywords
``frf_estimator``/``frf_form`` are available since 1.5.0. The old names
(``frf_type`` on the constructor, and ``type``/``form`` on ``get_FRF()``) still
work but raise a ``DeprecationWarning``.

.. _sdypy-FRF: https://github.com/sdypy/sdypy-FRF
.. _SDyPy: https://github.com/sdypy
.. _documentation: https://pyfrf.readthedocs.io/en/latest/

|pytest|

|binder| to test the *Showcase.ipynb*.

.. |binder| image:: https://mybinder.org/badge_logo.svg
   :target: https://mybinder.org/v2/gh/ladisk/pyFRF/main
.. |pytest| image:: https://github.com/ladisk/pyFRF/actions/workflows/python-package.yml/badge.svg
    :target: https://github.com/ladisk/pyFRF/actions
