FUNCTIONS FOR RAT MULTIPLE SPIKE TRAIN DATA:

bold: function name
red: obsolete
<..> Necessary parameter. If any parameter is missing the function will run in interactive mode.
[..] key stroke
(...) data type (int, float, string)
(H.H.) Code is written by Hajime Hirase.
(J.C.) Code is written by Jozsef Csicsvari.
If the author is not indicated the code was written by Zoltan Nadasdy.



1xcor <input_file1> <input_file2> <output_file> <time_window>

It computes the cross-correlogram between <input_file1> as a reference and <input_file2> as the subject dot process within the given time_window. Only the positive side of the cross-correlation will be computed (see also 1xcor2s).



 1xcor2s &ltnt face="Courier New"> <input_file1> <input_file2> <output_file> <time_window>

Same as 1xcor but both positive and negative sides of the cross-correlogram will be computed. The range is from -(time_window/2) to +(time_window/2).



1xcorbin <input_file1> <input_file2> <output_file> <time_window> <nbins>

Same as 1xcor but the parameter nbins describes the number of bins.  (see also 1xcorbin2s).



1xcorbin2s <input_file1> <input_file2> <output_file> <time_window> <nbins>

Same as 1xcor2s but the parameter nbins describes the number of bins.  (see also 1xcor2s).


1xcorfirst <input_file1> <input_file2> <output_file> <time_window>

Similar to 1xcor with the difference that it considers only the first event occurring within the time window of reference. It also caled as cross-interval histogram.
See also 1xcor and 1xcorfirstbin.



1xcorfirstbin <input_file1> <input_file2> <output_file> <time_window> <nbins>

Similar to 1xcorbin with the difference that it considers only the first event occurring within the time window of reference. It also caled as cross-interval histogram.
See also 1xcorbin and 1xcorfirst.


1xcorraster2s <input_file1> <input_file2> <output_file> <time_window>

Similar to 1xcorbin2s but instead of constructing a correlo-histogram it creates a rasterogram by plotting each subject event form input_file2 relative to the reference events (inpput_file1). The x coordinates are the positions of the subject events within the time_window. The middle of the time_window is aligned to the reference event. The y coordinates are the number of the reference event. See also 1xcorbin2s .



1xcorregist <input_file1> <input_file2> <output_file> <num_of_regs>

It generates a cross-correlogram between a reference file <input_file1> which is subdivided to certain number of registers and a time list file < input_file2>. The input_file1 can be created by using the function register. The reference file <input_file1> must contain an index column as first column and a time list column as second column. The index column tells what is the register number of the corresponding time data. When the input_file1 and input_file2 is compared, and match is found between the reference and the subject file within the window of any register, the count of events will be increased for that register. The result, the cumulative counts by registers is written to the output_file as output_file as register and counts column. The num_of_regs parameter is the number of registers considered. See also register .



1xcorregpos <input_file1> <input_file2> <output_file> <num_of_regs> <offset>

It generates a register position file from time serie file. More specifically, it generates a time array from a (spike) time database <input_file2> by binning the time to intervals to registers given by a reference file as <input_file1>. The reference file must contain two columns. First is the index column of the register and the second is the time data of the register (usually field events). With giving <num_of_regs> you can specify the number of registers considered.  The output file will be a single column time serie containing the register number of the (spike) time from 0 to n in terms of the index number of the reference events (usually field events). To separate the events of one sequence from the events of the next sequence by extra bins you can specify an offset value <offset> , the number which will be added to the bin number of the first event's number  of the next sequence. The exact functions is:
If  t(input)==t(ref)  then t(output)=n(bin)+offset*n(event) .
See also register, 1xcorregist.



3seq <input_file1> <inp <input_file1> <input_file2> <input_file3> <output_file> <time_window>

Same as 3xcor but it detects triplets of events which occur in the order of input_files. If event in the input_file3 precedes an event in input_file2 the event will be ignored.



3seqmapstat <input_file1> <input_file2> <input_file3> <output_file> <time_window> <npixels> <sign_level>

It creates a joint sequence correlogram between the reference channel input_file1 and two subject channels input_file2 and input_file3 . The correlogram detects only input_file1 input_file2 input_file3 events within the time_window in this order. Any other sequence of events (1-3-2, 2-3-1, 2-1-3, 3-1-2 or 3-2-1) will be ignored. Npixels is the number of bins for the cross-correlograms and the number of pixels on the horizontal axis for the output surface maps. Sign_level is the level of significance (e.g. 0.05) . Only probabilities of triplets below the significance level  level will be listed  in the output_file.pmap file. All together six output files will be created: (1) the sequence map (output_file+.sqm) as x,y,z coordinates, (2) the X projection of the sequence map (output_file+.x) as x,z coordinates (3) the Y projection of the sequence map (output_file+.y) as y,z cooile+.y) as y,z coordinates, (4) the "\" diagonal projection and "/" diagonal projection of the sequence map as output_file+.diag1 and output_file+.diag2 respectively and (5) the cross-correlation map as the dot product of 1-2, 1-3 and 2-3 cross-correlograms (output_file+.xcm) as x,y,z coordinates. The cross-correlogram is normalized to the number of triplets represented by the sequence map. (4) In addition a Fisher's exact probability of the joint correlation will be computed and printed to the standard output as x,y,P. The P values denote the probability of the joint occurrence of 1-2-3 sequence on the basis of 1-2 and 1-3 cross-correlations. (5) A matrix of the 1-probability values created and saved as (output_file +.pmap).  (6) Last, the difference of the sequence map and the cross-correlation map is created as (output_file +.dif).
Note: The calculated probability of triplets is way too conservative because it multiplies the probability by the number of pixels (npixels*npixels/ 2) of the sequence map. Therefore, you may not get significant triplets even though the triplets in that position are quite improbable. But if you get significant triplets they must be extremely robust and frequent.
(See also 3seqmapstatwin).



3seqmapstatplugin <input_file1> <input_file2> <input_file3> <output_file> &e3> <output_file> <time_window> <npixels> <sign_level>
Same as 3seqmapstat but it generates an output that is the script itself for running 3seqtime. It is useful for scanning large number of input files for significant triplets and extract the individual time of occurrence of these triplets by 3seqtime. Since 3seqtime works on individual files it would be very hard to feed the parameters to the 3seqtime individually for ecah significant triplets. Instead, 3seqmapstatplugin generates the complete script which is executeable as a shell.
See also 3seqmapstat and 3seqtime.


3seqmapstatwin <input_file1> <input_file2> <input_file3> <output_file> <time_window> <alpha_window> <npixels> <sign_level>

Same as 3seqmapstat but instead of dividing the probability of triplets by (npixels/2) the user can define the size of the alpha_window (in points) within which the probability of triplet is estimated. If for example the user is testing the significance of a triplet within a quadrant of the total map area than alpha window = time_window/2. (See also 3seqmapstat).



3seqtime <input_file1> <input_file2> <input_file3> <output_file> <time_winutput_file> <time_window> <npixels> <dT1> <dT2>

