C++ parser of .sht files.
Project description
shtRipper
Код для извлечения данных из .sht файлов. На текущий момент файлы версии ниже 2 не поддерживаются, что будет исправлено
при необходимости.
import shtRipper
filename = 'd:/data/cfm/original/sht40808.SHT'
res = shtRipper.ripper.read(filename)
print(res.keys())
Для упаковки данных в формат .sht:
import shtRipper
import math # used only for example sin() signal
to_pack = {
'signal with error': {
'comment': 'Точки хранят ещё и погрешность, требует много памяти.',
'unit': 'T_e(eV)',
'x': x,
'y': T_c,
'err': T_err
},
'X Y signal': {
'comment': 'Точки хранятся парой значений, требует много памяти.',
'unit': 'T_e(eV)',
'x': x,
'y': n_c
},
'Y signal with fixed X-grid': {
'comment': 'Этот тип хранения данных предназначен для данных 16-бит АЦП',
'unit': 'U(V)',
'tMin': 0.0, # mininun time
'tMax': 100.0, # maximum time
'offset': 0.0, # ADC zero level offset
'yRes': 0.0001, # ADC resolution: 0.0001 Volt per adc bit
'y': [math.sin(i / 10) for i in range(100)]
}
}
packed = shtRipper.ripper.write(path='D:/tmp/', filename='example.SHT', data=to_pack)
if len(packed) != 0:
print('packed error = "%s"' % packed)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shtRipper_cpp-1.2.10.tar.gz
(29.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shtRipper_cpp-1.2.10.tar.gz.
File metadata
- Download URL: shtRipper_cpp-1.2.10.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37772e3460b4ef7f547857e7a01771e63df8e2b166ac29741da32c18d4174842
|
|
| MD5 |
906c87c8dea7a04369c5775dc5495998
|
|
| BLAKE2b-256 |
4b3a6c3fc2f564dc567991b2f33a965566a55731e64fd1dd3e7247b0724fcf0c
|
File details
Details for the file shtRipper_cpp-1.2.10-py3-none-any.whl.
File metadata
- Download URL: shtRipper_cpp-1.2.10-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1423ab0792747c21634da61543a06e84b435bab637e0120fdbaca93ba1edc72
|
|
| MD5 |
2537dc85419198ad4f361fbf0665aed8
|
|
| BLAKE2b-256 |
0c79238143e46569db610b98e0d6c1c1854227f581811c5fd145134c7e82f53b
|