Skip to main content

parse xy format file of X-ray diffraction

Project description

xrd_xy_parser

xrd_xy_parser is parser of xy file from X-ray diffraction.
Python ver >= 3.10

installation

pip install xrd_xy_parser

or

pip3 install xrd_xy_parser

how to use

from xrd_xy_parser import xy

if __name__ == "__main__":

    try:
        header, body, footer = xy.readstr("examples/example.xy")
        print("header:{}\n" "body:{}\n" "footer:{}\n".format(header, body, footer))

    except xy.ParseError as e:
        print(e)

xy file structure

xy file is not explicitly specified.
xy file consists from header,body,footer parts.
header includes some infomation, body is float list. footer is empty or consists from \s ,\t ,\r\n,\n.

<301.15K> \\header
Wavelength = 1.54059 \\header
26.78	11598.00 \\body
26.8	10786.00
26.82	5768.00
26.84	1149.00
26.86	255.00
26.88	74.00
26.9	52.00
26.92	30.00
26.94	19.00 \\body
\\ footer

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

xrd-xy-parser-0.0.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

xrd_xy_parser-0.0.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file xrd-xy-parser-0.0.2.tar.gz.

File metadata

  • Download URL: xrd-xy-parser-0.0.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for xrd-xy-parser-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2ec131e28803477d64eb253f3be92469490325e48f82932dc5c7e4c4cfce0364
MD5 90a783fb0563c47905750454c047071b
BLAKE2b-256 049e5d0b55f0611e1f6d7dc38b2cf28267323ff41c4eff75d2ec98b65f65bd30

See more details on using hashes here.

File details

Details for the file xrd_xy_parser-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: xrd_xy_parser-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for xrd_xy_parser-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fd3abfa7a28bcfd490c9157a87034483af8d483dcc4b4d85ae0d5735cc2e937
MD5 5ad7001b06dd6ca5d06cb4ed422eb06d
BLAKE2b-256 7a98ec998142d80415b48808b4a160109450813315645bc34e7d6739057eb16f

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