The inverse of 3seqmapstat. It scans 3 input files by a specific sequence template. The input files are  defined as input_file1, input_file2 and input_file3 where input_file1 is the reference file. Time_window and npixel is for determining the jitter of sequence detection similar to the 3seqmapstat. The sequence template is defined by dT1 and dT2 where dT1 is the delay between the reference spike events and the spikes of the second file. Accordingly, dT2 is the delay between the reference spike event and the spikes of the third file. The time when a triplet of the specified pattern occurred is written to the output_file. This time is always the time of the reference spike events. You need 3seqtime if you have detected significant triplets by using 3seqmapstat and you would like to know the time when they occurred.
See also: 3seqmapstat and 3seqmapstatwin .



 3xcor <input_file1> <input_file2> <input_file3> <output_file> <time_window>

It generates xy coordinates for a 3-event cross-correlogram. If the events within the time window are a, b and c the x coordinate is td c the x coordinate is the Tb-Ta and the y coordinate is Tc-Ta. It detect only the earliest triplets within the time window. The time_window is defined by sampling points. The input_files are single column ASCII time data.



4seqmapstat <input_file1> <input_file2> <input_file3> <input_file4> <output_file> <time_window> <npixels> <sign_level>

Similar to 3seqmapstat  with the difference that it generates a 3-fold cross-correlogram between four series of events where the reference is given by input_file1. Only sequential correlations are considered. The output is similar to 3seqmapstat with the difference that in addition to the underlying cross-correlograms and maps it generates an output_file.3d file which contains the coordinates of the events relative to the reference as 3D coordinates. The time_window, npixels and sign_level is the same as for 3seqmapstat.
See also 3seqmapstat.



abeles <N> <input_file1> ... <input_fileN> <output_file> <cpx> <nrepeat> <ref_n> <time_win> <tolerance>

Sequence detection and extraction program. The output is similar to the output of function ptrn_search_gold. The algorithm is based on the method developed by M. Abeles (1988).  Essentially it realign the parallel spike trains with the delays detected in a template time window. Then it searime window. Then it searches the spike trains through for simultaneous spike events which represent the same delay configuration as the template. In the other words it iterativelly re-updates the peri-stimulus histogram to the reference spike train with an alignment of certain spike delay configuration. As a result it detects any recurring sequences of events included by N different files from input_file1 to input_fileN. Each file is a single column (ASCII) data vector which contains the time of occurrence of the spikes generated by a single neuron. Different neurons must be represented by different files. Output file is a report of detected sequences including the sampling time when a given sequence occurred. Cpx (int) is the complexity or length of the sequence (1= sequence of 2, 2=sequence of 3 spikes, etc.). Nrepeat is the number of repetition required to detect the sequence. Ref_n is the position of input_file in the list that serves as a reference (time=0) for the sequence detection (ref_n<=N). Time_win is the length of the time window within which the sequence of cpx number of spikes are detected. Tolerance is a time interval which limits the maximum time difference between identical sequences. The searching is exhaustive. A sequences is defined as a sequence of spikes from different neurons. No skipping sequential position is allowed here. Outputs: vectors..iii:tputs: vectors..iii: the vectori representation of the recurring sequences where iii is the decimal identification of the sequence cluster. Coordn.iii is the xy coordinate representation of the sequence clusters. Matrix.iii is the NxN transition matrix between each pair of cells. It describes how many times a given cell  firing was followed by other or the same cell firing. Scroll.iii contains the temporal occurrences of sequences within the sequence cluster iii. The template.iii describes the vector representation of a template iii which was found to be recurring. See also: ptrn_saearch_gold



add <input_file1> <input_file2> <output_file> <nofcol> <ctrl_string>

Generate the arithmetic sum of the two columns according to their matching indices.  The two columns must be presented  as input_file1 and input_file2. The total number of columns must be the same and indicated by nofcol. The ctrl_string tells the program which column is the index coulmn and which one is the coulmn of the addition. 1=index column, 2= subtraction column and 0=skip. (E.g. 01002 forces the program to add the fifth column of the second file from the fifth column of the first file if their indices at the second column match.) The output goes to the two columns of the output_file as index column first and sum column second.
Note: If indices are floote: If indices are float, subtactions will be carried out between all items sharing the same integer part of the indices and ignoring the digits following the decimal point.
See also simpleadd.



addcol <input_file> <output_file> <char_string>

Add an extra column char_string to the ascii input_file and write it to the ascii output_file. See also addcolplus.



addcolplus <input_file> <output_file> <nofcol> <char_string>

Add an extra column char_string to the ascii input_file and write it to the ascii output_file. If the input_file is a tab delimited, multiple column file  nofcol is the number of columns to keep from the input_file. See also addcol.



all3seqmapstat <input_file> <running_index_pos> <num_of_files> <output_file> <time_window> <npixels> <sign_level>

Same as 3seqmapstat but it computes the total number of significant pixel positions for all possible variations of triplets can be made of from the given number of files. The input_file is the generic filename where the n-th character in the filename is the running_index of all the files will be processedhe files will be processed.  The output file is the same as in 3seqmapstat and it is always overwritten by the new variations. Npixels and sign_level, see 3seqmapstat. The standard output is a four column table with the total number of variations the actual number of variation, the number of significant pixel positions detected and the number of events detected within the significant pixel positions.

See: 3seqmapstat.



all3seqmapdetail <input_file> <running_index_pos> <num_of_files> <output_file> <time_window> <npixels> <sign_level>

Same as all3seqmapstat except the terminal output is more detailed. It lists the result of significant triplet search for each triplet variations. The 5 column output list contains the line#, variation_string, nof_sign_pos, p_of_most_sign_pixel and average_num_of_rep. The nof_sign_pos is the number of significant pixel positions within the time window. The p_of_most_sign_pixel  is the probability of the most significant pixel assumuing that p < sign_level.  The average_num_of_rep is the average number of repetitions within the significant pixels. See: all3seqmapstat.



average  <input_file> <chpos1> <chpos2> <output_file> <> <output_file> <ncol> <control_string>

It calculate the average of the records where each record is presented as different files. The files are processed  in the order of the input_file name extensions. Chpos1 and chpos2 are the character positions in the file names at which the record indices are represented. Files are red by incrementing the file name indices. The output_file contains the average of the files determined by the indices of the chpos2 . Ncol is the number of columns in each input files and control_string determines the column on which the average is computed.
See also  avg_shp and avg_singlefile.



avg <input_file> <nofcol> <char_string>

It calculates the average and standasd deviation from a data colomn of the input_file. The default output is the screen but it can be directed to a file (... > file). The column must be specified by nofcol as a string of 0 and 1.
See also  avg_shp, avg_singlefile, average.



avg_shp <shape_file> <chpos> <chpos> <output_file>

It makes an average shape file based on the class of spikes arranged by the extensions. The shape_file must contain 24 data points. Chpos indicates the stepping character position for rows and columns. Shape_file is generated by thee is generated by the spikeloc... functions. 


avg_singlefile <input_file> <output_file> <nofcol> <char_string> <offset>

It calculates the average and standard deviation from an ascii input_file where data are represented as columns and rows. Nofcol determines the number of columns. The position of the "1" within the char_string defines the column on which the averaging will be carried out.  The offset is the number of data rows which represents one record. The average will represent the average of the total number of records. (E.g. if offset = 3 the function pools together the 1st., 4th, 7th, ...,etc. data as point1, the 2nd, 5th, 8th,.., etc. data as point2, and 3rd, 6th, 9th,...,etc. data as point3. Then calculates the average, the standard deviation and the number of samples for each points separately.) The output_file will contain the average of the records as ascii data from 1 to n where n=offset.

