Giter VIP home page Giter VIP logo

sdds's Introduction

SDDS

Cron Testing Code Climate coverage Code Climate maintainability (percentage)

PyPI Version GitHub release Conda-forge Version DOI

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.

sdds's People

Contributors

dronakurl avatar fscarlier avatar fsoubelet avatar jaimecp89 avatar joschd avatar mael-le-garrec avatar pylhctokens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.