sweetsourcod

The sweet source coding library (Python and C++)

https://github.com/martiniani-lab/sweetsourcod

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: aps.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

The sweet source coding library (Python and C++)

Basic Info
Statistics
  • Stars: 12
  • Watchers: 6
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Created almost 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation Authors

README.md

SweetSourCod

The sweet source-coding library

This library is a collection of methods to estimate the entropy of sequences by data compression (source coding).

Examples of the use of this library can be found in

  1. S. Martiniani, P. Chaikin, D. Levine, "Quantifying hidden order out of equilibrium", Phys. Rev. X 9, 011031 (2019)

  2. S. Martiniani, Y. Lemberg, P. Chaikin, D. Levine, "Correlation lengths in the language of computable information", Phys. Rev. Lett. 125, 170601 (2020)

  3. A. Cavagna, P. M. Chaikin, D. Levine, S. Martiniani, A. Puglisi, and M. Viale, "Vicsek model by time-interlaced compression: A dynamical computable information density", Phys. Rev. E 103, 062141 (2021)

  4. S. Ro, B. Guo, A. Shih, T. Phan, R. Austin, D. Levine, P. Chaikin, and S. Martiniani, "Model-Free Measurement of Local Entropy Production and Extractable Work in Active Matter", Phys. Rev. Lett. 129, 220601 (2022)

Description

The library implements/wraps a number of algorithms and utilities:

  • LZ77, Lempel-Ziv 77 pattern matching code. Wraps the kkp2 algorithm performing LZ77 factorization in O(n).

  • LZ78, Lempel-Ziv 78 incremental parsing rule.

  • Cross-parsing complexity, for computing KL divergence.

  • Block Entropy, Shannon entropy for blocks of a given size.

  • Block Sorting (Burrows-Wheeler Transform) based entropy estimator.

  • Wraps a range of compression algorithms readily available in Python (after reducing the sequence to its minimal binary representation)

    • deflate
    • bzip2
    • lzma
    • zstd
    • brotli
    • zopfli
  • run-length encoding

  • Hilbert curve, Hilbert-Peano space filling curve for optimal compression of higher dimensional sequences on a square grid.

  • Gosper curve, space filling curve for optimal compression of higher dimensional sequences on an hexagonal grid.

Installation

You can install the library in place by running

shell python setup.py build_ext -i

Owner

  • Name: Martiniani Lab
  • Login: martiniani-lab
  • Kind: organization
  • Location: Minneapolis, MN

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Martiniani"
  given-names: "Stefano"
  orcid: "https://orcid.org/0000-0003-2028-2175"
- family-names: "Guo"
  given-names: "Buming"
  orcid: "https://orcid.org/0000-0003-2581-7933"
title: "Sweetsourcod"
version: 1.0.0
# doi: 10.5281/zenodo.1234
# date-released: 2017-12-18
url: "https://github.com/martiniani-lab/sweetsourcod"
preferred-citation:
  type: article
  authors:
  - family-names: "Martiniani"
    given-names: "Stefano"
    orcid: "https://orcid.org/0000-0003-2028-2175"
  - family-names: "Chaikin"
    given-names: "Paul"
    orcid: "https://orcid.org/0000-0001-9864-0089"
  - family-names: "Levine"
    given-names: "Dov"
    orcid: "https://orcid.org/0000-0001-8241-8168"
  doi: "10.1103/PhysRevX.9.011031"
  journal: "Physical Review X"
  # month: 
  start: 220601 # First page number
  # end: 10 # Last page number
  title: "Quantifying Hidden Order out of Equilibrium"
  # issue:
  volume: 9
  year: 2019

GitHub Events

Total
  • Issues event: 1
  • Watch event: 4
  • Issue comment event: 1
  • Push event: 2
Last Year
  • Issues event: 1
  • Watch event: 4
  • Issue comment event: 1
  • Push event: 2

Dependencies

Pipfile pypi
  • backports.lzma *
  • bitarray *
  • brotli *
  • cython *
  • numba *
  • numpy *
  • requests >=2.20.0
  • zopfli *
  • zstd *
Pipfile.lock pypi
  • backports.lzma ==0.0.14
  • bitarray ==0.9.3
  • brotli ==1.0.7
  • certifi ==2020.12.5
  • chardet ==3.0.4
  • cython ==0.29.10
  • enum34 ==1.1.10
  • funcsigs ==1.0.2
  • idna ==2.8
  • llvmlite ==0.32.1
  • numba ==0.44.0
  • numpy ==1.16.4
  • requests ==2.22.0
  • singledispatch ==3.6.1
  • six ==1.15.0
  • urllib3 ==1.25.8
  • zopfli ==0.1.6
  • zstd ==1.4.0.0
setup.py pypi
  • numpy *