See also avg_shp, average.



chisq2x2

Perform chi-square test on a 2x2 contingency table. The input is the contingency table. It is given in a dialog mode. The output is the chi-square valu and df to the terminal. No parameters.
See also: chisquare.



chisquare <input_file> <numofcols> <numofrows>

Same as chisq2x2 except it calculaisq2x2 except it calculates chi-square value on a large contingency table. The input_file is the contingency table. The numofrows and numofcols limit
the table size on the input. The output is the chi-square value and the df to the terminal.
See also: chisq2x2.



chisquareobsexp <input_file> <ndata>

Calculate chi-square on a single line data red from input_file where the number of data is given as ndata. It computes the expected equal distribution and calculates the difference between the expected and observed cell distribution.
See also: chisq2x2 and chisquare.



chorder <input_file> <output_file> <nofch> <chorder_string>

It reorganizes the channels within the input_file and save it under the name of output_file. Nofch is the number of channels. Chorder_string is a numerical string where the numbers indicate the channel ID from the input channel and the order is the new channel assignment (e.g. 2314 means that the second channel of the input file will be the first, the third will be the second, the first will be the third and the forth will remain the forth). Channel ID = [1..n]. 



columnize <input_file> <output_file> <n_col>

It brakes a one column input ASCII data into adjacent columns in the sequential orcolumns in the sequential order of data in the array. N_col is the number of columns in the output file. If the input is {a1,a2,a3,a4,a5,a6,a7,a8} and n_col is 3 then the output will be {a1,b1,c1, a2,b2,c2, a3,b3}.



compr <input_file> <output_file> <n_ch> <compr_ratio>

Compression of binary files where the input_file is a binary file with 2-bytes words in the order of channel1 channel2,...,channel_n. The n_ch parameter is the number of channels. The compr_ratio parameter is the ratio of compression. E.g. compr_ratio = 10 means the function writes only every 10th data points from each channel to the output_file and skip the other 9 data points. As a result the binary output file will be 10 times compressed than the input file was.
See also comprt.



comprt <input_file> <output_file> <n_col> <compr_ratio>

Same as compr but the input and output file is ASCII. Obviously n_col is the number of columns in the text file.
See also compr.



cpxspike_decomp <input_file> <output_file> <nofcol> <ampl_col> <#spike> <isimin> <isimax>

Select complexspike components from a complexspike database defined by a multicol (ASCII) database. The first column must be a time of occurrence column. The ampl_col is the column of amplitudes. s the column of amplitudes. If there is no column of amplitudes to be considered ampl_col should be '0'. The isimin and isimax define the typical interspike intervals of a complex spike burst within not more than one spike occurs in sampling points.  The max number of spikes considered is defined by #spike.  The event times that satisfy the condition of complex spike will be written to the output_file.  The inverse set that does not satisfy the condition of complex spike will be written to the actual terminal and it can be piped to a file by '  ... > filename'. In addition to the output file, an index file is generated ("index"), that containes the indices if complex events (with '1'-s) and the inverse set (with '0'-s) in the order of occurrences. 



cutclu <input_file> <output_file> <nofcol> <control sequence> ...min, max,..,min,mx.

Can cut an area of the n-dimensional hyper-plane by giving the min and max of the selected dimension. Dimensions are columns (ASCII)and the control sequence is for selecting the columns which are corresponds with the dimension. 



cutdata <input_file> <output_file> <nofch> <from> <to>

Similar to truncate. (H.H.) See also truncate.



delhead <input_file> <output_file> <lines>
It deletes the first <lines> number of lines from the beginning of a text file.
Useful for deleting headers of text databases.

delsmallfile <input_file> <min_rows>
It deletes the file input_file if it conains n&l if it conains n<=min_rows number of data rows.
See also delzerofile.


delzerofile <input_file>
It deletes the file input_file if it conains 0 bytes.
See also delsmallfile.


density <input_file> <output_file> <max_interval> <bin_size>

Density computes a density histogram (x,y) of the time serie given by the input_file as a single column. The output is two columns where the first is the x the second is the y coordinate of the histogram. Max_interval is the maximum interval represented on the x axis. Bin size is the discrimination interval on the x axis. Y coordinate represents the number of events detected. See also: histogram



deriv <input_file1> <output_file> <nofcol> <ctrl_string>

Deriv computes the first derivative between successive data of an array of multi-colum input_file as d_i = a_i-a_i-1 The number of columns in the input file is defined by nofcol  and the column subjected to derive is defined by ctrl_string. In the ctrl_string the position of the first '1' in a binary string of '0'-s and '1'-s determines the column of derivation. The output will be identical to the input_file with the derivative is attached to it as n+1 column. The first value of the derivative column is alway derivative column is always 0.



difference <input_file1> <input_file2> <output_file> <nofcol> <ctrl_string>

Same as subtract.
See subtract.



disperse <input_file1> <output_file> <nofcol> <ctrl_string>

The function calculates the average distance between point pairs of a database consists of nofcol number of columns. Data in input_file must be ASCII. The columns used for extraction of the point coordinates are selected by ctrl_string (e.g. 1011 means using the first, third and forth column as three dimensions). The output, the absolute average dispersion, is appended to the output_file.
See alsodispers_norm.



disperse_norm <input_file1> <output_file> <nofcol> <ctrl_string>

Same as disperse except it computes a normalized disperion value. The normalization is done by rendering a homogeneous random distribution of the same number of points within the same volume as in the volume of data and divide the dispersion index of data by that of the random distribution.
See alsodispers.



divide <input_file1> <input_file2> <output_file> <nofcol> <ctrl_string>

It performs an arithmetic division between two columns presented by two separate files according to their matching indices.  The two columns must be presented  as input_file1 and input_file2. The total number of columns must be the same and indicated by nofcol. The ctrl_string tells the program which column is the index coulmn and which one is the coulmn of the divison. Usage: 1=index column, 2= division column and 0=skip. (E.g. 01002 forces the program to divide the fifth column of the first file by the fifth column of the second file if their indices at the second column match.) The output goes to the two columns of the output_file as index column first and result is the second.
Note: If indices are float, divisions will be carried out between all items sharing the same integer part of the indices and ignoring the digits following the decimal point.



eventdetect <input_file> <output_file> <nofch> <ch_of_detection> <plateau> <dt> <dy>

Detect peaks of any positive going events. The input_file is a binary recor_file is a binary recording file. The output_file is the timeserie and the amplitudes of the peaks detected. The plateau is the minimal length of the linear plateau to be accepted as peak. The calculated peak is the middle of the detected plateau. The dt and dy is the minimal first derivative of the positive-going phase of the event in terms of points and digital amplitude, respectively.



eventdetect_neg <input_file> <output_file> <nofch> <ch_of_detection> <plateau> <dt> <dy>
Same as eventdetect except it detect negative going events. The parameter dy must be a positive (int). See also eventdetect.


extract <input_filename1> <input_filename2> <output_file> <Numofcol> <cstring> <Nmin>

