2013-03-24
Brendon
BWRat19
ANATOMY: ACC w Buzsaki-64sp, Amyg w Buzaki-64L
ACC shank 1 is posterior, 6 is anterior
Amyg shank 1 is lateral, 8 is medial
CHANNELS
Ch 1-64: ACC
Ch 65-128: Amyg
Ch 225(128): home cage motion pad
Ch 226(129): shock cage motion pad
Ch 229-231(130-2): Accelerometer
Ch 251(133): shock trigger
Ch 252(134): sound envelope
16
135
20000
20
1000
0
1250
39.0625
whl
1250
lfp
1
8
0
9
3
6
2
7
5
4
11
56
10
52
13
50
12
48
15
14
58
57
60
49
63
51
61
53
59
55
45
43
41
47
62
36
54
34
40
33
32
35
39
37
38
21
42
20
44
19
46
18
16
17
22
31
23
30
24
29
25
28
26
27
65
70
64
71
67
68
66
69
73
78
72
79
75
76
74
77
112
125
114
127
116
124
120
122
123
118
119
126
117
121
115
113
104
101
96
105
103
107
111
109
99
110
97
108
98
106
100
102
80
87
81
86
82
85
83
84
88
95
89
94
90
93
91
92
128
129
130
131
132
133
134
1
8
0
9
3
6
2
7
5
4
32
16
3
11
56
10
52
13
50
12
48
15
14
32
16
3
58
57
60
49
63
51
61
53
59
55
32
16
3
45
43
41
47
62
36
54
34
40
33
32
35
39
37
32
16
3
38
21
42
20
44
19
46
18
16
17
32
16
3
22
31
23
30
24
29
25
28
26
27
32
16
3
65
70
64
71
67
68
66
69
32
16
3
73
78
72
79
75
76
74
77
32
16
3
112
125
114
127
116
124
120
122
32
16
3
123
118
119
126
117
121
115
113
32
16
3
104
101
96
105
103
107
111
109
32
16
3
99
110
97
108
98
106
100
102
32
16
3
80
87
81
86
82
85
83
84
32
16
3
88
95
89
94
90
93
91
92
32
16
3
128
129
130
131
132
133
134
32
16
3
1
2
CTX
1
3
CTX
1
4
CTX
1
5
CTX
1
6
CTX
1
7
CTX
1
8
CTX
1
9
CTX
1
10
CTX
1
11
CTX
1
12
CTX
1
13
CTX
1
14
CTX
1
15
CTX
1
16
CTX
--------------
--------------
--------------
--------------
1
17
CTX
--
--
--
--
2
2
CTX
2
3
CTX
2
4
CTX
2
5
CTX
2
6
CTX
2
7
CTX
2
8
CTX
2
9
CTX
2
10
CTX
2
11
CTX
2
12
CTX
2
13
CTX
------
------
------
------
2
14
CTX
--
--
--
--
3
2
CTX
3
3
CTX
3
4
CTX
3
5
CTX
3
6
CTX
3
7
CTX
3
8
CTX
3
9
CTX
3
10
CTX
3
11
CTX
3
12
CTX
3
13
CTX
----
----
----
----
3
14
CTX
--------
--------
--------
--------
4
2
CTX
4
3
CTX
4
4
CTX
4
5
CTX
4
6
CTX
--
--
--
--
4
7
CTX
----
----
----
----
5
2
CTX
5
3
CTX
5
4
CTX
5
5
CTX
5
6
CTX
5
7
CTX
----------
----------
----------
----------
5
8
CTX
--------
--------
--------
--------
5
9
CTX
--
--
--
--
6
2
CTX
6
3
CTX
6
4
CTX
6
5
CTX
6
6
CTX
6
7
CTX
6
8
CTX
6
9
CTX
6
10
CTX
6
11
CTX
6
12
CTX
6
13
CTX
6
14
CTX
----------------------
----------------------
----------------------
----------------------
6
15
CTX
----
----
----
----
6
16
CTX
--
--
--
--
6
17
CTX
--
--
--
--
7
2
Amy
7
3
Amy
7
4
Amy
7
5
Amy
--
--
--
--
14
2
Amy
0.200000
32
16
0
#ff0000
#ff0000
#ff0000
0
0
1
#ff0000
#ff0000
#ff0000
1
0
2
#ff0000
#ff0000
#ff0000
2
0
3
#ff0000
#ff0000
#ff0000
3
0
4
#ff0000
#ff0000
#ff0000
4
0
5
#ff0000
#ff0000
#ff0000
5
0
6
#ff0000
#ff0000
#ff0000
6
0
7
#ff0000
#ff0000
#ff0000
7
0
8
#ff0000
#ff0000
#ff0000
8
0
9
#ff0000
#ff0000
#ff0000
9
0
10
#00ffee
#00ffee
#00ffee
10
0
11
#00ffee
#00ffee
#00ffee
11
0
12
#00ffee
#00ffee
#00ffee
12
0
13
#00ffee
#00ffee
#00ffee
13
0
14
#00ffee
#00ffee
#00ffee
14
0
15
#00ffee
#00ffee
#00ffee
15
0
16
#ff8c00
#ff8c00
#ff8c00
16
0
17
#ff8c00
#ff8c00
#ff8c00
17
0
18
#ff8c00
#ff8c00
#ff8c00
18
0
19
#ff8c00
#ff8c00
#ff8c00
19
0
20
#ff8c00
#ff8c00
#ff8c00
20
0
21
#ff8c00
#ff8c00
#ff8c00
21
0
22
#4400ff
#4400ff
#4400ff
22
0
23
#4400ff
#4400ff
#4400ff
23
0
24
#4400ff
#4400ff
#4400ff
24
0
25
#4400ff
#4400ff
#4400ff
25
0
26
#4400ff
#4400ff
#4400ff
26
0
27
#4400ff
#4400ff
#4400ff
27
0
28
#4400ff
#4400ff
#4400ff
28
0
29
#4400ff
#4400ff
#4400ff
29
0
30
#4400ff
#4400ff
#4400ff
30
0
31
#4400ff
#4400ff
#4400ff
31
0
32
#001aff
#001aff
#001aff
32
0
33
#001aff
#001aff
#001aff
33
0
34
#001aff
#001aff
#001aff
34
0
35
#001aff
#001aff
#001aff
35
0
36
#001aff
#001aff
#001aff
36
0
37
#001aff
#001aff
#001aff
37
0
38
#ff8c00
#ff8c00
#ff8c00
38
0
39
#001aff
#001aff
#001aff
39
0
40
#001aff
#001aff
#001aff
40
0
41
#001aff
#001aff
#001aff
41
0
42
#ff8c00
#ff8c00
#ff8c00
42
0
43
#001aff
#001aff
#001aff
43
0
44
#ff8c00
#ff8c00
#ff8c00
44
0
45
#001aff
#001aff
#001aff
45
0
46
#ff8c00
#ff8c00
#ff8c00
46
0
47
#001aff
#001aff
#001aff
47
0
48
#00ffee
#00ffee
#00ffee
48
0
49
#ff4400
#ff4400
#ff4400
49
0
50
#00ffee
#00ffee
#00ffee
50
0
51
#ff4400
#ff4400
#ff4400
51
0
52
#00ffee
#00ffee
#00ffee
52
0
53
#ff4400
#ff4400
#ff4400
53
0
54
#001aff
#001aff
#001aff
54
0
55
#ff4400
#ff4400
#ff4400
55
0
56
#00ffee
#00ffee
#00ffee
56
0
57
#ff4400
#ff4400
#ff4400
57
0
58
#ff4400
#ff4400
#ff4400
58
0
59
#ff4400
#ff4400
#ff4400
59
0
60
#ff4400
#ff4400
#ff4400
60
0
61
#ff4400
#ff4400
#ff4400
61
0
62
#001aff
#001aff
#001aff
62
0
63
#ff4400
#ff4400
#ff4400
63
0
64
#ffff00
#ffff00
#ffff00
64
0
65
#ffff00
#ffff00
#ffff00
65
0
66
#ffff00
#ffff00
#ffff00
66
0
67
#ffff00
#ffff00
#ffff00
67
0
68
#ffff00
#ffff00
#ffff00
68
0
69
#ffff00
#ffff00
#ffff00
69
0
70
#ffff00
#ffff00
#ffff00
70
0
71
#ffff00
#ffff00
#ffff00
71
0
72
#a200ff
#a200ff
#a200ff
72
0
73
#a200ff
#a200ff
#a200ff
73
0
74
#a200ff
#a200ff
#a200ff
74
0
75
#a200ff
#a200ff
#a200ff
75
0
76
#a200ff
#a200ff
#a200ff
76
0
77
#a200ff
#a200ff
#a200ff
77
0
78
#a200ff
#a200ff
#a200ff
78
0
79
#a200ff
#a200ff
#a200ff
79
0
80
#00fffb
#00fffb
#00fffb
80
0
81
#00fffb
#00fffb
#00fffb
81
0
82
#00fffb
#00fffb
#00fffb
82
0
83
#00fffb
#00fffb
#00fffb
83
0
84
#00fffb
#00fffb
#00fffb
84
0
85
#00fffb
#00fffb
#00fffb
85
0
86
#00fffb
#00fffb
#00fffb
86
0
87
#00fffb
#00fffb
#00fffb
87
0
88
#ff0004
#ff0004
#ff0004
88
0
89
#ff0004
#ff0004
#ff0004
89
0
90
#ff0004
#ff0004
#ff0004
90
0
91
#ff0004
#ff0004
#ff0004
91
0
92
#ff0004
#ff0004
#ff0004
92
0
93
#ff0004
#ff0004
#ff0004
93
0
94
#ff0004
#ff0004
#ff0004
94
0
95
#ff0004
#ff0004
#ff0004
95
0
96
#00ff6f
#00ff6f
#00ff6f
96
0
97
#ff0037
#ff0037
#ff0037
97
0
98
#ff0037
#ff0037
#ff0037
98
0
99
#ff0037
#ff0037
#ff0037
99
0
100
#ff0037
#ff0037
#ff0037
100
0
101
#00ff6f
#00ff6f
#00ff6f
101
0
102
#ff0037
#ff0037
#ff0037
102
0
103
#00ff6f
#00ff6f
#00ff6f
103
0
104
#00ff6f
#00ff6f
#00ff6f
104
0
105
#00ff6f
#00ff6f
#00ff6f
105
0
106
#ff0037
#ff0037
#ff0037
106
0
107
#00ff6f
#00ff6f
#00ff6f
107
0
108
#ff0037
#ff0037
#ff0037
108
0
109
#00ff6f
#00ff6f
#00ff6f
109
0
110
#ff0037
#ff0037
#ff0037
110
0
111
#00ff6f
#00ff6f
#00ff6f
111
0
112
#66ff00
#66ff00
#66ff00
112
0
113
#ff05da
#ff05da
#ff05da
113
0
114
#66ff00
#66ff00
#66ff00
114
0
115
#ff05da
#ff05da
#ff05da
115
0
116
#66ff00
#66ff00
#66ff00
116
0
117
#ff05da
#ff05da
#ff05da
117
0
118
#ff05da
#ff05da
#ff05da
118
0
119
#ff05da
#ff05da
#ff05da
119
0
120
#66ff00
#66ff00
#66ff00
120
0
121
#ff05da
#ff05da
#ff05da
121
0
122
#66ff00
#66ff00
#66ff00
122
0
123
#ff05da
#ff05da
#ff05da
123
0
124
#66ff00
#66ff00
#66ff00
124
0
125
#66ff00
#66ff00
#66ff00
125
0
126
#ff05da
#ff05da
#ff05da
126
0
127
#66ff00
#66ff00
#66ff00
127
0
128
#ffffff
#ffffff
#ffffff
128
0
129
#ffffff
#ffffff
#ffffff
129
0
130
#ffffff
#ffffff
#ffffff
130
0
131
#ffffff
#ffffff
#ffffff
131
0
132
#ffffff
#ffffff
#ffffff
132
0
133
#ffffff
#ffffff
#ffffff
133
0
134
#ffffff
#ffffff
#ffffff
134
0
badchannels
badchannels
1 0 3 2 5 4 11 50 12 14 58 60 63 53 55 45 32 35 39 37 38 21 42 20 44 19 18 16 29 26 65 71 73 122 115 96 103 111 109 99 97 108 98 106 102 86 89 94 90 93 128 129 130 131 132 133 134
Mandatory
process_calcThreshold
executeScriptBool
1
Mandatory
rmsWindowLength
2
Mandatory
useage:
process_calcThreshold fileBaseName electrodeNumber
This script calculates the spike detection threshold and puts it in the file fileBaseName.threshold.electrodeNumber
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- rmsWindowLength represents the root mean square (rms) integration window for detection.
process_detectSpikes
executeScriptBool
1
Mandatory
thresholdFactor
7
Mandatory
refractoryPeriod
8
Mandatory
rmsWindowLength
2
Mandatory
peakWindowLength
10
Mandatory
windowPeakAlign
5
Mandatory
spikesFromDatBool
1
Mandatory
This script does the following:
* detects the spikes (creates the .res.# file),
* aligns the peaks,
* gets the waveforms (creates the .spk.# file),
The variables used by the different programs called in this script depend on the sampling rate. The default is for a sampling rate of 10khz.
All the script parameters are multiplifaction factor of 10khz except the thresholdFactor.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- refractoryPeriod represents the after detection, how many samples to skip before detecting a new spike if one is detected.
- rmsWindowLength represents the root mean square (rms) integration window for detection.
- peakWindowLength represents the window (number of samples to test) to search for spike peak, seams to be used for eigen calculation or finding of the true spike peak.
- windowPeakAlign represents the middle of the peakWindowLength, where to take the spike peak in peakWindowLength.
- thresholdFactor is a factor to compute the detection threshold:
threshold = thresholdFactor * baseline
process_findCommonThreshold
executeScriptBool
1
Mandatory
maxThreshold
Mandatory
useage:
process_findCommonThreshold fileBaseName [fileBaseName ...]
for each electrodeGroup in fileBaseName.xml
the value in fileBaseName.threshold.electrodeGroup is replaced by the minimum threshold value across passed fileBaseNames.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- maxThreshold default = 500
process_merge
executeScriptBool
1
Mandatory
mergeBaseName
BWRat19_032413
Mandatory
process_merge
usage:
process_merge -n $mergeBaseName $fileBaseNames
merges .spk .res etc for multi-file clustering.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- mergeBaseName designates the fileBaseName of the merged files.
*** Requirements ***
* calls process_pca_light : to do pca without presence of .fil file
* calls pproc
* each fileBaseName.* must be in a directory fileBaseName - which can be performed by process_dirFiles
process_mhipass
executeScriptBool
1
Mandatory
frequency
800
Mandatory
libraryPath
/u16/local/matlab6.5/extern/lib/glnx86:/u16/local/matlab6.5/bin/glnx86:/u16/local/matlab6.5/sys/os/glnx86
Mandatory
This script does the high-pass filtering for subsequent spike extraction. The .fil file is created by the program called in this script.
The frequency parameter is the lowest frequency cut off.
The highest frequency is computed based on the sampling rate as 0.95 % of the Nyquist frequency:
sampling rate * 0.5 * 0.95
The program called in this script is currently a matlab program, therefore this part of the process relies on Matlab until this program is rewritten.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- libraryPath is the path for Matlab.
process_mlopass
executeScriptBool
1
Mandatory
libraryPath
/u16/local/matlab6.5/extern/lib/glnx86:/u16/local/matlab6.5/bin/glnx86:/u16/local/matlab6.5/sys/os/glnx86
Mandatory
This script does the low-pass filtering (for local field potentials). The .eeg file is created by the program called in this script.
It calls a resampling program which first apply an anti aliasing low pass filter to the data and then samples down to the local field potential sampling rate provided in the parameter file.
The resampling program is currently a matlab program, therefore this part of the process relies on Matlab until this program is rewritten.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- libraryPath is the path for Matlab.
process_multi_start
cpFirstXmlBool
1
Mandatory
rmFilFileBool
1
Mandatory
This script starts eeg and spike data processing on a list of input fileBaseNames
This script is called by:
process_multi_start fileBaseName [fileBaseNames]
Parameters:
- rmFilFileBool
1 = remove the high pass filtered .fil file to save space
- cpFirstXmlBool
1 = copy the xml file from the first fileBaseName to all other fileBaseNames to save time
* Note that ideally the common threshold would be for single channels rather than single electrodes (may be a problem of process_baseline)
process_mvFiles2Dirs
executeScriptBool
1
Mandatory
This script organizes files in preparation for process_merge by moving fileBaseName.* into a directory fileBaseName
useage:
process_mvFiles2Dirs fileBaseName
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
process_pca
executeScriptBool
1
Mandatory
beforePeak
4
Mandatory
afterPeak
4
Mandatory
nSamplesInPCA
16
Mandatory
This script performs the principle component analysis (PCA ). It computes the variance (creates the .m1m2.# file) and creates the .fet.# and .mm.# files.
The variables used to compute the PCA depend on the sampling rate. The default is for a sampling rate of 10khz.
The parameters in the parameter file are multiplifaction factor of 10khz.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- beforePeak represents the number of samples before peak to be used for the PCA. There is one value for all the electrodes.
- afterPeak represents the number of samples after peak to be used for the PCA. There is one value for all the electrodes.
- nSamplesInPCA represents the number of samples used for PCA. There is one value for all the electrodes.
updateParFile
executeScriptBool
1
Mandatory
samplesInWaveform
16
Mandatory
peakSample
8
Mandatory
This script updates the parameter file.
It adds for each spike group, the number of samples in each waveform, the sample index of the peak in a waveform and the number of feaures to use to do the PCA.
The variables used by the different programs depend on the sampling rate. The default is for a sampling rate of 10khz.
All the script parameters are multiplifaction factor of 10khz.
parameters:
- executeScriptBool determines whether the script should be run with the next batch process.
- The parameter samplesInWaveform represents the number of samples in each waveform .
- The parameter peakSample represents the sample index of the peak in a waveform.