Skip to main content

pyRotd

PyPi Cheese Shop Documentation Build Status Code Quality Test Coverage License DOI

Acceleration response spectrum calculations implemented in Python.

Introduction

Simple Python functions for calculating psuedo-spectral acceleration and rotated psuedo-spectral acceleration. The response of the single-degree-of-freedom oscillator is computed in the frequency domain along with frequency-domain interpolation to accurately capture the high-frequency characteristics.

The calculation of the response spectrum is performed using frequency domain transfer functions, as well as frequency domain interpolation methods to insure that the time step of the motions is greater than 10 times the natural frequency of the oscillator frequency. Two perpendicular ground motions can be rotated to compute the response at various percentiles. For example, the minimum, median, and maximum could be computed using percentiles of 0, 50, and 100. The orientation of both the minimum and maximum percentile are provided, but not orientation is provided for other percentiles because the rotate spectral acceleration is not monotonically increasing.

Installation

pyrotd is available from the Python Cheese Shop:

pip install pyrotd

Example

Spectral accelerations may be computed for a single time series:

osc_damping = 0.05
osc_freqs = np.logspace(-1, 2, 91)
spec_accels = pyrotd.calc_spec_accels(
    time_step, accels, osc_freqs, osc_damping)

Rotated spectral accelerations may be computed for a pair of time series:

rot_osc_resps = pyrotd.calc_rotated_spec_accels(
    time_step, accels_a, accels_b, osc_freqs, osc_damping)

A more detailed example is in this Jupyter Notebook.

Citation

Please cite this software using the DOI.

History

0.6.1 (2023-06-30)

  • Tests np.version to accommodate change in keywords of np.percentile

0.6.0 (2023-06-19)

  • Added optimization based on Stewart et al. (2017) algorithm

  • Added support for computing rotated PGA, PGV, and PGD

0.5.4 (2018-07-27)

  • Added MANIFEST.in

0.5.3 (2018-07-27)

  • Fix packaging issues

0.5.2 (2018-03-26)

  • Bump version for PyPi conflict

0.5.1 (2018-03-23)

  • Added tests/ directory

  • Added support for computing: SA, PSV, SV, and SD.

0.5.0 (2017-06-15)

  • Added support for Python 2.7

  • Added support for multiprocessing

  • Changed from using setup.cfg for metadata.

0.4.6 (2017-04-19)

  • Changed to use setup.cfg

  • Incremented version several times due to issues releasing.

0.4.1 (2017-04-11)

  • Fix release via Travis.

0.4.0 (2017-04-06)

  • Changed to return numpy.recarrays

0.3.0 (2017-04-05)

  • Added example

  • Added support for typing

0.2.0 (2017-02-20)

  • Changed from camelCase to underscores

  • Added PEER NGA West2 test cases

  • Fixed: numpy.array creation

0.1.0 (2016-03-04)

  • First release on PyPI.

Metadata

Release files for pyRotd 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyRotd 0.6.1
File Size Uploaded
pyRotd-0.6.1.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyRotd 0.6.1
File Interpreter ABI Platform
pyRotd-0.6.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 20.5 kB

Release files / pyRotd-0.6.1.tar.gz

Download URL pyRotd-0.6.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8093d8f777ecc5b1d1d038e5e9036c63a8ff88cc89bb2b5c6d6410d0d747e90d
BLAKE2b-256 checksum
How to use checksums
74f340c7d6c408af2fd45d758a6729e2794272327d0c62eea3e3c0794fcbf80b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / pyRotd-0.6.1-py2.py3-none-any.whl

Download URL pyRotd-0.6.1-py2.py3-none-any.whl
Size 10.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
203b9617ec9a3497d1050030ec4b150a8ee710babe2e99f513767889e45ecdc0
BLAKE2b-256 checksum
How to use checksums
1fd6a4865634bd63cf5192db4969883ab0b5a99176a540c0369515f7ed44c0e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.0

3 release files

0.4.6

2 release files

0.4.2

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.2.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page