Extract data lines from a subject file (input_filename2) based on the range and number of items defined by the reference file (input_filename1 ). Numofcol is the number of columns in the reference file. The interpretation of the reference file is defined by the cstring. Cstring is a 3 character string {abc} where a="From" column, b="To" column and c=N column. For example cstring 234 forces to read the reference file as the From times are contained by the second column, the To times are contained by the third column and the number of items within an interval is stored in th interval is stored in the forth column. The Nmin is a threshold value. All the intervals which have larger number in the N column than N will be extracted. The excluded lines of the input file will be printed to the standard output and can be directed to a file by using "> file.  Function extract usually uses the output of the function fromto. See also fromto



filter: for filtering ascii files see threshold.


filterr1 <config_file_name>

Digital filter for binary data. Data format is12bit binary multiplexed by n channles (byte1-ch1,byte1-ch2,..byte1-chn, ...,byteN-chn).
Config file:
1st line: input_file_name (ch string)
2nd line: output_file_name (ch sting)
3rd line: num_of_channels (int)
4th line: sampling_rate [micro sec] (int)
5 th line: num_of_filtering_bands (int)
6 th line: low_threshold (float) high_threshold (float) mode (float) (it must be=1.0)
7 the: additional frequency band specifications if there is any (consistent with the 5th line).
(J.C.)



fftpower <input_file> <output_file> <sampling_time>

Calculate the power spectra of the single channel binary timeseries given as input_file using Fast Fourier Transformation algorithm. The power spectra is written to an ascii output_file as x,y coordinates,t_file as x,y coordinates, where the x represents Hz and y represents the power . Sampling_time is in microseconds. (H.H.) See also fftpowerbin .


fftpowerbin <input_file> <output_file> <sampling_time> <bin_size>

Same as fftpower but it bins the power spectra according to the bin_size given as Hz. (H.H.) See also fftpower.



fromto <input_filename> <output_file> <max_delay>

Extract time data from a single column text file <input_filename> where the series of time intervals defined by <max_delay>. It writes the output to the <output_file> in an ASCII format such as the "from" time column, a "to" time column and the "number of intervals" between them. It is used for detection of the beginning and ending of rhythmicity as represented by continuos intervals from a point process data.  See extract



gettm <list filename> <vector-file name> <nofcol in vect> <result-file name>

Create a time occurrence list from the item number list and the vector file.



grouping <xref filename> <input filename> <output filename>

Will select the shapefiles correspond to the time occurrence. The time occurrence listed in input file, the time filename xref listed in xref file. The shape-file will be created as the result group of selection. The #ch charup of selection. The #ch char will be inherited.



histogram <input_file> <output_file> <range_from> <range_to> <bin_size>

Histogram computes a density histogram (x,y) of the serie presented by the input_file as a single column data. The output_file is a two column ascii file where the first column is the x the second is the y coordinate of the histogram. The x coordinates represents the number of bins as integers starting with 0. The y coordinates are represented by floats. The range_from is the lower inclusive limit of the interval and range_to is the upper exclusive limit.  Bin size is the discrimination interval on the x axis. The total length of the x axis is subdivided to ( range_to-range_from)/bin_size bins. Y coordinate represents the number of events detected.   See also: histogram_fx , histogram_ix, histomap and density.



histogram_fx <input_file> <output_file> <range_from> <range_to> <bin_size>

Same as histogram and histogram_ix except x coordinates represent the real position of the bin relative the total range. See also: histogram, histogram_ix , histomap and density.



histogram_ix <input_file> <output_file> <range_from> <range_to> <bin_size>

Exactly same as histogram. See ally same as histogram. See also: histogram_fx, histogram, histomap and density .



histomap <input_file> <output_file> <nofcol> <ctrl_string> <range_from> <range_to> <bin_size>

It creates a 2D histogram from a dataset presented as X and Y coordinates in an at least 2 columns input_file data file.  The nofcol is the number of columns in the data file. The ctrl_string parameter is the control string which controls which are the X and Y coordinate data column in the composit datafile by 0-s and 1-s (eg. 0110 means the second and third column define the columns of operation). The range_from and range_to  determine the range of data incorporated by the X and Y axes of the histogram. The bin_size is the interval of binning the data together in the same cell. The  output_file is a range x range matrix of the histogram. An X,Y,Z representation of the histogram will allso be printed to the actual terminal output. (See also: histogram_ix, histogram_fx , histogram.)


isi <input_file> <output_file>
Extract inter-spike intervals from a single column spike time file input_file and write it
to a single column output_file.


kmeans2: maximal k-means clustering


kmeans4: half-split optimized k-means/b>: half-split optimized k-means clustering


kmeans5: pairvise k-means clustering


kmeansqm3 <input_file> <indexfile> <output_file> <nofcolumns> <nofclusters> <controlstring>

Perform a k-means clustering on an input_file comprises the orthogonal coordinates of the data points (ASCII) with corresponding pre-assigned indexes in the indexfile. The output file will generate the new cluster indexes. The nofclolumns is the number of columns in the input file. The nofclusters is the number of clusters to generate. Controlstring is for selecting the coordinate columns (dimensions of clustering) from the input file.

(Note: Error message "Incompatible cluster data lines" is a warning that the number of lines in the indexfile is different from the number of lines in the input file. However, the program substitute the incomplete clusterindexes with a dummy index or ignore the extra indexes. It does not affect the reliability of clustering.) 



kmeansqm5 <input_file> <indexfile> <output_file> <nofcolumns> <nofclusters> <controlstring>

Optimized and improved version of k-means clustering algorithm. 



match <input_file1> <input_file2> <output_file>

It extracts the matching items from two ASCII files. The two files presented as input_file1 and input_file2. The input files must be single column fils must be single column files. Those values of the first file which have a matching pair in the second file will be listed to the output_file in the order of detection. Since the sample items are derived from the first file, the more complete list should be given as the first file.  See also mismatch.



matchandcode <input_file1> <input_file2> <output_file>
It scans the input_file1 by the content of the input_file2 if any number in the input_file2 occurs in the input_file1 . The result is directed to the output_file which contains an index column as a first column and the copy of input_file1 as second column. Mismatch values in the input_file1 are indicated by 0-s and match values are indicated by 1-s in the index column.
See also: match and mismatch.

mean --> avg_singlefile


merge <input_file1> <input_file2> <output_file>

It merges two single column ASCII files together in a way to align the first data from the first file to the first data to the second file. The result is written to the ASCII output file. See merge2col.



merge2col <input_file1> <input_file2> <output_file>

Same as merge in order to avoid the conflict with the merge function of the Unix RCS utility. of the Unix RCS utility. The more complete file should be given as first file. See merge and mergefiles.



mergefiles <input_file1> <input_file2> <output_file> <nofcol1> <nofcol2>

Merging two files input_file1 and input_file2 together by using nofcol1 columnes from the first file and nofcol2 columns from the second file. The output_file will contain (nofcol1+nofcol2) columns.
See also merge and merge2col.



mismatch <input_file1> <input_file2> <output_file>

Same as match but it extract the values from input_file1 which HAVE NO matching pair in the input_file2.
See also match.



