From 5e02370ae353e076ab302b59057b87fdda3b4ea2 Mon Sep 17 00:00:00 2001 From: kianabc Date: Mon, 21 Dec 2020 11:49:03 -0700 Subject: [PATCH] ***** NPMK Version 5.5.0.0 :December 17, 2020 ***** % % 1.2.0.0: splitNSx: December 17, 2020 % - Updated to add FileSpec 3.0 compatibility. - @David Kluger Removed mergeNSxNEVSeries-invalid script. --- NPMK/NSx Utilities/mergeNSxNEVSeries.m | 60 -------------------------- NPMK/NSx Utilities/splitNSx.m | 5 ++- NPMK/Versions.txt | 6 ++- 3 files changed, 9 insertions(+), 62 deletions(-) delete mode 100644 NPMK/NSx Utilities/mergeNSxNEVSeries.m diff --git a/NPMK/NSx Utilities/mergeNSxNEVSeries.m b/NPMK/NSx Utilities/mergeNSxNEVSeries.m deleted file mode 100644 index 6420a04..0000000 --- a/NPMK/NSx Utilities/mergeNSxNEVSeries.m +++ /dev/null @@ -1,60 +0,0 @@ -% -% mergeNSxNEV() -% -% This function loads two NSx and NEV files and it will combine them -% together into one file. The resulting file will be saved as new NSx -% and NEV files onto the disk. To combine two NSx and NEV files into -% indivual NSx and NEV variables in MATLAB see combineNSxNEV. The time -% difference between the two sets of recordings is removed. To determine -% the time differnce between the two data files, use -% NSx.MetaTags.DateTimeRaw or NEV.MetaTags.DateTimeRaw variables. -% -% -% filename1: The name of the first NSx file. This input is optional. In -% its absense, a dialog will open and will prompt the user to -% select an NSx file. -% (OPTIONAL) -% -% filename2: The name of the second NSx file. This input is also -% optional. In its absense, a dialog will open and will -% prompt the user to select an NSx file. -% (OPTIONAL) -% -% Example: -% -% mergeNSxNEV('c:\data\saveddata1.ns5', 'c:\data\saveddata2.ns5'); -% -% The above example reads the two files (full path needed) -% c:\data\saveddata1.ns5 and c:\data\saveddata2.ns5 and their corresponding -% NEV files (saveddata1.nev and saveddata2.nev) in the same folder and -% merges them into a single file called firstrecording001-combined.ns2 -% and firstrecording001-combined.nev. -% -% Kian Torab -% kian@blackrockmicro.com -% Blackrock Microsystems -% Version 1.0.0.0 -% March 31, 2014 -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Version History -% -% 1.0.0.0: -% - Initial release. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -function mergeNSxNEV(varargin) - -if nargin >= 1 - disp('Too many input arguments.'); - return; -end - -%% Opening the file -% Getting the name of the first file from the user -[gfFileName gfPathName] = getFile; -[filePath, fileName, fileExt] = fileparts(gfFileName); - - diff --git a/NPMK/NSx Utilities/splitNSx.m b/NPMK/NSx Utilities/splitNSx.m index 3ca7bc0..5dfa5c5 100644 --- a/NPMK/NSx Utilities/splitNSx.m +++ b/NPMK/NSx Utilities/splitNSx.m @@ -33,6 +33,9 @@ function splitNSx(splitCount) % - Fixed a bug related to a case where initial timestamp of the first % data segment was not 0. % +% 1.2.0.0: +% - Updated to add FileSpec 3.0 compatibility. - @David Kluger +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -75,7 +78,7 @@ function splitNSx(splitCount) % dataLength = positionEOD - positionEOH; % fseek(FID, 28, 'bof'); % channelCount = fread(FID, 1 , 'uint32=>double'); -elseif strcmpi(NSx.MetaTags.FileTypeID, 'NEURALCD') +elseif strcmpi(NSx.MetaTags.FileTypeID, 'NEURALCD') || strcmpi(NSx.MetaTags.FileTypeID, 'BRSMPGRP') % Calculating different points in the file fseek(FID, 0, 'bof'); basicHeader = fread(FID, 314, '*uint8'); diff --git a/NPMK/Versions.txt b/NPMK/Versions.txt index 3749efe..650bfcb 100644 --- a/NPMK/Versions.txt +++ b/NPMK/Versions.txt @@ -489,5 +489,9 @@ NPMK Version 2.8.2.0: 5 May 2014 % - Minor bug fixes and general code clean up - @David Kluger % +***** NPMK Version 5.5.0.0 :December 17, 2020 ***** +% +% 1.2.0.0: splitNSx: December 17, 2020 +% - Updated to add FileSpec 3.0 compatibility. - @David Kluger -LATEST:5.4.5.0 \ No newline at end of file +LATEST:5.5.0.0 \ No newline at end of file