Routines for generating different views of data series (e.g., 1:100, 1:1000, 1:10000 views, etc). The project provides a C++ core library with bindings for MATLAB and Python.
- Go to the Releases page.
- Download the
Pyraview.mltbxfile. - Open MATLAB and double-click the
.mltbxfile to install the toolbox. - The
pyraviewfunctions will be available immediately.
If you are developing the library or need to modify the source code:
- Open MATLAB.
- Navigate to the
src/matlabdirectory. - Run the build script:
This will compile
build_pyraviewpyraview.mex(or.mexw64,.mexmaci64, etc.) into the+pyraviewpackage directory. - Add the
src/matlabdirectory to your MATLAB path.
Usage:
% Example usage
status = pyraview.pyraview(data, prefix, steps, nativeRate);See src/matlab/README.md for more details.
You can avoid compiling the C++ library by using the pre-built binaries provided in the releases.
-
Download the Library:
- Go to the Releases page.
- Download the zip file for your OS (e.g.,
pyraview-Linux-x64.zip,pyraview-Windows-x64.zip). - Extract the contents to a folder of your choice (e.g.,
~/libs/pyraview).
-
Install the Python Package:
pip install git+https://github.com/VanHooserLab/Pyraview.git#subdirectory=src/python
(Or clone the repo and run
pip install .insidesrc/python). -
Configure Library Path: Set the
PYRAVIEW_LIBenvironment variable to point to the extracted shared library file (libpyraview.so,pyraview.dll, orlibpyraview.dylib).- Linux/macOS:
export PYRAVIEW_LIB=/path/to/extracted/libpyraview.so - Windows (PowerShell):
$env:PYRAVIEW_LIB="C:\path\to\extracted\pyraview.dll"
- Linux/macOS:
To build the C++ library yourself (requires CMake and a C++ compiler):
-
Build the C++ Library:
mkdir build && cd build cmake .. cmake --build .
The shared library will be in
build/bin. -
Install the Python Package: Navigate to
src/pythonand run:pip install . -
Configure Library Path: Set
PYRAVIEW_LIBto point to the built library inbuild/bin.
Usage:
import pyraview
# See src/python/pyraview/__init__.py for API detailsPyraview uses CMake for building the core C++ shared library.
Prerequisites:
- CMake (3.10 or later)
- C++ Compiler (supporting C++11)
Steps:
- Clone the repository.
- Create a build directory:
mkdir build cd build - Configure and build the project:
On successful build, the shared library and the
cmake .. cmake --build .run_testsexecutable will be placed inbuild/bin.