mkscatter1 <input_file> <output_file> <nofch> <bestch> <asynchr> <nofcoocc> <minampldif> <zero substit> <tmax>

Localize the source point of amplitude distribution. Asynchr is the maximal asynchronicity for the cooccurrence, minampldif is the minimal amplitude difference required for calculate locus. If zero substit = 1 substitute 0 with 2048 as a baseline. Tmax is the number of points to analyze. 



mkscatter2 <input_file> <output_file> <nofch> <bestch> <asynchr> <nofcoocc> <minampldif> <zero substit> <tmax>

Same as mkscatter1 except it provides a Gaussian reconstructiodes a Gaussian reconstruction to fill missing values. 



mktserie <filename> <chpos> <chpos> <amplification> <output_file> <compressed channel> <compression ratio> 

mktserie2 <filename> <chpos> <chpos> <min> <output_file> <compressed channel> <compression ratio>

Create a spike [channel][time] ".dat" file readable as a regular 12 bit data file. Includes only the spikes which amplitude exceeds the min value. 



mkvectors <input_file> <output_file> <nofch> <bestch> <timewindow> <cooccur>

Create a [time,A1,A2,A3,..,An] vector-file from shape files int maxx, maxy; , where A1..An are the values that created by prep... program (mostly amplitudes). The n is the number of channels. Bestch is the channel, where the signal/noise ratio is the highest, so it serves as a reference for checking cooccurrences. Timewindow is a window-size in points to detect cooccurrence. The cooccur is the minimal number of cooccurrences needed for selection along the channels. 



mkmap <input_file> <output_file> <nofch> <bestch> <timewindow> <cooccur>

Create a [time1,ch1,Ach1,time2,...,timen, chn, Achn] vector file from shape files, where Ach1 is the value created by prep... program (mostly the amplitude). The n is the number of channels. Bestch is the channel, where the signal/noise ratiwhere the signal/noise ratio is the highest serves as a reference for checking cooccurrences. Timewindow is a window-size in points to detect cooccurrence. The cooccur is the minimal number of cooccurrences needed for selection along the channels. Used for creating contour plots. 



 negaa

Scope and spike sorting system. Designed for spike detection and interactive cluster cutting.  (Negaa howto ...)   (J.C.)



optigrp <xref filename> <input filename> <output filename>

Same as grouping, but processing only incremental time occurrence list. It is much faster than grouping as a result of cutting the searching procedure after finding the first timelist-xref match. 



peakdetect <input_file> <output_file> <nofch> <ch_of_detection> <plateou>

Detect the positive peaks of any wave form. The input_file is a binary recording file. The output_file is the timeserie of detected peaks and the amplitudes of the peaks detected (ASCII). The plateau is the minimal length of the linear plateau to be accepted as peak. Plateou=0 means detection of single positive peaks with no plateou. The calculated peak is the middle of the detected plateau. 



plot_cpxspikeloc.ksh


preclu_cnf

preclu_cnf <Input_file> <Output_file> <Ncol> <Nclu> <Control string>

It perform a preclustering on a database based on given cutting areas, which have been defined by clu.cnf files as follows: clu1minx clu1maxx clu2minx clu2maxx ... clu1miny clu1maxy clu2miny clu2maxy 



prepbmin <filename> <cluid_pos> <chid_pos> <num of channel> <range>

Create [time, spike parameter] data file for 'mkmap' or 'mkvectors'. Filename is the shape file group. Cluid_pos is the position of cluster indicator character in the input filename. Chid_pos is the position of the channel indicator. Range is the range of acceptance, where the lower limit is the 2048-halfrange and higher limit is 2048+halfrange.



ptrn_search_gold <N> <input_file1> ... <input_fileN> <output_file> <cpx> <nrepeat> <ref_n> <time_win> <tolerance>
Sequence detection and extraction program. It detect any recurring sequences of events included by N different files from input_file1 to input fileN. Each file is a single column (ASCII) data vector which contains the time of occurrence of the spikes generated by a single neuron. Different neurons must be represented by different files. Output file is a report of detected sequences including the sampling time when a given sequence occurred. Cpx (int) is the complexity or length of the sequence (1= sequence osequence (1= sequence of 2, 2=sequence of 3 spikes, etc.) . Nrepeat is the number of repetition required to detect the sequence. Ref_n is the position of input_file in the list that serves as a reference (time=0) for the sequence detection (ref_n<=N). Time_win is the length of the time window within which the sequence of cpx number of spikes are detected. Tolerance is a time interval which limits the maximum time difference between identical sequences. The searching is exhaustive. A sequences is defined as a sequence of spikes from different neurons. No skipping sequential position is allowed here. Outputs: vectors..iii: the vectori representation of the recurring sequences where iii is the decimal identification of the sequence cluster. Coordn.iii is the xy coordinate representation of the sequence clusters. Matrix.iii is the NxN transition matrix between each pair of cells. It describes how many times a given cell  firing was followed by other or the same cell firing. Scroll.iii contains the temporal occurrences of sequences within the sequence cluster iii. The template.iii describes the vector representation of a template iii which was found to be recurring.


register <input_filename> <output_file> <max_delay>

It assigns register indices to a time serie given by a single column input_file based on the time intervals it contains. It numbers from 0 to n the time data within thee time data within the intervals of max_delay . If an interval is larger than max_delay the counting resets and start with 0 again. The two column output comprises the newly generated indices as first column and the original time serie as the second column. The function output is mostly used by 1xcorreg.
See also 1xcorreg.



rnd_filter <Nof_files> <input_file1> ... <input_fileN> <input_fileN> <reduction>

Filtering multiple ASCII files by deletion of randomly selected items from the list. The input is presented as input_file1, input_file2 , .., inputfileN. The number of files is indicated by Nof_files. The reduction parameter determines the ratio of the proportion of data which will be kept. E.g. reduction=0.4 will eliminate 60% of the data and 40% will be written to the output file. As a result Nof_files number of output files will be created and named as input_file1.flt input_file2.flt,..., etc.  The choice of items for deletion based on pseudo-random numbers.



rnd_sampler <Nof_files> <input_file1> ... <input_fileN> <reduction>

Same as rnd_filter.



rippledetect <input_file> <output_file> <min_time> <max_time> <ampl_middle_peak>

Detect ripple activity from an x,y (ASCII) file where x is the timeCII) file where x is the time and y is the peaks detected by the 'peakdetect' function. Min_time is the minimum interval between the positive peaks of the ripple. Max_time is the maximal positive peak-to-peak interval. Ampl_middle_peak is the minimum ABSOLUTE amplitude value of the middle peak of the ripple.  The output_file (ASCII)  is the time of the middle (largest) peak in the ripple.



scope.m

A Matlab function for parallel displaying and scrolling field data (continuous binary) and spike data (point process). The field data is an n channel binary file. The spike data containes different spike trains as different files. Spikes are defined by the time of occurrence (x) and the cell ID (y).


scp.ksh <input_file> <nofch> <compression> <starting_point>

