Refactor MATLAB MEX sources and convert get_header to .m#17
Refactor MATLAB MEX sources and convert get_header to .m#17stevevanhooser merged 4 commits intomainfrom
Conversation
…acOS coaching. Renames `pyraview_mex.c` to `pyraview.c` in `src/matlab/+pyraview/`. Replaces `pyraview_get_header_mex.c` with a pure MATLAB implementation `get_header.m` to simplify usage and cross-platform compatibility. Updates `build_pyraview.m`, `README.md`, and `toolboxPackaging.prj` to reflect these changes. Adds `pyraview.macOneTime` function to guide macOS users through the security authorization process for the remaining MEX binary.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…hing, and clarify layout. Renames `pyraview_mex.c` to `pyraview.c` in `src/matlab/+pyraview/`. Replaces `pyraview_get_header_mex.c` with a pure MATLAB implementation `get_header.m` to avoid compilation and simplify cross-platform usage. Adds `pyraview.macOneTime` function to coach macOS users through allowing the `pyraview.mex` binary. Explicitly defines `PV_LAYOUT_COLUMN_MAJOR = 1` in `pyraview.c` to clarify that the engine correctly handles MATLAB's column-major data layout. Updates build scripts and documentation to reflect these changes.
This change overhauls the Pyraview C++ engine and all reader APIs (MATLAB, Python) to use an Interleaved data layout (`[Sample0_Ch0, Sample0_Ch1...][Sample1_Ch0...]`) instead of the previous Planar format. This ensures that appending data chunks maintains a consistent, globally readable file structure, addressing issues with fragmented planar files. Refactors `src/c/pyraview.cpp` to use global interleaved buffers and single-threaded sequential writes per level. Updates `src/matlab/+pyraview/readFile.m` and `src/python/pyraview/__init__.py` to correctly parse the new format. Updates `include/pyraview_header.h` and documentation to reflect the new output standard.
Major overhaul of Pyraview I/O to support robust chunk appending: - Refactored `src/c/pyraview.cpp` to use global interleaved buffers and sequential writes, producing Sample-Major (Interleaved) output files (`[S0_AllCh][S1_AllCh]...`). - Updated `src/matlab/+pyraview/readFile.m` and `src/python/pyraview/__init__.py` to read this new format. - Updated `include/pyraview_header.h` and `pyraview_gateway.c` comments to reflect the layout change. Maintenance and Cleanup: - Renamed `pyraview_mex.c` to `pyraview_gateway.c` to prevent object file name collisions with `pyraview.cpp` during MEX compilation. - Replaced `pyraview_get_header_mex.c` with a pure MATLAB implementation `get_header.m`. - Added `pyraview.macOneTime.m` for macOS security coaching. - Updated build scripts and documentation.
This change streamlines the MATLAB interface by renaming the main MEX source file to
pyraview.cand converting the header reading utilityget_headerfrom a C MEX file to a pure MATLAB function. This removes the compilation requirement for the header reader. Additionally, a helper functionpyraview.macOneTimeis introduced to assist macOS users in allowing the unsignedpyraview.mexbinary to run via System Settings.PR created automatically by Jules for task 3706797163850873221 started by @stevevanhooser