Skip to main content

Parser for the DCM (Data Conservation format) format used by e.g. Vector, ETAS,...

Project description

dcmReader

Parser for the DCM (Data Conservation format) format used by e.g. Vector, ETAS,...

Basic usage

The read function of DcmParser parses the given DCM-file and stores internally the parsed values.

Sample program: from dcmReader.dcm_reader import DcmReader

dcm = DcmReader()
dcm.read("tests/Sample.dcm")

readFunctions = dcm.get_functions()
for fnc in readFunctions:
    print(fnc)

Will return:

ParameterFunction
  Version: 1.0
  Description: Function for parameters
BlockParameterFunction
  Version: 2.0
  Description: Function for block parameters
CharacteristicLineFunction
  Version: 3.0
  Description: Function for characteristic line functions
FixedCharacteristicLineFunction
  Version: 3.1
  Description: Function for fixed characteristic line functions
GroupCharacteristicLineFunction
  Version: 3.2
  Description: Function for group characteristic line functions
CharacteristicMapFunction
  Version: 4.0
  Description: Function for characteristic map functions
FixedCharacteristicMapFunction
  Version: 4.1
  Description: Function for fixed characteristic map functions
GroupCharacteristicMapFunction
  Version: 4.2
  Description: Function for group characteristic map functions
DistributionFunction
  Version: 5.0
  Description: Function for distribution functions

You can also save a DCM object to a file with the write function. The output is sorted first by FUNKTION then by LANGNAME. This can also be used to sort a DCM file:

from dcmReader.dcm_reader import DcmReader

dcm = DcmReader()
dcm.read("tests/Sample.dcm")
dcm.write("tests/Sample_sorted.dcm")

UnitTests

The UnitTests can be run in the tests directory by running python Tests.py

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

dcmreader-0.5.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

dcmreader-0.5.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file dcmreader-0.5.0.tar.gz.

File metadata

  • Download URL: dcmreader-0.5.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for dcmreader-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a8396584a36b74003f0ec346db704a655d1aca25e6f33a4f3026eaa1237095bf
MD5 778f9f4bab55efafc77900ecb7881a29
BLAKE2b-256 737661d9a5eb85dd4d2ae340fb85629659bf5894a76114bb1e22e5e93f50e361

See more details on using hashes here.

File details

Details for the file dcmreader-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: dcmreader-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for dcmreader-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 362f48e68889d90dab597c22a628a85ab3d74a95d532ca12f967825a5cb0b45d
MD5 628541a780e467aacc29f2c205c6661b
BLAKE2b-256 86c8d6c744752f346d53cc79ed157cbb442595832918c13f804f758448c7cdb0

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