Scope program (unix shell script) for visualization of multi channel recording  It uses the program showprec (see below) which converts the binary data to x,y coordinate file (ASCII) and plot them by using xgraph. You need both, showprec and xgraph (or gnuplot) for make it work.  Using xgraph the scp.ksh shell scrolls the recording frame-by-frame reading the plot files created by showprec. Input_file is a binary file using 2 bytes word structure. 1st channel 1st point, 2nd channel 1st point, 3rd channel 1st point, ...etc. Nofc it, ...etc. Nofc is the number of channels of your recording. Compression is the compression ratio for the display (int): 1=shows every point, ... 20= show every 20th points only. Starting_point is the  first point of recording from where the scope start. It makes you able to position the scope anywhere in the file. Xgraph provide all sorts of other utilities such as print screen, zoom-in, and 1st derivative.



scpseq.ksh <seq_file> <seq_length>

A scope program (unix shell script) for visualization of a parallel spike train with the superposition of the sequences. The sequences are described by the seq_file. The seq_file must contain the absolute time (in points) of the sequence components (spikes). This is usually the "scroll.nnn" output of the sequence search. The seq_length must be 2, 3, ...n depending upon how many spikes constitutes for a sequence. The shell uses xgraph frame-by-frame to scroll over the entire spike train. The length of the frame and other plotting parameters can be and suggested to be modified according to your preference.

(Note: the shell contains the name of the spike train files. The shell script must be edited accordingly). It uses the functions of showspk andshowseq or showseq_uni.



select: selecting data by sorting filtering and iny sorting filtering and index based extraction see:
sorting, threshold and extract.


seq_spec <N> <input_file1> ... <input_fileN> <output_file> <cpx> <nrepeat> <ref_n> <time_win> <tolerance> <seq_string>

Same as sequence but it searches for a specific sequence. The seq_string specify the sequence to search for. The input_file1 considered to be 0 in the sequence definition (e.g.: 302 means searching through input_file4, input_file1, input_file3 in this particular order). Warning: the range of ref_n is {1,..,N} but the range of seq_n is {0,..,N-1}. See also: sequence.



seq_spec2 <N> <input_file1> ... <input_fileN> <output_file> <cpx> <nrepeat> <ref_n> <time_win> <tolerance> <seq1> ... <seqN>

Same as sequence and seq_spec (even more so) but it searches for a specific sequence. It differs from seq_spec only in the sequence definition. The seq_1,..., seq_N specify the sequence to search for. Sequence numbers must be separated by SPACE characters. The input_file1 considered to be 0 in the sequence definition (e.g.: 3 0 2 means searching through input_file4, input_file1, input_file3 in le1, input_file3 in this particular order). Warning: the range of ref_n is {1,..,N} but the range of seq_n is {0,..,N-1}. See also: sequence.



seq_spec_all <input_file.000> <running_index> <output_file> <cpx> <nrepeat> <time_win> <tolerance>

Same as seq_spec and seq_spec2 but it searches for all possible triplet variations individually and lists them at the output one-by-one. It tests the repetition of each triplets through the entire database. See also: seq_spec and seq_spec2.



seq_spec_tripl <input_file.000> <running_index> <output_file> <cpx> <nrepeat> <time_win> <tolerance> <seq_string>

Same as seq_spec_all all but it detects individual triplets as defined by the seq_stringSeq_string is an alpha numeric string where each character refers to the character of the filename defined by the running index.  Filenames must be ordered from 0 to Z through z {0,..,9,a,..,z,A,..,Z}. For example a seq_string 3a0 means to detect the input_file.003, input_file.00a, input_file.000 sequence in this particular order. For the meaning of other parameters see sequence. See also: seq_spec_all.



sequence <N> <input_file1> ... <input_fileN> <output_file> <cpx> <nrep_file> <cpx> <nrepeat> <ref_n> <time_win> <tolerance>

Sequence detection and extraction program. It detects and extracts sequences of point processes where individual  point processes (usually spike trains) are presented as separate files (input_file1, input_file2, ...etc.). A sequences constitutes for points (1) derived from different point processes, (2) situated the closest together in time and (3) terminates within a time window (time_win). The output is similar to the output of function ptrn_search_gold . The algorithm is based on the method developed by M. Abeles (1988).  Essentially it realign the parallel spike trains with the delays detected from a template time window. Then it searches the spike trains through for simultaneous spike events which represent the same delay configuration as the template. In the other words it iterativelly re-updates the peri-stimulus histogram to the reference spike train with an alignment of certain spike delay configuration. As a result it detects any recurring sequences of events included by N different files from input_file1 to input_fileN . Each file is a single column (ASCII) data vector which contains the time of occurrence of the spikes generated by a single neuron. Different neurons must be represented by different files. Output file is a report of detected sequences including the sampling time when a given sequence occurred. Cpx (int) is the complexity or length of the sequence (1= sequence of 2, 2=sequence of 3 spikes, etc.). Nrepeat is the number of repetition required to detect the sequence. Ref_n is the position of input_file in the list that serves as a reference (time=0) for the sequence detection (ref_n<=N). Time_win is the length of the time window within which the sequence of cpx number of spikes are detected. Tolerance is a time interval which limits the maximum time difference between identical sequences. The searching is exhaustive. A sequences is defined as a sequence of spikes from different neurons. No skipping sequential position is allowed here. Outputs: vectors..iii: the vectori representation of the recurring sequences where iii is the decimal identification of the sequence cluster. Coordn.iii is the xy coordinate representation of the sequence clusters. Matrix.iii is the NxN transition matrix between each pair of cells. It describes how many times a given cell  firing was followed by other or the same cell firing. Scroll.iii contains the temporal occurrences of sequences within the sequence cluster iii. The template.iii describes the vector representation of a template iii which was found to be recurring. See also: ptrn_saearch_gold and sequence_large



seq_large <N> <config_file> <output_file> <cpx> <nrfile> <cpx> <nrepeat> <ref_n> <time_win> <tolerance>

Same as sequence but config file defines the file names one by one in different lines.

See also: sequence



seq_wrange <N> <input_file1> ... <input_fileN> <output_file> <cpx> <nrepeat> <ref_n> <time_win> <tolerance>
Same as sequence but it tests sequence repetitions independent from any threshold as they occur in the input_files. The detected repetitions are listed on the actual terminal output one by one as separated lines.
See also: sequence.


showprec <input_file> <nofch> <compression> <starting_point> <nofpoints><separator>

Conversion program for converting one frame of a binary recording file (1st channel 1st point, 2nd channel 1st point, 3rd channel 1st point,...etc.) defined as the Input_file to x,y coordinate ASCII file (record.00A-record.00Z). The frame is determined by the starting_point, compression and nofpoints. The starting_point is the first point of the recording to display, compression is the compression ratio for the display (int): 1=shows every point, ... 20= show every 20th points only. Nofpoints is the number of points to display as a frame. Separator is the space between the channels to display.
(See also abeles, ptrn also abeles, ptrn_search_gold , showseq and showspk).



showseq <input_file1> <starting_point> <nof_points> <seq_length>

Conversion program for conversion of spike sequence data to an XY coordinate frame for visualization (xgraph or gnuplot, etc.). The Input_file is an ASCII file of one sequence class including the time of recurring sequences (using scroll.00n data as an output of abeles and ptrn_search_gold ). The single output file "sequenc.001" contains XY coordinates of the raster of the sequence within a temporal frame defined by the starting_point and nof_points. The starting_point is the first point of the recording to display. Nofpoints is the number of points to display as a frame. The seq_length is an offset value for insertion of an empty line after the data points of a sequence. This feature makes the visualization software able to plot the sequence as interconnected points.
(See also abeles, ptrn_search_gold and showspk).



