Skip to main content

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


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.3.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

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

shtRipper_cpp-1.3.0-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file shtRipper_cpp-1.3.0.tar.gz.

File metadata

  • Download URL: shtRipper_cpp-1.3.0.tar.gz
  • Upload date:
  • Size: 30.7 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

Hashes for shtRipper_cpp-1.3.0.tar.gz
Algorithm Hash digest
SHA256 006c1b9ab59042ff15bc792847a32806f30d0dfc35167647d2d87d4a69220932
MD5 182ea968712dcfc0c4863c72435f9d0d
BLAKE2b-256 283beb7d5ef93c9115238bb04efde62a6a7b8704ffcf6f061ac5163c74110e11

See more details on using hashes here.

File details

Details for the file shtRipper_cpp-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: shtRipper_cpp-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 31.9 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

Hashes for shtRipper_cpp-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4953f3170bbadbdc485a0e4863f7424a24c0a1da02b5270815b0871044243803
MD5 926b42569ff09a239c491c66d5d81c3a
BLAKE2b-256 22bfd66c10c2b58ffaf2dfd2a377dc99252b758820f591a6e78d5d630d20ed3f

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