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 attributes of the dataset.

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

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

Using get_animation_datas to get animation datas over time.

Using get_TimesStamps to get TimesStamps datas.

Finally, you can plot with times and datas.

index = f.get_index_attr_dset_in_datas('/Animation/Index/Part_Beam/Part_BeamNodes',keys[5])
animation_datas = f.get_animation_datas()
times = f.get_TimeStamps()
plt.plot(times,animation_datas[:,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.2.tar.gz (4.0 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.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file PlotLinearSolverResult-0.1.2.tar.gz.

File metadata

  • Download URL: PlotLinearSolverResult-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for PlotLinearSolverResult-0.1.2.tar.gz
Algorithm Hash digest
SHA256 953c136bd055cc2521dddd2edfcdebb0f8d7d115cdfa1332c4f53677a4d7ee9c
MD5 a51b07beb6685351180b7e4639e93a0a
BLAKE2b-256 d1ca14342d34790d29a19c5ba8ac83946d8afa8a60304e7c078c4c538a51d5ee

See more details on using hashes here.

File details

Details for the file PlotLinearSolverResult-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for PlotLinearSolverResult-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd211df8b42e02e5d39bfa4083db871fefd41c122e67096ad5c66e913aa21e9c
MD5 c0714c46e80111b872cef89197213439
BLAKE2b-256 2cf8785f0e71ab3c49939c52f80e4583a4a6b6722ef10a09e8104a17e7d61edd

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