showseq_uni <input_file1> <starting_point> <nof_points> <seq_length>

Same as showseq except it does not put CR between the data arrays of different sequences. As a result when you plot it by using xgraph it plots the sequences in same color and symbol. See also: showseq .
See also: showseq.



showspk <nofch> <input_file1> ... <input_fileN> <starting_point> <nof_points>

Conversion program for conversion of spike time data to an XY coordinate frame for visualization (xgraph or gnuplot, etc.). The Input_file -sare ASCII files. The single output file "spiketr.001" contains XY coordinates of the raster within a temporal frame defined by the starting_point and nof_points. The starting_point is the first point of the recording to display. Nofpoints is the number of points to display as a frame.
(See also abeles, ptrn_search_gold and showseq).



shswphd <NofCH> <Input_file_1> <Input_file_2> ...<Input_file_NofCH> <refCH>

Shuffling spikes within the spike trains by keeping their delay constant relative to a periodic point process. NofCH is the number of files presented. Input files are listed Input_file_1 ... Input_file_NofCH. The file which contains the periodic point process is indicated by the refCH. It is used for elimination of sequential relatedness of the simultaneous spike trains by preserving the periodic modulation of the spike times within the spike trains. See shuffling_ch, shuffling_chcpx and shuffling_isi.
and shuffling_isi.



shuffling_ch <NofCH> <Input_file_1> <Input_file_2> ...<Input_file_NofCH>

Randomly exchange the spike times between the spike trains defined as Input_file_1 .. Input_file_NofCH where NofCH is the number of spike train files. See shswphd, shuffling_chcpx and shuffling_isi.



shuffling_chcpx <NofCH> <Input_file_1> <Input_file_2> ...<Input_file_NofCH> <IV>

Same as shuffling_ch but exchange the spikes co-occurring within IV time interval together as one unit. It is useful to treat complex spike events as units otherwise shuffling will generate many new sequences due to the explosion of complex spikes to different spike trains. See shuffling_ch, shswphd and shuffling_isi.



shuffling_chcpx_balanced <NofCH> <Input_file_1> <Input_file_2> ...<Input_file_NofCH> <IV>

Same as shuffling_chcpx but it keeps the firing rate constant within each spike train. When shuffling, it balances the number of spikes between the two randomly selected channels by exchanging them. As a result the number of spikes imported from the othkes imported from the other spike train is equal to the number of spikes exported. With the IV parameter you determine the interval of spikes of a complex spike burst. Within this interval the spikes will be kept together when moving. Since the two constraints (balancing the firing rate and moving complex spike burst together) are antagonistic the result spike trains has a firing rate slightly different from the original spike trains. However this difference is insignificant.



shuffling_isi <NofCH> <Input_file_1> <Input_file_2> ...<Input_file_NofCH>

Shuffling inter-spike-interval data taken from spike-time data files. NofCH is the number of data files (mostly the spiking times of separated neurons) and Input_file_n is the time series data file. See shuffling_ch, shuffling_chcpx and shswphd.



simpleadd <input_file1> <input_file2> <output_file>

Generate the arithmetic sum of the two single columns presented as i nput_file1,input_file2. The sum goes to the output_file in the order of the input items.
See also add.



simplesubtr <input_file1> <input_file2> <output_file>

Generate the arithmetic difference between two single columns as output_file = input_file1- input_file2. The differeut_file2. The difference in the output_file will be in the order of the input items.
See also subtract.



slidingsweeps <nofiles> <input_file1> <input_file2> ... <output_file> <nofoccurr> <nofrepeat> <refunit> <timewindow> <tolerance>

It scans files to find repetitive temporal patterns. The nofiles is the number of input files. Input_files are the different clusters. Each clusters include the time of occurrences. Output_file will be the x and y coordinates of the repeated sequences, where x is the relative time and y is the unit ID (1..n). Nofoccurr is the number of cooccurring events within a template pattern. Nofrepeat is the number of repetition required to select the pattern. Refunit is the ID of the unit serves as a reference. Timewindow is the windowsize to scan the data with in datapoints. Tolerance is the accepted variation of the time pattern in data points. 



smooth <input_file> <output_file> <nofch> <points to average>

Processing moving-average on all the channels of bin-data file. 



sorting <Input_file> <NofCH> <NofCLU>

Sorts the input_file based on the first column indices. NofCH is the number of channels and NofCLU is the number of files to be sorted.  The assorted output will go to the files clustr.nnn where 'nnn' is a three digit alp 'nnn' is a three digit alpha-numerical value {A,B,..,9,0} of the clusters created.
See also: sortingplus



sortingplus <Input_file> <NofCH> <CluCH> <NofCLU>

Similar to sorting it sorts the input_file based on the column indices. In contrast to sorting the cluster ID does not have to be the first channel. It is determined by the parameter CluCH.  Also the output file name will be the input_file+.XXX where XXX is the cluster ID with alphabetic notation (A-Z).  NofCH is the number of channels and NofCLU is the number of files to be sorted.
See also: sorting



spikedetect <input_file> <output_file> <nofch> <derivative> <measured channel>

Detect spikes in 12 bit binary input files (.dat) and store the shapes in output_file. The event must be an onset at least as large as the derivative is, a peak after that AND an as large offset as the derivative is. 



spikedetect16 <input_file> <output_file> <nofch> <signal_channel> <derivative> <min_peak-to-peak><min_width><max_width>
Similar to spikedetect but it works on 16 bit binary data. Detect spikes in binary input file on the specified channel  signal_channel based on a set of causal conditions: (1) rising phase must excee the derivative, (2) must have a peak within the maximum time window max_width , (3) must followed by a negative slope at least half of the  derivative of the rising phase, (4) it must terminate with a negative peak within max_width. Results are the spike times stored the output_file . Use spikeextract to for extracting the spike shapes from the original file. Note: You must use a filtered trace as input_file to minimize artifacts.
See also: spikeextract



spikeextract <bin_input_file> <ascii_input_file> <nofch> <points_before><points_after>
Extract spikes from a binary file bin_input_file at intervals defined by a time list of spikes in  ascii_input_file. Parameter nofch is the number of channels in the binary file. The interwal around the time points is specified by points_before and poins_after .
See also: spikedetect16.



spikedet2 <input_file> <output_file> <nofch> <derivative> <measured channel> <chorder>

Same as spikedetect except it works parallel way on each channel simultaneously. The program selects events which are cooccurring with the spike detected on the reference channel. Chorder is the physical order of channels defined by a string (e.g. '2314' means logical chan '2314' means logical channel2 is the physical1). 



spikeloc_qspline <input_file> <spikeshapefile.0aa> <numofch> <1stordderiv> > [output_file]

Output_file is a printed multicolomn database: TOO, avg_amp, loc, spl, amp1, amp2,..,ampn.Spikerecognition on each of the channels simultaneously. It writes the selected spikes in the spike shape files from ".0aa" to ".0zz". Moreover compute the estimated location of the spikes on the basis of spike amplitude distribution. The output file contains: TOO(time of occurrence) avg_amp, loc, peak_of_interpolation(cubic spline) and the PTP(peak to peak) amplitudes in the order of channels. The spike reconstruction based on cubic-spline algorithm. 



