-
Notifications
You must be signed in to change notification settings - Fork 36
/
nptdiffs.txt
1620 lines (1620 loc) · 58.6 KB
/
nptdiffs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -rw -x CVS -x .DS_Store npt/PlotFFT.m npt-cvs/PlotFFT.m
2,7c2,5
< % PlotFFT(X,FS) plots the magnitude of the FFT of the signal x
< % with sampling frequency FS. If X is a matrix, the FFT is applied
< % to each column and the mean and standard deviation of the
< % magnitude across columns are plotted.
< % This function was derived from Technical Note 1702. For more
< % information, please see the following URL:
---
> % PLOTFFT Plot the FFT of a signal. It takes as arguments the signal and the sampling frequnecy,
> % and plots the FFT in a figure window.
> % PlotFFT(x,Fs) Plots the magnitude of the FFT of the signal x with sampling frequency Fs
> % It was derived from Technical Note 1702. For more information, please see the following URL:
10,11c8
< % make sure x is column vector if one of the dimensions is 1
< x = vecc(x);
---
>
18c15
< FFTX=FFTX(1:NumUniquePts,:);
---
> FFTX=FFTX(1:NumUniquePts);
20,21d16
< % get size of MX
< [mxr,mxc] = size(MX);
24,27c19,21
< MX(2:(end-1),:) = MX(2:(end-1),:)*2;
< % MX=MX*2;
< % MX(1,:)=MX(1,:)/2; % Account for endpoint uniqueness
< % MX(mxr,:)=MX(mxr,:)/2;
---
> MX=MX*2;
> MX(1)=MX(1)/2; % Account for endpoint uniqueness
> MX(length(MX))=MX(length(MX))/2; % We know NFFT is even
30c24
< MX=MX/size(x,1);
---
> MX=MX/length(x); %
32,44c26
< % take the tranpose so we can use mean and std easily
< MXT = MX';
< % get the mean magnitude across columns of MX
< mxMean = mean(MXT);
< plot(f,mxMean);
< % if there were more than 1 time series, plot the standard deviation
< if(mxc>1)
< mxStd = std(MXT);
< hold on
< plot(f,mxMean+mxStd,'c')
< plot(f,mxMean-mxStd,'c')
< hold off
< end
---
> plot(f,MX);
\ No newline at end of file
diff -rw -x CVS -x .DS_Store npt/ShihChengChangeLog.txt npt-cvs/ShihChengChangeLog.txt
1334,1772d1333
<
< December 20, 2003
< miscellaneous/parseArgs: New function downloaded from Matlab Central
< that parses optional arguments.
<
< December 21, 2003
< view/nptdata/InsepctGUI.m: Fixed bug that was not passing optional
< arguments correctly.
< view/gui/InspectCB.m: Fixed bug that was not passing optional arguments
< correctly.
<
< January 5, 2004
< scripts/batch_processor/moveprocessedfiles.tcsh: Modified to check
< for existence of old directories and remove them if necessary.
< Also now prints more informative messages.
<
< January 6, 2004
< Created branch called syen-version.
< scripts/view/@nptdata/InspectGUI: Added optional argument named
< addObjs. Removed requirement for optArgs for backward
< compatibility. Added code to make sure function doesn't crash
< if optional arguments like dir are left out when multiple
< objects are used. Removed several redundant function calls.
< scripts/batch_processor/ProcessSession: Added Baldwin's changes
< for version 1.11 except reverted the default of 'sort_algo'
< to 'KK'.
< scripts/miscellaneous/linkedzoom: Renamed from linkedZoom.M.
<
< January 7, 2004
< scripts/miscellaneous/getOptArgs: Renamed from parseArgs.m. Modified
< to take optional arguments in the form param,value. Fixed code to
< process aliases properly. Now skips any unknown arguments by
< default, which can be changed using the optional input argument
< 'stopOnError'.
<
< January 8, 2004
< scripts/miscellaneous/getOptArgs: Changes parseArgs to getOptArgs
< in help comments.
< scripts/view/@nptdata/InspectGUI: Now passes optional arguments
< using s.optargs{i}{:} instead of first storing it in a local
< variable.
<
< January 13, 2004
< scripts/batch_processor/ProcessDay: Added option to use cygwin to
< move processed files. Added some explanations to code that
< converted from old data hierarchy. Substituted use of function
< 'exist' with 'ispresent'.
< scripts/view/@nptdata/useProcessedMarker: Changed default to 0.
< scripts/miscellaneous/getOptArgs: Fixed bug in processing length of
< Aliases argument.
< scripts/miscellanoues/panGUI.m: Updated help comments.
< scripts/view/@nptdata/InspectGUI.m: Updated help comments.
< scripts/view/@nptdata/useProcessedMarker.m: Changed default to not
< create markers otherwise if we try to use nptSessionCmd, it
< might fail.
<
< January 14, 2004
< scripts/batch_processor/cygwincmd.tcsh: Renamed from
< cygwinmoveprocessedcmds. Now can take any tcsh script in as
< argument and run it.
< scripts/batch_processor/ProcessDay: Now uses cygwincmd instead of
< cygwinmoveprocessedcmds to run moveprocessedfiles.tcsh.
<
< January 15, 2004
< scripts/batch_processor/vecc: New function to return column vector.
< scripts/batch_processor/vecr: New function to return row vector.
< scripts/batch_processor/ProcessDay: Updated code to use cygwin to
< move processed files now that tcsh works as expected on
< STREAMERB. Now checks if input argument is character before
< switch statement.
< scripts/batch_processor/ProcessDays: Now checks if input argument
< is character before switch statement.
< scripts/batch_processor/ProcessSession: Now checks if input
< argument is character before switch statement.
< scripts/batch_processor/ProcessEyeSessions: Now checks if input
< argument is character before switch statement.
<
< January 23, 2004
< scripts/miscellaneous/getOptArgs: Removed NumericArguments field
< from output data structure.
< scripts/view/gui/InspectCB: Now passes optional arguments using
< s.optargs{i}{:} instead of first storing it in a local variable.
< BaldwinChangeLog.txt: Updated using version from main trunk.
< scripts/view/@ispikes/plot: Updated using version from main trunk.
< scripts/miscellaneous/nptDefaultColors: New file from main trunk.
< scripts/write_files/WriteWaveformsFile.m: New file from main trunk.
< scripts/batch_processor/ProcessDay: Modified to copy just the dxy
< files when using the optional eyeSessions input argument.
<
< January 27, 2004
< scripts/miscellaneous/getOptArgs: Fixed bug that failed to initialize
< l to NumArgCount.
<
< February 16, 2004
< scripts/miscellaneous/nptDir: Added help comments for
< 'CaseInsensitiveSuffix' option.
<
< February 20, 2004
< scripts/view/@nptdata/nptdata: Added sessiondirs field. Added code
< to pass sessiondirs in as a cell array or in a text file.
< scripts/view/@nptdata/loadobj: New function to update old saved
< npdata objects.
< scripts/view/@nptdata/plot: Modified to go through sessiondirs and
< load and plot specified objects.
< scripts/miscellaneous/nptSubplot: Modified to return rows and cols.
<
< February 23, 2004
< scripts/batch_processor/ProcessSession: Added optional input argument
< to pass arguments to RunClustBatch.
<
< February 24, 2004
< scripts/miscellaneous/deg2rad: New function that converts between
< degrees and radians.
< scripts/miscellaneous/rad2deg: New function that converts between
< radians and degrees.
< scripts/miscellaneous/histcie: Added optional input argument 'DropLast'
< to drop the last value in N which is always 0. Added help comments
< that described modifications to output argument BIN. Modified
< code to handle matrices.
< scripts/miscellaneous/vecc: Modified to work only with vectors with
< single row.
< scripts/miscellaneous/vecr: Modified to work only with vectors with
< single column.
< scripts/view/@pntdata/plot: Added try-catch block to catch errors
< loading objects or plotting objects.
<
< February 25, 2004
< scripts/@nptdata/nptdata: Added 'Eval' optional input argument that
< evaluates command string to see if current directory is to be
< used to create a nptdata object.
< scripts/@nptdata/ProcessSession: Added help comments to illustrate
< the use of the output argument when using 'nptSessionCmd'.
< scripts/@nptdata/plus: Added code to actually add nptdata objects.
<
< March 2, 2004
< scripts/batch_processor/getEyeCalData: New function that contains
< code that used to be in ProcessEyeSessions. Also used by new
< code in eyes class. Now also checks for skip.txt before trying
< to use dxy file.
< scripts/batch_processor/ProcessEyeSessions: Now uses getEyeCalData.
< scripts/read_files/nptReadDXYFile: New function that reads DXY
< files.
< scripts/view/@eyes/private/addData2DFields: New function that
< computes and stores data for displaying calibration data in 2D.
< scripts/view/@eyes/eyes: Added new fields and calls to
< addData2DFields.
< scripts/view/@eyes/loadobj: New function that adds new fields to
< previously saved objects.
< scripts/view/@eyes/plot: Added code to display data along with
< calibration grid in 2D.
<
< March 3, 2004
< scripts/batch_processor/ProcessEyeSessions: Fixed bug that failed
< to generate dirlist. Fixed bug that incorrectly named screencoords
< as ec.screencoords. Reformatted to remove extremely long lines.
< scripts/batch_processor/getEyeCalData: Reformatted to remove
< extremely long lines.
<
< March 4, 2004
< scripts/batch_processor/getDXYData: Renamed from getEyeCalData.
< scripts/view/@eyes/eyes: Removed fields added recently as we
< don't want to load the DXY files for every object that inherits
< from the eyes class.
< scripts/view/@eyes/loadobj: Removed since data structure has reverted
< back to original form.
< scripts/view/@eyes/plot: Now takes data structure returned by
< getEyeCalData as optional input argument to do 2D plots.
< scripts/view/@eyes/private/addData2DFields: Renamed function to
< scripts/miscellaneous/getEyeCalData.
< scripts/miscellaneous/getEyeCalData: Renamed from addData2DFields.
< Added code to pass optional input arguments to specify directory
< location, gridsteps and interpolation algorithm.
<
< March 5, 2004
< scripts/view/@nptdata/name2index: New function that returns session
< index given session name or part of session name.
< scripts/view/@event/SetEventNumber: Now checks to make sure new
< number is within range. If not, old number is retained and is
< now returned as well.
< scripts/view/gui/InsepctCB: Now calls name2index for object when
< something other than a number is entered in the edit box. Also
< uses number returned by SetEventNumber when number is out of
< range so the 0 returned by name2index when no matches are found
< will not cause function to crash.
<
< March 8, 2004
< scripts/view/@nptdata/name2index: Fixed bug in returning total number
< of sessions.
< scripts/batch_processor/ProcessSession: Added code that saved
< trigDurations, presTrigOnsets and syncOnsets in milliseconds in
< the second column of trigDurations, in the new variables
< presTrigOnsetsMS and syncOnsetsMS respectively. Since we have access
< to the sampling_rate, this is easier to do here.
<
< March 9, 2004
< scripts/view/@nptdata/name2index: Fixed bug in converting name to
< index.
< scripts/view/gui/InspectCB: Now checks if search string contains
< 's:' which allows the user to denote numbers as search string.
<
< March 15, 2004
< scripts/miscellaneous/getOptArgs: Added code to subtract and remove
< optional arguments.
<
< March 16, 2004
< scripts/view/@eyes/plot: Added 'DataStart', 'DataEnd', 'AxisZoom'
< optional input arguments.
< scripts/view/@ispikes/separate: New function to separate multiple
< clusters into separate ispikes objects.
<
< March 18, 2004
< scripts/miscellaneous/getPositionMeanStd: New function to compute
< mean and standard deviation of x- and y-signals.
< scripts/view/@eyes/getMeanStd: New function that reads in datafile
< and calls getPositionMeanStd.
< scripts/view/@eyes/plot: Added separate 'XY' flag that does not
< plot eye cal grid. Added 'XYStd' option that plots eye positions
< as well as the histogram of the distances from the mean in a
< separate plot. The std for the distribution is also included in
< the title of second plot. Added hardcoded vchan and hchan since
< we don't necessarily use structure passed in by Data2D.
<
< March 22, 2004
< scripts/view/@eyejitter/eyejitter: Constructor for new class that
< analyzes jitter in eye position.
< scripts/view/@eyejitter/plot: Plot command for new eyejitter class.
< scripts/view/@eyes/eyes: Added code to create object automatically.
< scripts/view/@eyes/isempty: New function that returns 1 if object
< is empty.
< scripts/view/@ispikes/getSpikeCounts: New function that calls
< histcie on spike times.
< scripts/miscellaneous/getOptArgs: Modified help comments to add
< description of second output argument.
< scripts/miscellaneous/histcie: Added code to make sure data is column
< vector if 1 of the dimensions is 1.
<
< March 23, 2004
< scripts/read_files/ReadIniRF: New function to read RF info from INI
< files.
< scripts/view/@eyejitter/eyejitter: Fixed bug that failed to initialize
< nooffsets.
< scripts/view/@eyejitter/plot: Added square brackets in help comments
< to indicate choice between 'All' and 'Trials' optional input
< arguments. Added code to create 3D plots of interpolated surface.
< Cleaned up code that checked for matching lengths of Trials
< and Responses arguments.
< scripts/view/@eyes/eyes: Fixed bug that failed to create proper
< nptdata object in CreateEmptyEyesObject.
<
< March 24, 2004
< scripts/miscellaneous/getOptArgs: Added code to use shortcuts. Cleaned
< up help comments.
< scripts/view/@fields/fields: New function to display receptive fields.
<
< March 26, 2004
< scripts/batch_processor/tolower.tcsh: Modified to take directory
< argument.
< scripts/batch_processor/cmpCD: New shell script to compare data on
< disk to CD.
< @scripts/view/@mapfields: Renamed from @fields since fields is built-in
< Matlab function.
<
< March 29, 2004
< scripts/batch_processor/cmpCD: Removed from CVS and copied to local
< machine.
<
< March 30, 2004
< scripts/miscellaneous/getOptArgs: Added option to keep numeric
< arguments.
< scripts/view/@mapfields/plot: New plot function for mapfields object.
< scripts/view/@mapfields/subsref: New subsref function for mapfields
< object.
<
< March 31, 2004
< scripts/miscellaneous/getOptArgs: Fixed bug in processing shortcuts.
< scripts/view/@mapfields/mapfields: Added code to save object.
< scripts/view/@mapfields/plot: Added code to clear axis by default or
< else plots keep getting added.
<
< April 1, 2004
< scripts/view/@eyejitter/eyejitter: Added code to change HoldAxis to 0.
< scripts/view/@eyejitter/hist: New function plot 2D-histogram of eye
< positions.
< scripts/miscellaneous/histn: New function downloaded from Matlab
< Central that computes histogram in n-dimensions.
< scripts/miscellaneous/getOptArgs: Fixed bug in not initializing ShortCuts
< variable.
<
< April 2, 2004
< scripts/miscellaneous/getOptArgs: Fixed typo in help comments for
< shortcuts. Now uses 'exact' argument for all strmatch calls.
< scripts/view/@eyejitter/eyejitter: Now uses 'shortcuts' argument when
< calling getOptArgs for 'redo' and 'save'. Changed fieldnames in
< Args struct to include uppercase characters to enable abbreviations.
< scripts/view/@eyejitter/hist: Added colorbar to imagesc plot.
< scripts/view/@eyejitter/plot: Now uses 'keepnumeric' when calling
< getOptArgs so the 2nd input argument is no longer required to be a
< number. Clarified help comments. Added 'hist' option to plot eye
< position histogram.
< scripts/view/@mapfields/plot: Modified so 'All' input argument is
< processed even in presence of numeric 2nd argument so this function
< can be used with InsepctGUI.
<
< April 5, 2004
< scripts/miscellaneous/panGUI.fig: Modified to allow axis to rescale
< with figure resize.
<
< April 7, 2004
< nptAddPath: Modified to skip CVS directories and directories with .
< at the beginning of the name.
< scripts/miscellaneous/nptDir: Cleaned up code that removes files or
< directories with . at the beginning of the name.
<
< April 8, 2004
< nptAddPath: Fixed bugs in new code added yesterday.
<
< April 9, 2004
< PlotFFT: Modified to handle matrices as inputs and compute FFT for each
< column and plot the mean and standard deviation of the magnitudes.
< nptFFT: Modified to handle matrices as inputs and compute FFT for each
< column.
< nptPlotFFT: New function to replace PlotFFT that calls nptFFT so we
< will not need to maintain two separate functions that compute FFTs.
<
< April 12, 2004
< algorithms/nptFFTMag: Renamed from nptFFT. Now skips multiplying all
< frequencies between DC and Nyquist by 2. Replaced use of length(x)
< with size(x,1) to be explicit that the data is supposed to be in
< columns.
< algorithms/nptSpikeTimesFFT: New function that computes the histogram
< of spike times and breaks the signal into segments before computing
< the FFT in order to increase the size of the frequency bins.
< algorithms/welch: New function that returns a Welch window.
< algorithms/nptFFT: Renamed to nptFFTMag.
<
< April 13, 2004
< algorithms/nptSpikeTimesFFT: Added code to skip segment code if there
< is only one segment to avoid out of memory errors.
< scripts/miscellaneous/histcie: Added code to make sure output of histc
< is a column vector to prevent problems with 1x1 inputs. Cleaned up
< code which replaced input with a variable with the same name.
< scripts/view/@nptdata/InspectGUI: Commented out title command that uses
< a sessionname field since that should be the responsibility of the
< particular object.
< scripts/view/gui/InsepctCB: Commented out title command that uses a
< sessionname field since that should be the responsibility of the
< particular object.
<
< April 21, 2004
< Updated from main trunk:
< scripts/read_files/nptReadStreamerFileChunk.m
< scripts/view/@trialwaves/trialwaves.m
<
< Added files from main trunk:
< algorithms/ContourArea.m
< algorithms/filters/TwoDimGaussFilter.m
< scripts/miscellaneous: max2.m
< scripts/miscellaneous: min2.m
< scripts/write_files/nptAppendStreamerFile.m
< scripts/write_files/nptWriteStreamerFileHeader.m
<
< Merged from main trunk:
< scripts/batch_processor/ProcessSession: Added code for handling single
< trials. Fixed putative bug that was only looping over 2 trials.
<
< nptdiffs.txt: New file containing current known differences between
< main trunk and this branch. Do "diff -rw -x CVS -x \.DS_Store npt
< npt-cvs > ndiffs.txt" and then "diff nptdiffs.txt ndiffs.txt" to
< identify new differences.
<
< April 22, 2004
< scripts/miscellaneous/cell2array: New function that converts from
< cell arrays to matrices that are padded to the right lengths.
< scripts/view/@eyejitter/eyejitter: Fixed help comments to substitute
< references to BIAS with EYEJITTER.
<
< April 23, 2004
< Updated from main trunk:
< BaldwinChangeLog.txt
< algorithms/ContourArea.m
< algorithms/filters/TwoDimGaussFilter.m
< scripts/read_files/ReadExtraSyncsFile.m
< scripts/read_files/ReadRevCorrIni.m
< scripts/read_files/read_init_info.m
<
< Added file from main trunk:
< scripts/miscellaneous/max3.m
< scripts/miscellaneous/min3.m
<
< Merged from main trunk:
< scripts/view/@nptdata/ProcessDay.m
<
< Removed from main trunk:
< scripts/view/MSeqframe.m
< scripts/view/createMSeqMovie.m
<
< April 25, 2004
< scripts/miscellaneous/cell2array: Modified to take cell array of rows
< as well as columns. Now returns error if one of the dimensions of
< the cell array is not 1.
< scripts/view/@nptdata/InspectGUI: Now calls get with varargin so the
< overloaded form of the get function can be used instead of the get
< function in @nptdata.
< scripts/view/@nptdata/ProcessDay: Removed changes from main trunk that
< was causing problems.
<
< April 26, 2004
< scripts/view/@nptdata/get: Added varargin to input arguments so it
< will work with changes to InspectGUI.
<
< April 27, 2004
< scripts/miscellaneous/logbar: New function that creates bar plots with
< log scale on the y-axis.
< scripts/view/@nptdata/plot: Added code to only call subplot when
< neccessary.
<
< May 5, 2004
< Updated from main trunk:
< BaldwinChangeLog.txt
< scripts/read_files/ReadRevCorrIni
< scripts/read_files/ReadIniFileWrapper
< scripts/read_files/ReadRevCorrIniJonathan
<
< Merged from main trunk:
< scripts/batch_processor/ProcessEyeSessions: Added redoValue optional
< input argument.
< scripts/batch_processor/ProcessSession: Added check for sort_algo
< equal to 'none'.
< scripts/view/gui/InspectCB: Added return statement to quit callback.
<
< scripts/miscellaneous/dividBins: New function to sub-divide bins.
<
< May 7, 2004
< Updated from main trunk:
< BaldwinChangeLog.txt
< scripts/read_files/ReadRevCorrIni
<
< scripts/batch_processor/ProcessSession: Removed code that set trials
< to 2 for single trial sessions.
Only in npt-cvs/algorithms: nptFFT.m
Only in npt/algorithms: nptFFTMag.m
Only in npt/algorithms: nptSpikeTimesFFT.m
Only in npt/algorithms: welch.m
Only in npt/doc: view-nptdata-usage.txt
diff -rw -x CVS -x .DS_Store npt/nptAddPath.m npt-cvs/nptAddPath.m
47,49c47
< % or a CVS directory
< if( ~strcmpi(dirlist(i).name,'doc') & isempty(findstr(dirlist(i).name,'@')) ...
< & ~strcmpi(dirlist(i).name,'cvs') )
---
> if ~strcmp(dirlist(i).name,'doc') & isempty(findstr(dirlist(i).name,'@'))
56,57c54
< % abbreviated version nptDir to remove dirs with '.' at the beginning
< % of the name
---
> % abbreviated version nptDir to remove '.' and '..' from dir listing
60,67c57,63
< dirlist = dir(dname);
< dirsize = size(dirlist,1);
< a = [];
< for i = 1:dirsize
< if ~strcmp(dirlist(i).name(1),'.')
< % first entry is a '.', which means that we should remove
< % it from our list
< a = [a; dirlist(i)];
---
> a = dir(dname);
> if ~isempty(a)
> dirsize = size(a,1);
> if strcmp(a(1).name,'.')
> % first entry is a '.', which means that we should remove the first 2
> % entries
> a = a(3:dirsize);
Only in npt: nptdiffs.txt
diff -rw -x CVS -x .DS_Store npt/scripts/batch_processor/ProcessDay.m npt-cvs/scripts/batch_processor/ProcessDay.m
50,52d49
< % 'cygwinmove' Uses a cygwin shell script to greatly speed up
< % moving processed files on Windows machines.
< % Requires cygwin to be installed on the computer.
75d71
< cygwin = 0;
87d82
< if(ischar(varargin{i}))
123,125d117
< case('cygwinmove')
< cygwin = 1;
< end
154,155c146
< % files out of the directory. Only necessary for old psychophysical
< % data which has the old data hierarchy.
---
> % files out of the directory
157,158c148,152
< % use ispresent instead of isdir to avoid case sensitivity
< if(ispresent('eyes','dir','CaseInsensitive'))
---
> % use exist instead of nptDir since nptDir will actually do a dir
> % in the Eyes directory when all we want to know is if the Eyes
> % directory exists. The exist function will return 7 if the directory
> % exists and 0 if not
> if exist('Eyes','dir') == 7
235,236c229
< % [s,w] = system(sprintf('cp -r %s %02i',eyeSessions{i},eNum));
< [s,w] = system(sprintf('mkdir %02i; cp %s/*_dxy.bin %02i',eNum,eyeSessions{i},eNum));
---
> [s,w] = system(sprintf('cp -r %s %02i',eyeSessions{i},eNum));
253,260d245
< if(strcmp(platform,'PCWIN') & cygwin)
< % get path to script
< mname = which('moveprocessedfiles.tcsh');
< doscommand = ['\cygwin\bin\tcsh ' mname];
< tic
< status = dos(doscommand);
< toc
< else
264,267d248
< end
< if(status)
< fprintf('Warning: Processed files not moved properly!\n');
< end
diff -rw -x CVS -x .DS_Store npt/scripts/batch_processor/ProcessDays.m npt-cvs/scripts/batch_processor/ProcessDays.m
26d25
< if(ischar(varargin{i}))
33d31
< end
diff -rw -x CVS -x .DS_Store npt/scripts/batch_processor/ProcessEyeSessions.m npt-cvs/scripts/batch_processor/ProcessEyeSessions.m
25d24
< if(ischar(varargin{i}))
36d34
< end
40,41c38,39
< ec = getDXYData;
<
---
> NumberofDXYfiles=0;
> exp_sessions=[];
43c41,107
< if ec.NumberofDXYfiles>0
---
> for i=1:size(dirlist,1) %loop through sessions
> if dirlist(i).isdir
> cd (dirlist(i).name)
> dxy_list=nptDir('*_dxy.bin');
> if ~isempty(dxy_list)
> fprintf('\t\tUsing DXY File %s\n', dxy_list(1).name);
>
> NumberofDXYfiles = NumberofDXYfiles + 1;
> fid=fopen(dxy_list(1).name,'r','ieee-le');
> % read in variables
> ScreenHeight(NumberofDXYfiles) = fread(fid, 1, 'int32');
> ScreenWidth(NumberofDXYfiles) = fread(fid, 1, 'int32');
> GridRows(NumberofDXYfiles) = fread(fid, 1, 'int32');
> GridCols(NumberofDXYfiles) = fread(fid, 1, 'int32');
> Xsize(NumberofDXYfiles) = fread(fid, 1, 'int32');
> Ysize(NumberofDXYfiles) = fread(fid, 1, 'int32');
> CenterX(NumberofDXYfiles) = fread(fid, 1, 'int32');
> CenterY(NumberofDXYfiles) = fread(fid, 1, 'int32');
> NumBlocks(NumberofDXYfiles) = fread(fid, 1, 'int32');
> NumberOfPoints(NumberofDXYfiles) = GridRows(NumberofDXYfiles)*GridCols(NumberofDXYfiles);
> NumberOfTrials(NumberofDXYfiles) = NumberOfPoints(NumberofDXYfiles)*NumBlocks(NumberofDXYfiles);
> %meanVH is the average voltage of the last fixation for each trial. This was used to create avgVH in ProcessSession
> %but it is not used anymore.
> meanVHmatrix(NumberofDXYfiles,1:2,1:NumberOfTrials(NumberofDXYfiles)) = fread(fid, [2,NumberOfTrials(NumberofDXYfiles)], 'double');
> %avgVh is the average voltage for each grid point.
> avgVH(NumberofDXYfiles,1:2,1:NumberOfPoints(NumberofDXYfiles)) = fread(fid, [2,NumberOfPoints(NumberofDXYfiles)], 'double');
> fclose(fid);
> end
> exp_sessions=[exp_sessions str2num(dirlist(i).name)];
> cd ..
> end
> end
>
> if NumberofDXYfiles==1
> eyecoilcoords = squeeze(avgVH);
>
> elseif NumberofDXYfiles==0
> fprintf('No dxy file present can not process eyedata\n');
>
> %average all dxy files if they have the same parameters
> elseif ( isempty(find( diff(ScreenHeight) )) & ... % This operation first scans across all elements of
> isempty(find( diff(ScreenWidth) )) & ... % each screen parameter, e.g. ScreenHeight(NumberofDXYfiles)
> isempty(find( diff(GridRows) )) & ... % and calculates the differences between neighbors ('diff').
> isempty(find( diff(GridCols) )) & ... % 'find' then returns the index of all of the differences
> isempty(find( diff(Xsize) )) & ... % that were non-zero. 'isempty' returns a 1 if the results
> isempty(find( diff(Ysize) )) & ... % of 'find' were an empty set, indicating no differences.
> isempty(find( diff(CenterX) )) & ...
> isempty(find( diff(CenterY) )) )
>
> eyecoilcoords = squeeze(mean(avgVH));
>
> else
>
> fprintf('Warning!: Screen parameters in DXY files DO NOT match.\n\t\tUsing only the first DXY file: %s\n\n', dxy_list(1).name);
> % get average eyecoil coordinates from first DXY file's averages
> eyecoilcoords = squeeze(avgVH(1,:,:));
> end
>
>
>
>
>
>
>
>
>
> if NumberofDXYfiles>0
56,58c120,121
< % if there is no descriptor file, just skip over this
< % session since it might be a session with a
< % substitute dxy file
---
> % if there is no descriptor file, just skip over this session
> % since it might be a session with a substitute dxy file
71,72c134
< [path filename ext]=...
< fileparts(eyefiltdirlist(i).name);
---
> [path filename ext]=fileparts(eyefiltdirlist(i).name);
76,86c138,141
< [eyefilt,num_channels,sampling_rate,datatype,...
< points]=nptReadDataFile([prefix ...
< eyefiltdirlist(i).name]);
< screencoords = nptEyecoil2Screen(eyefilt,...
< ec.eyecoilcoords,ec.GridCols,ec.GridRows,...
< ec.CenterY,ec.CenterX,ec.Xsize,ec.Ysize);
< nptWriteDataFile([filename(1:length(filename)-4)...
< '.' trialname],sampling_rate,screencoords);
< fprintf('\t\tdatafile: %s channels: %i\n',...
< [filename(1:length(filename)-4)...
< '.' trialname],2);
---
> [eyefilt,num_channels,sampling_rate,datatype,points]=nptReadDataFile([prefix eyefiltdirlist(i).name]);
> screencoords = nptEyecoil2Screen(eyefilt,eyecoilcoords,GridCols,GridRows,CenterY,CenterX,Xsize,Ysize);
> nptWriteDataFile([filename(1:length(filename)-4) '.' trialname],sampling_rate,screencoords);
> fprintf('\t\tdatafile: %s channels: %i\n',[filename(1:length(filename)-4) '.' trialname],2);
93a149
>
98a155,158
>
>
>
>
\ No newline at end of file
diff -rw -x CVS -x .DS_Store npt/scripts/batch_processor/ProcessSession.m npt-cvs/scripts/batch_processor/ProcessSession.m
34,37c34
< % 'KK' is the default.
< % 'clustoptions' Optional input arguments for RunClustBatch.
< % (e.g. ProcessSession('clustoptions',{'Do_AutoClust',
< % 'no'}).
---
> % 'none' is the default.
60c57
< sort_algo='KK';
---
> sort_algo='none';
68d64
< clustoptions = {};
75d70
< if(ischar(varargin{i}))
116,117d110
< case('clustoptions')
< clustoptions = varargin{i+1};
124,125c117
< end % switch
< end % if(ischar)
---
> end
305,306d296
< % get sampling_rate in ms since that is used more often
< srms = sampling_rate/1000;
357,360c347
< % column 1 in trigDurations is in data points and
< % column 2 is in ms so subtract 1 from data point
< % since data point 1 is 0 ms.
< trigDurations = [trigDurations; tdur(1) (tdur(1)-1)/srms];
---
> trigDurations = [trigDurations; tdur(1)];
528,532c515
< % get presTrigOnsets and syncOnsets in ms. Do this here
< % since we know the sampling rate.
< presTrigOnsetsMS = (presTrigOnsets-1)/srms;
< syncOnsetsMS = (syncOnsets-1)/srms;
< save([sessionname 'timing'],'trigDurations','presTrigOnsets','syncOnsets','smSyncs','presTrigOnsetsMS','syncOnsetsMS');
---
> save([sessionname 'timing'],'trigDurations','presTrigOnsets','syncOnsets','smSyncs');
537c520
< rawfilename = [filename '_highpass'];
---
> rawfilename = [sessionname '_highpass'];
615c598
< if(sort & ~strcmp(sort_algo,'none'))
---
> if sort & ~strcmp(sort_algo,'none')
627c610
< RunClustBatch([p filesep 'Batch_BBClustEE.txt'],clustoptions{:})
---
> RunClustBatch([p filesep 'Batch_BBClustEE.txt'])
629c612
< RunClustBatch([p filesep 'Batch_BBClust.txt'],clustoptions{:})
---
> RunClustBatch([p filesep 'Batch_BBClust.txt'])
634c617
< RunClustBatch([p filesep 'Batch_KKwikEE.txt'],clustoptions{:})
---
> RunClustBatch([p filesep 'Batch_KKwikEE.txt'])
636c619
< RunClustBatch([p filesep 'Batch_KKwik.txt'],clustoptions{:})
---
> RunClustBatch([p filesep 'Batch_KKwik.txt'])
Only in npt/scripts/batch_processor: cpdescriptor.tcsh
Only in npt/scripts/batch_processor: getDXYData.m
diff -rw -x CVS -x .DS_Store npt/scripts/batch_processor/moveprocessedfiles.tcsh npt-cvs/scripts/batch_processor/moveprocessedfiles.tcsh
14,22d13
< echo " eyefilt:"
< # check if the eyefilt directory exists
< if (-e eyefilt) then
< # remove files and directories in eyefilt directory
< # to prevent confusion
< echo " removing contents of eyefilt directory"
< rm -r eyefilt/*
< else
< echo " creating eyefilt directory"
24,25d14
< endif
< echo " moving eyefilt files"
32,40d20
< echo " eye:"
< # check if the eye directory exists
< if (-e eye) then
< # remove files and directories in eye directory
< # to prevent confusion
< echo " removing contents of eye directory"
< rm -r eye/*
< else
< echo " creating eye directory"
42,43d21
< endif
< echo " moving eye files"
50,58d27
< echo " lfp:"
< # check if the lfp directory exists
< if (-e lfp) then
< # remove files and directories in lfp directory
< # to prevent confusion
< echo " removing contents of lfp directory"
< rm -r lfp/*
< else
< echo " creating lfp directory"
60,61d28
< endif
< echo " moving lfp files"
68,76d34
< echo " highpass:"
< # check if the highpass directory exists
< if (-e highpass) then
< # remove files and directories in highpass directory
< # to prevent confusion
< echo " removing contents of highpass directory"
< rm -r highpass/*
< else
< echo " creating highpass directory"
78,79d35
< endif
< echo " moving highpass files"
86,94d41
< echo " sort:"
< # check if there is a sort directory
< if (-e sort) then
< # remove files and directories in sort directory
< # to prevent confusion
< echo " removing contents of sort directory"
< rm -r sort/*
< else
< echo " creating sort directory"
96,97d42
< endif
< echo " moving sort files"
102,114c47,48
< if (-e FD) then
< echo " FD:"
< # check if there is a sort directory
< if (-e sort) then
< # check if there is a FD directory already
< if (-e sort/FD) then
< echo " removing contents of sort/FD directory"
< # remove FD directory
< rm -r sort/FD
< endif
< else
< echo " creating sort directory"
< # no sort directory so create one and move FD into it
---
> @ nfiles = `ls -1 FD |& grep -v No | wc -l`
> if ($nfiles > 0) then
116,118d49
< endif
< # move FD directory to sort
< echo " moving FD directory"
121d51
<
diff -rw -x CVS -x .DS_Store npt/scripts/batch_processor/tolower.tcsh npt-cvs/scripts/batch_processor/tolower.tcsh
2,6d1
< # usage: tolower.tcsh [dir]
< if( $1 != "") then
< cd $1
< endif
<
10,11c5
< mv ${i} temp
< mv temp ${nfile}
---
> mv ${i} ${nfile}
Only in npt/scripts/miscellaneous: cell2array.m
diff -rw -x CVS -x .DS_Store npt/scripts/miscellaneous/concatenate.m npt-cvs/scripts/miscellaneous/concatenate.m
3c3
< % C = CONCATENATE(A,B) concatenates two row vectors
---
> % C = CONCATENATE(A,B) concatonates two row vectors
Only in npt/scripts/miscellaneous: deg2rad.m
Only in npt/scripts/miscellaneous: divideBins.m
Only in npt/scripts/miscellaneous: getEyeCalData.m
Only in npt/scripts/miscellaneous: getOptArgs.m
Only in npt/scripts/miscellaneous: getPositionMeanStd.m
diff -rw -x CVS -x .DS_Store npt/scripts/miscellaneous/histcie.m npt-cvs/scripts/miscellaneous/histcie.m
1c1
< function [n,bin] = histcie(x,edges,varargin)
---
> function [n,bin] = histcie(x,edges)
8,13c8
< % still be used to create plots easily. BIN is also modified so
< % that any value in X matching EDGES(end) will be set to bin
< % length(EDGES)-1.
< %
< % [N,BIN] = HISTCIE(X,EDGES,'DropLast') drops the last value in
< % N, which is always 0.
---
> % still be used to create plots easily.
15,19d9
< Args = struct('DropLast',0);
< Args = getOptArgs(varargin,Args,'flags',{'DropLast'});
<
< % make sure x is column vector if one of its dimension is 1
< x = vecc(x);
21,22d10
< % make sure nh is a column vector, especially when x is 1x1
< nh = vecc(nh);
24a13
> if (nh(nhl) > 0)
26c15
< nh1 = nhl - 1;
---
> x = nhl - 1;
28c17
< nh(nh1,:) = nh(nh1,:) + nh(nhl,:);
---
> nh(x) = nh(x) + nh(nhl);
30,32c19,22
< nh(nhl,:) = 0;
< % find binh == edges(end) and set them to nhl - 1 (i.e. nh1)
< binh(find(binh==nhl)) = nh1;
---
> nh(nhl) = 0;
> % find binh == edges(end) and set them to nhl - 1 (i.e. x)
> binh(find(binh==nhl)) = x;
> end
38d27
< if(Args.DropLast)
40,41d28
< n = nh(1:(end-1),:);
< else
43d29
< end
Only in npt/scripts/miscellaneous: histn.m
Only in npt-cvs/scripts/miscellaneous: linkedZoom.M
Only in npt/scripts/miscellaneous: linkedzoom.m
Only in npt/scripts/miscellaneous: logbar.m
diff -rw -x CVS -x .DS_Store npt/scripts/miscellaneous/nptDir.m npt-cvs/scripts/miscellaneous/nptDir.m
20,23d19
< % nptDir('directory_name','CaseInsensitiveSuffix') will return a list
< % of files that match 'directory_name' regardless of the case of the
< % suffix. This will have no effect on Windows systems.
< %
72a69
> if ~isempty(dirlist)
79a77,79
> end
> else
> a=[];
Only in npt/scripts/miscellaneous: nptPlotFFT.m
diff -rw -x CVS -x .DS_Store npt/scripts/miscellaneous/nptSubplot.m npt-cvs/scripts/miscellaneous/nptSubplot.m
1,6c1,7
< function a = nptSubplot(n,p)
< %nptSubplot Creates reasonable layout of subplots
< % A = nptSubplot(N,P) creates subplots with N being total number
< % of plots and P being the current plot and returns layout in A
< % ([rows cols]). Useful when calling subplot with a variable number
< % of subplots.
---
> function nptSubplot(n,p)
> %nptSubplot(n,p)
> %subplot with n being total number of plots
> %and p being the current plot.
> %this function decides how to split up
> %the axis space. Useful when calling subplot with
> %a variable number of subplots.
32d32
< subplot(r,c,p)
34,35c34,35
< % return layout
< a = [r c];
---
>
> subplot(r,c,p)
\ No newline at end of file
Binary files npt/scripts/miscellaneous/panGUI.fig and npt-cvs/scripts/miscellaneous/panGUI.fig differ
diff -rw -x CVS -x .DS_Store npt/scripts/miscellaneous/panGUI.m npt-cvs/scripts/miscellaneous/panGUI.m
2,4c2,4
< % panGUI Graphical user interface for panning through data
< % panGUI, by itself, creates a new window for panning through a plot
< % with a step size of 50.
---
> % panGUI M-file for panGUI.fig
> % panGUI, by itself, creates a new panGUI or raises the existing
> % singleton*.
6c6,7
< % H = panGUI returns the handle to a new panGUI window.
---
> % H = panGUI returns the handle to a new panGUI or the handle to
> % the existing singleton*.
8c9,10
< % panGUI(STEP) creates a new window with a step size of STEP.
---
> % panGUI('CALLBACK',hObject,eventData,handles,...) calls the local
> % function named CALLBACK in panGUI.M with the given input arguments.
10c12,21
< % H = panGUI(STEP)
---
> % panGUI('Property','Value',...) creates a new panGUI or raises the
> % existing singleton*. Starting from the left, property value pairs are
> % applied to the GUI before panGUI_OpeningFunction gets called. An
> % unrecognized property name or invalid value makes property application
> % stop. All inputs are passed to panGUI_OpeningFcn via varargin.
> %