Changelog
Source:NEWS.md
readNSx 0.2.0
CRAN release: 2026-11-05
-
NEVdata packets are now read in chunks, and the packet types of a whole chunk are checked at once. Excluded events (by defaultspike) no longer cost any parsing, and memory use no longer grows with the file size, so importing aNEVfile that stores the waveform of every spike is many times faster - The waveform of each spike is parsed for a whole chunk at once and written to
waveforms.h5while reading - Fixed the spike waveform being cut to its first 4 (
NEV2.2 and 2.3) or 6 (NEV3.0) samples. Thewaveformdata set inwaveforms.h5is now a matrix with all samples of each spike, one column per spike (zero-padded when electrodes store samples in different sizes); it used to be a vector - Fixed an error when importing spikes from a recording that has no spikes
- Added
read_nev_header()to read theNEVheaders, such as the channel labels, without reading the data packets - Importing
NSxfiles that store one data point per data block (recordings with precision time protocol,PTP, time-stamps) no longer takes days: data points are read and written toHDF5in batches instead of once per data block and channel. Partitions are found while scanning the data block headers, so memory use no longer grows with the length of the recording - In those files, clock jumps that cancel out within a frame of
readNSx.packets_per_framedata blocks, and backward jumps, no longer split a continuous recording into several partitions. As inNPMKopenNSx, a forward jump of more thanreadNSx.max_tick_multiplesampling intervals still starts a new partition. In otherNSxfiles, each data block is one partition: unchanged for files with a30 kHztime-stamp clock, while files with nanosecond time-stamps used to merge data blocks whose time-stamps lined up. If such a file’s time-stamps do not tick at the header’stime_resolution_timestamp(more than half of its data points would start a new partition), the import stops with an error naming that field instead of writing one partition per data point -
NSxtime-stamps are converted to seconds with the file’stime_resolution_timestampinstead of always as nanoseconds. For files with a30 kHztime-stamp clock, therelative_timeof each partition used to be 33,333 times too small and now agrees with theNEVevent times. A resolution of 2000 or less is treated as 30000. Therelative_timestored with each channel keeps full precision; it used to be rounded to 4 decimals (up to 1.5 samples at30 kHz). Imports made by earlier versions keep the old values until they are imported again - A data block whose header declares more data points than the file holds is read up to its last complete data point instead of failing. A warning names the file when it ends early, has a corrupt data block header, or holds no data points. A partition can now hold more than 2^31 - 1 data points
- Invalid values of the options
readNSx.chunk_size,readNSx.packets_per_frameandreadNSx.max_tick_multiplegive an error naming the option before anything is written;readNSx.chunk_size = 0used to loop forever - Fixed results of the
C++readers (NSxscanning, the legacyNSxreader, andBCI2000parameters) being exposed to garbage collection before they were returned, which could give wrong values, hangs, or crashes - Writing
HDF5data to an existing file that is notHDF5now gives an error and leaves the file alone. The file used to be replaced with an emptyHDF5file without warning, even when only checking whether it could be written. An empty file is still replaced, so importing again repairs one left behind by an interrupted import - Fixed the
WebAssemblybuild, which has failed sinceHDF5support moved tohdf5lib, leavingwebRusers on version 0.0.7, which cannot readHDF5data there.WebAssemblybuilds now link theHDF5library of thewebRbuild tools
readNSx 0.1.0
CRAN release: 2026-09-02
-
HDF5is now read and written directly byreadNSx, linking againsthdf5libfor a static build of theHDF5library. This removes the dependency onhdf5rand theHDF5system requirement; no systemHDF5installation is needed on any platform - Removed the
hdf5rcode path and the plain-R.raltfallback store; there is now a single storage implementation. The layout on disk is unchanged, so files exported by earlier versions read back unchanged and files written now stay readable byhdf5r,h5py, and command-lineHDF5tools - Channel datasets are no longer capped at
2^31samples: dimensions and offsets are carried as doubles all the way intoHDF5 - Reading a contiguous range from a channel now reads only that range instead of the whole dataset
-
h5_valid(file, "w")no longer truncates the file it is asked about - Added complex support, stored as the
H5T_COMPOUND {"r", "i"}of doubles thatnumpyandh5pyuse forcomplex128. Complex datasets written elsewhere are read back as complex whatever their member names, including the{"Real", "Imaginary"}layouthdf5ruses andHDF52.0 native complex - Strings are now written as
UTF-8rather than being labeledASCIIregardless of content, so non-ASCIItext survives. For plainASCIIthe stored bytes are unchanged. Strings are read using whatever character set the file declares, so files written by earlier versions are unaffected -
NA_character_is now stored as anHDF5NULLand read back asNA. Previously it became the literal text"NA", which no reader could tell apart from a genuine"NA"string -
NAin integer, double and logical vectors round-trips exactly, matching whathdf5rstores bit for bit
readNSx 0.0.7
CRAN release: 2026-05-23
-
import_nspSupports streaming the data with lengths larger than the bound of 32-bit integers. This supports high-frequency long-time continuous recording, extending the30,000 Hzrecording duration from 10 minutes (100 channels) to Almost a half day recording. The individual channel size is still limited by the 32-bit integer, that is around 19 hours - Fixed an
rchkissue reported byCRAN - Replaced
c.integer64withc
readNSx 0.0.6
CRAN release: 2025-10-24
-
HDF5falls back to alternatives inWASMto avoid compilation issues when running in web browser
readNSx 0.0.5
CRAN release: 2024-09-03
- Fixed calling
R_MakeExternalPtrwithRf_mkChar, usingRf_installinstead - Fixed a potential imbalanced protect