spikeloc_qs3: The same as the spikeloc_qspline, but it also create the cubic-spline interpolated distribution of the average spike selected. 

spikeloc <input_file> <spikeshapefile.0aa> <numofch> <1stordderiv> > [output_file]

Same as spikeloc_qspline except it requires a config file (name "config") which defines the peak identification window sizes in points. The config file has to contain 3 pairs of float data like: min1 max1 min2 max2 min3 max3, where min1 is the first point and max1 is the last point of the peak-to-peak time window within the 240 points of sample. Min2 and max2 is the range for negative peak identification win peak identification window. Min2 and max2 is the range for peak-to-peak latency window. 



spikeshape <Input_file> <Output_file> <nofsample>

Convert one group of shape file into an xy coordinate file which is ready to draw by Gnuplot, Xprism, Xgraph...etc. The <nofsample> is the number of samples to be superimposed.



spikeloc_fft <input_file> <spikeshapefile.0aa> <numofch> <1stordderiv> > [output_file]

Same as spikeloc except it reconstructs wave shape based on the Fourier components of the sample. It also expands the sample by 10.



splineip <Input_file> <Output_file> <NofCH> <ip_factor>
Cubic spline interpolation on each data column of a multi column data file Input_file which has NofCH columns. The  ip_factor is the number of points interpolated between two points of the data including the last data point. For example, ip_factor=10 will insert 9 data points between each  intervals of the original data. Output_file is the interpolated multiple column data.


splitbin <Input_file> <Output_file> <NofCH> <Cntrl_string>

Split channels from a *.dat (binary) file. Nofch is the number of channels of the input file. Controll string is a string of 0s and 1s where 0 indicate the channel to drop and 1 is the channel to keep. 

 

splt <Input_file> <Output_file> <NofCol> <Cntrl_string>

Split columnes from a multi-columne ASCII file. NofCol is the number of columnes of the input file. Controll string is a string of 0s and 1s where 0 indicate the column to drop and 1 is the channel to keep. 



 ssp <field_filename> <spike_filename> <cluster_filename> <sampling_rate>

(The complete ssp doc ...)

Multi functional scope for displaying field recording (as time series in binary format), spike data (as point processes) defined as time from the spike_filename and cluster ID-s from the cluster_filename and behavioral (a/d input in binary format) recording. Sampling_rate is the sampling rate in microseconds for the spike data. Functions: [t] display detected negative theta peaks; [T] global theta detection; [left] and [right] arrows scroll backward and forward; [<] and [>] compress and expand time scale; [s] print basic statistics of the individual spike trains; [f] display FFT power spectra from 0Hz to 50Hz; [F] print this power spectra; [v] display power spectra b/w 20Hz and 300 Hz; [V] print this high frequency power spectra. [P] print display; [p] preview print; [1,2,..,9] scrolling speed where 1 is 1 pixel/keystroke shift and 9 is a complete frame 9 is a complete frame shift. [z] Other options: [o] print the detected theta peaks measured by the field time units to the screen. [O] print the detected theta peaks measured by the spike time units to the screen. [!] Global theta phase analysis. [@] Theta phase analysis for wheel running.  (H.H.)



standard deviation, standard error, SD, SE --> see avg_singlefile


subtract <input_file1> <input_file2> <output_file> <nofcol> <ctrl_string>

Generate the arithmetic difference of the two columns according to their matching indices.  The two columns must be presented  as input_file1 and input_file2. The total number of columns must be the same and indicated by nofcol. The ctrl_string tells the program which column is the index coulmn and which one is the coulmn of the subtraction. 1=index column, 2= subtraction column and 0=skip. (E.g. 01002 forces the program to subtract the fifth column of the second file from the fifth column of the first file if their indices at the second column match.) The output goes to the two columns of the output_file as index column first and difference column second.
Note: If indices are float, subtactions will be carried out between all items sharing the same integer part of the indices and ignoring the digits following the decimal point.
See also simplesubtr

simplesubtr.



tapesave

It archives all files from the current directory by appending them as a single 'tar' file to the end of the files have already been archived on the tape.



threshold <input_file> <output_file> <nofch> <ch_sel> <low_threshold> <high_threshold>

Band pass data filter for ASCII files. It filters data lines out from the database which exceed the range defined by low_threshold and high_threshold. The real range is low_threshold <= data < high threshold. Nofch is the number of columns in the input file. Ch_sel is the selected column to which the threshold is defined. The structure of the output file will be the same as the input file's.



transform <input_file> <output_file> <nofcol> <ch_sel> <mult> <add>

Makes linear transformation on each numeric value of a column in the input_file and save it as output_file. Nofcol is the number of delimited columns in the input file. Ch_sel is a char string of 0-s and 1 where the position of '1' within the sequence of 0-s indicates the operation column. E.g. '001' will force the function to be caried out on the third column of the input file.  Mult is the multiplication factor and add is the additive factor.



truncate <input_file> <output_file> <ut_file> <output_file> <nofch> <from> <to>

It extract an interval from the binary input_file and write it to the binary output_file. Nofch is the number of channels of the input and output files. From is the point where the interval of extraction starts. To is the end of the interval in sampling point. See also cutdata.



xref <filename> <chpos> <chpos> <num of channel>

Will create *.xr# files, where # is the ch_num. 



xxcor <subject_file> <char_pos> <ref_file> <NOF_columns> <timewindow>

It generates cross/autocorrelograms between each of the pairs of data set. The output files are "outxcr.00x" where x is the running character of the subject file. The output is a 40 bin size ASCII histogram data. Data sets are ASCII files and contain time of occurrence data. The subject_file is the file set which is selected by the char_pos running character. These are the subjects of the cross-correlation relative to the ref_file data. "NOF_columns" are the number of columns in the file. The first columns must be the time of occurrence column. Timewindow is the timeframe of the cross-correlogram. See also:   xxcor_phase.



xxcor_phase <subject_file> <char_pos> <ref_file> <NOF_columns> <timewindow>

Same as xxcor except the b>Same as xxcor except the bins are phases relative to the interval between two successive events of the reference file.  The cross-corelogram spans 360 degree interval relative to the reference events. See also: xxcor.



xxjp <Subject_file> <Char_pos> <Ref_file> <NOF_columns> <Timewindow>

Generates the joint-perievent-time histogram. Parameters are similar to those in the xxcor. The joint-perievent-timehistogram represents a 2D histogram as a joint correlogram between two spike trains. The reference (0-point) is the time of occurrences of the reference_file. Thus, one dimension is the time of spikes in the ref file relative to the neuron itself and the other dimension is the time of spikes from the subject file relative to the reference file. It shows the 2nd order time structures. The outputs are "outxjp.00x" files where x is the running character of the subject file. 



xcormatr <ref> <label>

Kshell which creates either a cross-correlation terminal and a set of ".eps" encapsulated postscript files. The ref is the letter or number index of the reference time-data file. This index refers to the index character in the filename which contains time data. Label is an identifier which append a string to each of the .eps file created. The ref index is also appended to the output filenames.