plot_mesh_dotcloud for rendering one or more mesh3d objects as an orthographic rim-lit dot cloud in base R (no rgl dependency); supports per-vertex colors, depth-gradient palettes, per-mesh alpha, side filtering, and painter's-algorithm depth sorting across multiple meshesplot_mesh_polygon for rendering one or more mesh3d objects as flat-shaded Lambert-lit triangles in base R; point-cloud meshes (no face matrix) are automatically substituted by small sphere instances; supports camera-facing clipping (mesh_clipping), side filtering, per-mesh alpha blending, and configurable shadow_color, light_intensity, and ambient_intensityplot_mesh_dotcloud and plot_mesh_polygon gain a clipping_plane argument (a 4-element numeric normal-and-offset vector, or a list of such vectors) to discard geometry on one side of arbitrary planes before rendering, and a per-mesh clipping_plane_enabled logical toggle to opt individual meshes in or out of clippingensure_mesh3d for coercing various surface formats (mesh3d, ieegio_surface, fs.surface, surf.asc) to a canonical mesh3d object; previously internal-onlyfreqz2 plot legend: the cutoff legend used the raw cutoffs argument (and could index past the color palette, yielding NA colors) when a requested cutoff did not actually intersect the magnitude curve; the legend now only lists cutoffs that are drawn, and labels the unit as dB instead of the filter's frequency unitmorlet_wavelet gains a segment_length argument (default NULL) that processes long signals (e.g. multi-hour recordings) in overlapping segments using batched mvfftw_c2c convolutions, dramatically reducing peak memory and FFT cost while preserving the legacy result on the signal interiorbaseline_array now supports seven baseline methods: "percentage", "sqrt_percentage", "decibel", "zscore", "sqrt_zscore", "db_zscore", and "subtract_mean"; newly added methods include decibel z-score normalizationHaar wavelet feature extractionwavelets package dependency with waveslim for discrete wavelet transform used in spike sorting utilitiesproject_plane gains an n_iters argument to control the number of projection iterations (default is 5)carla implementing the Common Average Re-referencing by Least Anti-Correlation (CARLA) algorithm (see CITATION) for selecting an optimal subset of channels as the common average reference in CCEP datacrp implementing the Canonical Response Parameterization (CRP) method for characterizing single-trial evoked responses (e.g. CCEPs): estimates response duration, extracts the canonical response shape, and reports per-trial weights, SNR, and explained varianceFFTW3 wrappers (fftw_r2c, fftw_c2r, fftw_c2c, mvfftw_r2c, mvfftw_c2c, mvfftw_c2r, and their 2D/3D variants) with memory bugs fixed; these are thin bindings for advanced users requiring maximum throughputdesign_filter_fir band-pass scaling reference frequency to use the average of the transition-band midpoints (matching MATLAB fir1/scale_filter), and fixed band-stop scaling to always normalize at DC; previously both could produce incorrect gain for asymmetric transition bandsfiltfilt now accepts a Sos (second-order sections) object from gsignal and delegates to gsignal::filtfilt in that casecatmull_rom_3d for smooth Catmull-Rom spline interpolation through 3D point sequences, including closest-point projection from an arbitrary 3D point onto the curveqfac handling in the matrix to quaternion conversion so that right-handed transforms (negative determinant) are correctly representedfir1 filter computation is significantly faster via an optimized internal implementationfind_peaks to provide finding peaks along a trace of signalgammatone_fast filters to obtain the audio envelope at different frequenciesvcg_subset_certex to subset meshvcg_subdivision to up-sample meshclang20 warning and removed problematic vcglib code that use pointers after free.std::nearbyint instead std::round to round numbers to comply to IEC-60559 standard that half numbers round to nearest even integers3D volume sampling in C++: resample_3d_volumegsignal::resample (however, some edits might be needed in the future to produce the same results as Matlab)ieegio surface geometries to mesh3d to be used in VCG related functionsK-D tree search to find closest points among two point cloudsvcg_raycaster to find intersection of rays and given mesh object.vctrs to Suggests to fix the issue that fails the unit test due to an update in testthat package.design_filter ensures frequency window cuts off within 0 to Nyquistfftfilt allows matrix inputfiltfilt with a=1 (FIR filter) calls fftfilt to speed uppwelch incorrect power calculation. The results agrees mostly with Matlab functionhamming window as the default in pwelch; exported additional window options such as blackman families, bohmanwin, flattopwin, and hanningc++ template issue caused by vcglib, which fails to compile under clang19decimate agrees with Matlab now (both fir and iir filters)freqz2 to obtain the frequency response of a digital filter (similar to gsignal::freqz but with more accurate cutoff frequency calculation and more customize plots)diagnose_filtercheck_filter to obtain expected magnitude at given frequency and reciprocal condition numbersignal and use gsignal insteaddesign_filter for both fir and iir filters, allowing both entry and intermediate users to design band-pass/stop, low/high pass filters easily.iir filter order generated from design_filter will be checked against rcond_filter_ar (reciprocal condition number) to make improve the numeric stabilitydijkstra; the package passed asan, valgrind test provided by rhub2dijkstra method occasionally causing memory error. New method is much faster now.plot.pwelch not displaying the signal names correctly.c++17 requirement and supports 11, 14, and 17 standardsFIR1 filterpwelch throwing warnings when signal is zero (or zero power)dijkstra to find shortest paths in meshvcglibC++ template issue via type explicit callsfir1 filter when band-passing signals with incorrect npwelch plot works with zero power now; mv_pwelch plot error fixedband_pass2 to avoid NA generated when upper band frequency is NyquistVector3, Matrix4, Quaternion for in-place calculationWASMCRAN: "format string is not a string literal (potentially insecure)"filearraygrow_volumemesh_from_volume no longer throw errors if the mesh does not form a manifoldfill_surface to fill in volume based on given surface meshmesh_from_volume to generate mesh from volume. This function can be used together with fill_surface to generate surface enveloperegister_volume to align two imaging data using linear or non-linear registrationfftw on 2D image and 3D volume data1D, 2D, 3D data using FFTpwelch frequency not starting from zero issueTinyThread using the latest pull-request to RcppParallelinterpolate_stimulation to detect stimulation signals within the response and interpolate with smooth signalssplinesfast_quantile and fast_mvquantile to improve the quantile/median calculation speedplot_signals plotting range too large when signals have large values (such as stimulation)TinyThreads library memory leak issuesdiagnose_channel, avoid duplicated pwelch calculationfilter, filtfilt that produce the same results as Matlab (with precision error)pwelch as a row-major matrix to speed up calculationwavelet_cycles_suggest to provide default calculation of wavelet cyclessignature to wavelet to resolve potential cache conflicts when running in multiple processes. (This allows RAVE to run wavelet on multiple subjects at the same time)pwelchpwelch sampling frequency to be greater than the signal lengthpwelch plot to properly handle graph text, margin, axisplot_signals to plot multiple functional data within the same canvasC++ code to inst/includes so other users can dynamically link to the functions (https://github.com/dipterix/ravetools/issues/5)fftw related codefftw plans to respect the flagsC++ to convert raw binary bytes to uint, int, float, and stringParallel processes might use different temporary directory paths. To improve the performance, it is recommended to set a shared temporary directory, hence this version
RAVETOOLS_TEMPDIR or option ravetools.tempdir.This version fixes a memory issue reported by CRAN check (gcc-UBSAN).
NA_INTEGER is subtracted by one before being converted to R_xlen_t type. This update fixes this issueRcppParallel and copied part of it into inst/include folder, with TBB removed under the GPL-3 license framework.This is an initial version of ravetools. Although a bare minimal set of signal processing functions are provided, it is sufficient to perform preprocess pipelines on most iEEG signals. Some functions are added from the dipsaus package, with considerable performance improvement. The C++ functions have been tested on all major platforms, with different architectures (ARM, i386, x64).
README file to demonstrate basic usageNEWS.md file to track changes to the package.decimate with FIR filters creating the same results as in Matlabdetrend function todiagnose_channel to visually inspect channel signalsmorlet_wavelet to enable fast and memory efficient wavelet decomposition; the result agrees with existing Matlab code with floating errors (10^-7)multitaperpwelch (Welch periodogram)notch_filter to remove line noiseThe following functions are implemented in C++ parallel. They tend to be faster than normal base-R implementations, depending on the number of CPU cores used.
collapse to collapse arraysshift_array to shift array along certain indicesfast_cov to calculate pearson covariance matrix in parallelbaseline_array to calculate baseline arrays with multiple margins