Compression for photon-noise limited images which keeps losses within the Poisson noise envelope
Project description
PYMECompress
Compression for photon-noise limited images which keeps losses within the Poisson noise envelope
PYMECompress consists of three parts:
-
a fork of the Basic Compression Library originally by Marcus Geelnard, modified to include a heavily optimized huffman coder (BCL license is avalable under pymecompress/bcl/doc/manual.pdf and would appear to be BSD compatible)
-
a fast, AVX optimized, quantizer to perform "within noise level" quantization of photon-limited images
-
a python wrapper of the above. Note that at this point, only huffman coding and quantization are exposed to python
Together they offer a single core throughput of ~500 -600MB/s
Installation
Using conda
Prebuilt binaries of PYMEcompress are available as a conda package (pymecompress) on the david_baddeley conda channel for python 2.7, 3.6 & 3.7
From source
If you don't use conda of want a package for a different python version (or if you want to play with the source) you will have to build from source.
Because we use gcc compiler extensions for avx opcodes, we must use gcc/clang for compilation, regardless of platform.
On OSX / linux, a standard python setup.py install
or python setup.py develop
should work.
On Windows, you need to install mingw and run the build step first so that you can pass the compiler flag to python setup.py build
- i.e. :
python setup.py build --compiler=mingw32
python setup.py install
A suitable environment for building pymecompress using the following conda command conda create -n <name> python=x.x numpy cython libpython m2w64-toolchain
PIP (experimental)
An experimental pip-installable package is currently in the pypi testing repository. It can be installed using
pip install -i https://test.pypi.org/simple pymecompress
Currently only a source distribution is available, meaning that you will need a build environment (gcc/mingw) set up as described for building from source. A shift to pypi proper and wheels to follow shortly.
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
Built Distributions
Hashes for pymecompress-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37e820353e9d15dc4c1b2ab2385de7fb94e18ed8cc027f60e892d55e67fa1934 |
|
MD5 | 7e395538ad80c72aca9489126b062c2e |
|
BLAKE2b-256 | c3aca8e832b64e900653775ed24e649787ce0a05f0bd972520f61c686082ba57 |
Hashes for pymecompress-0.2.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc8848fcac228d1016fac2174f01d36f80d1477e5386819632598d003fa65f54 |
|
MD5 | 90ff02ad313ffa172de65e4faafc3f12 |
|
BLAKE2b-256 | 862b292201bf40b9e70c0ecce43c7756ac5473fdf6244487e093695f07dd83d9 |
Hashes for pymecompress-0.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54ee70e8cc0cbf9f941778cf90bbd152c75becab6c7a7436c57021c7c4092789 |
|
MD5 | 0dfb857849ea16ca0263445e20649f3c |
|
BLAKE2b-256 | 10f7543a37720ad2449d15cfeb1e43171ae54df69fc5f7444321031890806e17 |