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 hashes)
Built Distribution
Close
Hashes for shtRipper_cpp-1.2.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1423ab0792747c21634da61543a06e84b435bab637e0120fdbaca93ba1edc72 |
|
MD5 | 2537dc85419198ad4f361fbf0665aed8 |
|
BLAKE2b-256 | 0c79238143e46569db610b98e0d6c1c1854227f581811c5fd145134c7e82f53b |