Skip to main content

This project is for plot LinearMSTMM solver result that is write with hdf5.

Project description

PlotLinearSolverResult

This project is for plot LinearMSTMM solver result that is write with hdf5.

First import this package.

import PlotLinearSolverResult.read_from_hdf5 as rh
import matplotlib.pyplot as plt
import numpy as np

Then, initialize a H5File from h5 file path.

f = rh.H5File('test_write_vibration_characteristics.h5')

Using print_directory_information that can print the diractory information of the h5file to the dataset.

f.print_directory_information()
​    ├──Animation
​       └──Index
​          ├──Ground
​             └──Frame
​          └──Part_Beam
​             ├──Frame
​             └──Part_BeamNodes
​    ├──Curve
​       └──Index
​          ├──Ground
​             └──Markers
​                └──Marker_0
​          └──Part_Beam
​             └──Nodes
​    ├──ModalInformation
​       ├──Index
​          ├──Ground
​             └──Frame
​          └──Part_Beam
​             ├──Frame
​             └──Part_BeamNodes
​       ├──NaturalFrequencies
​       └──SystemModalMass
​    └──TimeStamps
​    [[[['/Animation/Index/Ground/Frame'],
​       ['/Animation/Index/Part_Beam/Frame',
​        '/Animation/Index/Part_Beam/Part_BeamNodes']]],
​     [[[['/Curve/Index/Ground/Markers/Marker_0']], [[]]]],
​     [[['/ModalInformation/Index/Ground/Frame'],
​       ['/ModalInformation/Index/Part_Beam/Frame',
​        '/ModalInformation/Index/Part_Beam/Part_BeamNodes']],
​      '/ModalInformation/NaturalFrequencies',
​      '/ModalInformation/SystemModalMass'],
​     '/TimeStamps']

Get the keys of the attribute of the dataset.

keys = f.get_keys_attr_dset('/Animation/Index/Part_Beam/Part_BeamNodes')
keys[5]
​    'PhysicalDisplacementY'

Using get_index_attr_dset_in_data to get the index of the attribute of the dataset in the data over times.

Using get_keys_attr_dset_with_index_in_data to get the keys of the attribute of the dataset with the index in the data.

Using get_animation_data to get animation data over time.

Using get_TimesStamps to get TimesStamps data.

Finally, you can plot with times and data.

index = f.get_index_attr_dset_in_data('/Animation/Index/Part_Beam/Part_BeamNodes',keys[5])
animation_data = f.get_animation_data()
times = f.get_TimeStamps()
plt.plot(times,animation_data[:,index[0]])
​    [<matplotlib.lines.Line2D at 0x1ef4062c8d0>]

image-20230313114802427

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plotlinearsolverresult-0.1.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plotlinearsolverresult-0.1.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file plotlinearsolverresult-0.1.4.tar.gz.

File metadata

  • Download URL: plotlinearsolverresult-0.1.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for plotlinearsolverresult-0.1.4.tar.gz
Algorithm Hash digest
SHA256 66c81f77251af66574db492e81c33ebdaeb9c14ce7ce6304111e6ff730f88635
MD5 7a27d66dc7e40d52d30bfdb664012042
BLAKE2b-256 64439b1ddcbd34f6e65528f7f116dac2941636a21b3c52e9259d8fae73ebd105

See more details on using hashes here.

File details

Details for the file plotlinearsolverresult-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for plotlinearsolverresult-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4a8e1e0f4eb226ae5d79bfa5cf135efe8d9f838777a954094972a779da67d84a
MD5 f16ea66489ccdcebecb677ef4c87ae29
BLAKE2b-256 53b5bfaa94a9cd09ceb96175a42fe9ce8a5b942d73531febe8f5350c6a53415d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page