semvec/pypi-packages huggingface dataset:
pyExSi 0.43.3
Excitation signals as used in structural dynamics and vibration fatigue.
Requires Python: >=3.10
Keywords: dynamic testing, excitation signal, structural dynamics

|DOI| |Build Status| |Docs Status|

pyExSi - Excitation signals as used in structural dynamics and vibration fatigue
--------------------------------------------------------------------------------
Supported excitation signals are:

- pulse (e.g. half-sine)
- random:

    - uniform random distribution
    - normal random distribution
    - pseudorandom distribution

- random, defined by power spectral density (PSD):

    - stationary Gaussian
    - stationary non-Gaussian
    - non-stationary non-Gaussian random process

- burst random
- sine sweep


Simple example
---------------

A simple example on how to generate random signals on PSD basis:

.. code-block:: python

    import pyExSi as es
    import numpy as np


    N = 2**16 # number of data points of time signal
    fs = 1024 # sampling frequency [Hz]
    t = np.arange(0,N)/fs # time vector

    # define frequency vector and one-sided flat-shaped PSD
    M = N//2 + 1 # number of data points of frequency vector
    freq = np.arange(0, M, 1) * fs / N # frequency vector
    freq_lower = 50 # PSD lower frequency limit  [Hz]
    freq_upper = 100 # PSD upper frequency limit [Hz]
    PSD = es.get_psd(freq, freq_lower, freq_upper) # one-sided flat-shaped PSD

    #get gaussian stationary signal
    gausian_signal = es.random_gaussian((N, PSD, fs)

    #get non-gaussian non-stationary signal, with kurtosis k_u=10
    #amplitude modulation, modulating signal defined by PSD
    PSD_modulating = es.get_psd(freq, freq_lower=1, freq_upper=10) 
    #define array of parameters delta_m and p
    delta_m_list = np.arange(.1,2.1,.5) 
    p_list = np.arange(.1,2.1,.5)
    #get signal 
    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)

.. |Docs Status| image:: https://readthedocs.org/projects/pyexsi/badge/
   :target: https://pyexsi.readthedocs.io
   
.. |Build Status| image:: https://travis-ci.com/ladisk/pyExSi.svg?branch=main
   :target: https://travis-ci.com/ladisk/pyExSi
   
.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4431844.svg
   :target: https://doi.org/10.5281/zenodo.4431844
opyndata 0.0.3
OpyNDATA toolbox for import and postprocessing of measurement data
Requires Python: >=3.6

![opyndata logo](https://raw.githubusercontent.com/knutankv/opyndata/master/opyndata-logo.png)
=======================

What is opyndata?
=======================
OpyNDATA is a package supporting the open data from measurement projects at the Structural Dynamics group at Department of Structural Engineering, NTNU.

Installation 
========================
Either install via PyPI as follows:

```
pip install opyndata
```

or install directly from github:

```
pip install git+https://www.github.com/knutankv/opyndata.git@main
```

Quick start
=======================
Import the relevant package modules, exemplified for the `data_import` module, as follows:
    
```python
from opyndata import data_import
```

This code snippet imports h5 file into data object:

```python
import h5py

file_name = 'data_2Hz.h5'
rec_name = 'NTNU142M-2016-12-26_22-33-33'
hf = h5py.File(fname, 'r')[rec_name]
```

To establish graphical visualization of data set, the following code can be run:

```python
from opyndata import visualization

data_path = 'C:/Users/knutankv/BergsoysundData/data_10Hz.h5'
app_setup = visualization.AppSetup(data_path=data_path)
app = app_setup.create_app()

server = app.server

if __name__ == '__main__':
    app.run_server(debug=False)
```  

The result can be viewed by opening `https://127.0.0.1:8050` in a web browser (port 8050 is default, but others can be requested in the call of the `run_server` method of `app`).

For full code reference visit [knutankv.github.io/opyndata](https://knutankv.github.io/opyndata/).

Examples
=======================
Examples are provided as Jupyter Notebooks in the [examples folder](https://github.com/knutankv/opyndata/tree/main/examples).

Open data
=======================
For an overview of available open measurement data from us, visit https://www.ntnu.edu/kt/open-data

Citation
=======================
Cite as:
Knut Andreas Kvåle. (2022). knutankv/opyndata: Initial release, available on Zenodo (v0.0.2). Zenodo. https://doi.org/10.5281/zenodo.5978358

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5978357.svg)](https://doi.org/10.5281/zenodo.5978357)

Support
=======================
Please [open an issue](https://github.com/knutankv/opyndata/issues/new) for support.
rsult 1.0.1
Rust like `Result[T, E]` support for python!
Requires Python: >=3.13

# Rsult

> Rsult (rust result = rs + result) is a python library for adding rust like `Result[T, E]` support to python.

## Background

In rust, rather than throw exceptions up some side channel, you return them directly as part of a functions response.
These responses are wrapped in what rust refers to as a `Result`.
`Result`'s are simple objects which contain either the result of the function call, or an exception which was raised by the function.

## Usage

There are many ways you can choose to use the rsult `Result` class.
The most common use is to just unpack the response into individual `error` and `response` variables.
However, the `unwrap()` functio can also be used much like unwrap in rust.
When called from a result that does not contain an error, `unwrap(result)` will return the `response` from the function.
If `unwrap(result)` is called with a result that contains an error, that error will be raised as an exception.

### Examples

```python
from rsult import Result, unwrap, wrap, wrap_error

class LessThanZeroError(Exception):
    pass

def add_numbers(x: int, y: int) -> Result[int, LessThanZeroError]:
    z = x + y
    if z < 0:
        return wrap_error(LessThanZeroError())
    return wrap(z)

# a regular call to the function that returns the response
error, answer = add_numbers(2, 2)
assert error is None
assert answer == 4

# a call to the function that results in an error
error, answer = add_numbers(2, -4)
assert type(error) is LessThanZeroError
assert answer is None

# unwrap can be used to throw the error, rather than unpacking the result
result = add_numbers(2, -4)
answer = unwrap(result)  # <-- LessThanZeroError gets throw
```

## Authors

- [PattyC (schlerp)](https://github.com/schlerp)