saveChNSx
saveNSx
Saves a given continuous NSx file and saves a subset of the channels in
the given file into a new NSx file. Ths NSx file has to be opened with
openNSx version 5.1.1.0 or later.
All input arguments are optional. Input arguments can be in any order.
NSx: The data structure holding the channel information
fname: Name of the file to be saved. If the fname is omitted
the program will automaticallyl save the file using the
original file name with -mod added to the end of the
file.
DEFAULT: Will automatically choose the name.
reset: If argument 'reset' is passed to the function then the
channel IDs are reset. For example, when reading channels
2, 5, and 9 only, normally the file will indicate that the
newly saved file will contains channels 2, 5, and 9. If
'reset' is used, then the file will labels those channels
as 1, 2 and 3 respectively. This is a requirement for OFS
compatibility when a tetrode file is loaded.
DEFAULT: The channel labels are not reset.
Example:
saveChNSx('c:\data\sample.ns5', [1,5:9], 'reset');
In the example above, the file c:\data\sample.ns5 will be opened and
channels 1,5,6,7,8,9 out of all the channels in this file will be saved
as a new file. If the new file already exists then the user will be
prompted if the new file should be overwritten or not. The new file
will label the channels as 1, 2, 3, 4, 5, and 6.
Kian Torab
Blackrock Microsystems
kian@blackrockmicro.com
Version 2.1.0.1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Version History
1.0.0.0:
- Initial release.
2.1.0.1:
- Added the flag 'reset' as an optional argument to OFS compatibility..
2.1.1.0:
- Fixed the "numberic" bug.
- Fixed saved file name bug.
- Fixed other reading bugs.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%