SDDS file handling.
Project description
SDDS
This package provides reading and writing functionality for self describing data sets (sdds) files. On the python side, the data is stored in a class structure with attributes corresponding to the sdds-format itself (see sdds-format).
See the API documentation for details.
Installing
Installation is easily done via pip
:
python -m pip install sdds
One can also install in a conda
environment via the conda-forge
channel with:
conda install -c conda-forge sdds
Example Usage
import sdds
sdds_data = sdds.read("path_to_input.sdds")
sdds.write(sdds_data, "path_to_output.sdds")
Read files with different endianness
By default the endianness (byte order) of the file is determined either by
a comment !# little-endian
or !# big-endian
in the header of the file.
If this comment is not found, the endianness of the running machine is assumed.
One can force a certain kind of endianness to the reader by supplying it to the read function:
import sdds
sdds_data = sdds.read("path_to_input_with_big_endian.sdds", endianness="big")
sdds_data = sdds.read("path_to_input_with_little_endian.sdds", endianness="little")
Be aware that sdds.write
will always write the file in big-endian order and
will also leave a comment in the file, so that the reader can determine the
endianness and there is no need to supply it when reading
a file written by this package.
Known Issues
- Can't read binary columns
- No support for
&include
tag
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
File details
Details for the file sdds-0.4.1.tar.gz
.
File metadata
- Download URL: sdds-0.4.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58f3cf7fd113c2e14f352d7bc1047caf21a59da0d75a929b64b3afb530b34fb6 |
|
MD5 | 4bfb905fb62b60d479743e8af122ff12 |
|
BLAKE2b-256 | d719fe650611de4b853310312d5e851036ab1cc73e56707918f26dbf43a55fd5 |
File details
Details for the file sdds-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: sdds-0.4.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 919ab10728e50871f39645b05ecb482ef1e34e40f998001a6595e5bb65e3f8fa |
|
MD5 | c06f0131b17ac5744fb4e94e54c7f0d3 |
|
BLAKE2b-256 | 9cc769f95d212a67e6b18b2f56ff36fa51205c3a64ba54f61c4f60434affdf1c |