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
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
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 xrd-xy-parser-0.0.3.tar.gz.
File metadata
- Download URL: xrd-xy-parser-0.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f538764d0764b10b0a5228b834f4fd13b2315c9d086f07d3391c9b7f44581876
|
|
| MD5 |
bef27bef5214952929fb2702ca2852bd
|
|
| BLAKE2b-256 |
5b33b1fb6d75d738f0e8f002e282d6ea7e41e568f1c868ee68bf2ec88adbe6c6
|
File details
Details for the file xrd_xy_parser-0.0.3-py3-none-any.whl.
File metadata
- Download URL: xrd_xy_parser-0.0.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4bf4a7c6346e21257f07a01ab85bfcf8cd0711dbc24741e449e63a64c6a5bf6
|
|
| MD5 |
18932c1355fa0dc072316cbaa99b2675
|
|
| BLAKE2b-256 |
c0c1a371b0d265588aac7b37e83fba3c0f046aad24723d0eed55fc6046424170
|