init
This commit is contained in:
		
							
								
								
									
										18
									
								
								PDToolkit/@PDParser/PDParser.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								PDToolkit/@PDParser/PDParser.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| classdef PDParser | ||||
|     properties         | ||||
|         FilterSize = 100; | ||||
|         BlinkExtension = [10 10]; | ||||
|         WorkingDir = []; | ||||
|         QualityThreshold = 50; | ||||
|         MaximumBlinkSize = 150; %% ms | ||||
|         BaselineCorrection = 0; | ||||
|         Experiment = []; | ||||
|     end | ||||
|         | ||||
|     methods | ||||
|         function[] = import(varargin); end | ||||
|         function[] = importData(varargin); end | ||||
|              | ||||
|              | ||||
|     end | ||||
| end            | ||||
							
								
								
									
										25
									
								
								PDToolkit/@PDParser/import.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								PDToolkit/@PDParser/import.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| function[] = import(varargin) | ||||
| if nargin ==1 | ||||
|     if strcmp(class(varargin{1}, 'PDSession')); | ||||
|     end | ||||
|      | ||||
|     if strcmp(class(varargin{1}, 'PDSubject')); | ||||
|     end | ||||
|      | ||||
|     if strcmp(class(varargin{1}, 'PDExperiment')); | ||||
|     end | ||||
|      | ||||
|     if strcmp(class(varargin{1}, 'string')); | ||||
|         try | ||||
|             [base file ext] = fileparts(varargin{1}); | ||||
|             if strcmp(lower(ext), '.edf'); | ||||
|                 obj.readEDF(varargin{1}); | ||||
|             end | ||||
|              | ||||
|             if strcmp(lower(ext), '.asc'); | ||||
|                 obj.readASC(varargin{1}); | ||||
|             end | ||||
|         end | ||||
|     end | ||||
| end | ||||
| end | ||||
							
								
								
									
										19
									
								
								PDToolkit/@PDParser/importData.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								PDToolkit/@PDParser/importData.m
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| function[] = importData(varargin) | ||||
| if (nargin == 0) | ||||
|     if (isempty(obj.filename)) | ||||
|         error('Filename has not been set') | ||||
|     end | ||||
| else | ||||
|     obj.filename = varargin{1}; | ||||
| end | ||||
|  | ||||
| [base filename ext] = fileparts(obj.filename); | ||||
|  | ||||
| if strcmp(lower(ext), '.edf'); | ||||
|     obj.readEDF; | ||||
| end | ||||
|  | ||||
| if strcmp(lower(ext), '.asc'); | ||||
|     obj.readASC; | ||||
| end | ||||
| end | ||||
		Reference in New Issue
	
	Block a user