phm-feature
介绍
- phm中的特征抽取任务
- 抽取振动信号中的各类时、频域业务特征值
软件架构
软件架构说明
.. code-block:: shell
.
├── build
│ ├── bdist.linux-x86_64
│ └── lib
│ └── phm_feature
│ └── __init__.py
├── dist
│ ├── phm_feature-0.0.2-py3-none-any.whl
│ └── phm_feature-0.0.2.tar.gz
├── LICENSE
├── phm_feature
│ ├── __init__.py
├── phm_feature.egg-info
│ ├── dependency_links.txt
│ ├── PKG-INFO
│ ├── SOURCES.txt
│ └── top_level.txt
├── README.md
├── setup.py
└── test.py
安装教程
- 使用pip进行安装
.. code-block:: python
pip install phm-feature
使用说明
获得振动信号的特征值
.. code-block:: python
import phm_feature
from phm_feature import *
enable_parallel(processnum=None) 开启多线程模式
disable_parallel() 开启单线程模式
feature_t(data) 获取时间域特征
feature_f 获取频率域特征
fft(data, 50) 快速离散傅里叶变换
power(data, 50) 功率谱
ifft(data, 50) 快速离散逆傅里叶变换
cepstrum(data, 50) 倒谱
envelope(data) 包络谱
window(data, 'hamming') 加窗-汉明窗
divide(data, 50, 25) 分帧
参与贡献
--------------------------------------------------------------------------------------------
2022-07-04 v0.0.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pypi上传初版本
pypi上传phm-feature初版本
2022-07-04 v0.0.2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
新增多线程模式
phm-feature
=========================================================================
介绍
-------------------------------------------------------------------------
使用torch torchaudio 构建PHM特征抽取功能层
功能层介绍
-----------------------------------------------------------------------------
torchphm.layers 将phm固定使用的数据操作,固化为如下层:
.. code-block:: python
1. STFT 离散傅立叶变换
2. Spectrogram 谱图
3. MelFilterbank mel譜过滤
4. AmplitudeToDb 幅度取分贝
5. TimeStretch 变速不变调
6. ComplexNorm 复数输出取模'范数'
7. ApplyFilterbank 过滤器应用
应用场景
------------------------------------------------------------------------------------
.. note::
组合上述功能层,实现不同场景
.. code-block:: shell
1. STFT
分帧==>加窗==>短时离散傅立叶变换
2. "变速不变调" Time scale modification
详细见 https://zhuanlan.zhihu.com/p/337193578
用于声谱图压缩、扩张处理,供后续分析
3. 梅尔mel谱转换
对于语谱图进行mel谱转换
4. HPSS
中值滤波,过滤出频率的谐波分量与冲击分量
为什么中值滤波,可以过滤出"数据轮廓"及发现"谐波分量和冲击分量",参见
https://blog.csdn.net/qq_38131594/article/details/80758567
软件结构说明
-----------------------------------------------------------------------------------
.. code-block:: shell
.
├── dist
│ ├── torchphm-1.1.7.tar.gz
│ └── torchphm-1.1.8.tar.gz
├── draw
│ ├── draw_functional.py
│ ├── draw_layers.py
│ ├── draw_torchphm_layers.ipynb
│ ├── torchphm -> ../torchphm
│ └── Untitled.ipynb
├── examples_torchphm.ipynb
├── README.md
├── setup.cfg
├── setup.py
├── tests
│ ├── test_functional.py
│ └── test_layers.py
├── torchphm
│ ├── beta_hpss.py
│ ├── functional.py
│ ├── __init__.py
│ ├── layers.py
└── torchphm.egg-info
======================== ===========
dist pypi上传包
======================== ===========
draw 画图
examples_torchphm.ipynb 应用例程
tests 测试文件
torchphm 实现源码
======================== ===========
安装教程
--------------------------------------------------------------------------------------
.. code-block:: python
pip install phm-feature
Metadata
Release files for phm-feature 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| phm_feature-0.1.1.tar.gz | 17.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| phm_feature-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.7 kB
Release files / phm_feature-0.1.1.tar.gz
| Download URL | phm_feature-0.1.1.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b42701573bba0e7f13bed02e1fb45448b3b031bef8f78f6b744210347c66fb14
|
|
BLAKE2b-256 checksum How to use checksums |
d1ef1fb495bb7d266cb9bc487f80a9add00f56a2ff9870310182f8cac0e65207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / phm_feature-0.1.1-py3-none-any.whl
| Download URL | phm_feature-0.1.1-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84fff4808c59a2bc6dff3b4cefc5b899b04cdd28aab8c1ca57e36ffa06218eee
|
|
BLAKE2b-256 checksum How to use checksums |
e7a04b5dceefa55b6666034a1802d7d6f8e230c5b1f3ce6a13dd5532643fcd0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for phm-feature 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.