nevreader package¶
-
+nevreader.NPMK_dir()¶ NPMK_DIR ...
...Yimeng Zhang Computer Science Department, Carnegie Mellon University zym1010@gmail.com DATE : 21-Jul-2015 22:17:41 $ DEVELOPED : 8.3.0.532 (R2014a) FILENAME : NPMK_dir.m import nevreader.root_dir
-
+nevreader.add_rm_dependency(choice)¶ ADD_RM_DEPENDENCY add or remove java class dependency
Detailed explanation goes here
-
+nevreader.ctx2mat_new(file_name)¶ CTX2MAT_NEW convert cortex file to a matlab cell array. Based on Cortex Explorer 0.75 http://dally.nimh.nih.gov/matoff/cortex_explorer.html everything is preserved for each trial. Yimeng Zhang, 09/17/2013 Pittsburgh, PA
-
+nevreader.ctx_prune_criteria(scenario)¶ CTX_PRUNE_CRITERIA return the criteria for pruning ctx. Now only three rules; more can be added. Yimeng Zhang, 09/17/2013 Pittsburgh, PA
-
+nevreader.fix_CTX_file(CTX_file_name, trial_template)¶ - FIX_CTX_FILE fix CTX file.
- fix_time_count is a vector recording number of fixes applied to each trial. Yimeng Zhang, 09/17/2013 Pittsburgh, PA
return values. CTX_codes_new, CTX_times_new: fixed trial codes and times. rewarded_trials: index of all fixed trials. fixed_rewarded_trials: index of all fixed trials that are broken before fixing. reasonable_trials: index of all “reasonable” trials, that is, trials worth considering. false_rewarded_trials: index of trials that looks like a good trial before fixing. CTX_struct: the struct storing the content of the CTX file.
-
+nevreader.fix_NEV_CTX(NEV_file_name, fixing, trial_template, CTX_file_name, throw_high_byte)¶ FIX_NEV_CTX master function to read good trials from NEV file, with CTX file’s help if possible.
NEV_file_name: name of NEV fixing: do we run the fix routines, or just assume everything is fine... trial_template a protobuf class specifying the good trial template. CTX_file_name: name of CTX, leave it empty if you don’t have it. can be used for further debugging. throw_high_byte: throw higher byte when reading codes (each code is a 2 byte number, and only keep the lower byte).Yimeng Zhang Computer Science Department, Carnegie Mellon University zym1010@gmail.com DATE : 21-Jul-2015 21:19:27 $ DEVELOPED : 8.3.0.532 (R2014a) FILENAME : fix_NEV_CTX.m
-
+nevreader.fix_NEV_file(NEV_file_name, fixing, trial_template, throw_high_byte)¶ FIX_NEV_FILE fix NEV file based on a template.
...Yimeng Zhang Computer Science Department, Carnegie Mellon University zym1010@gmail.com DATE : 21-Jul-2015 21:42:48 $ DEVELOPED : 8.3.0.532 (R2014a) FILENAME : fix_NEV_file.m
-
+nevreader.fix_NEV_trial_TM(NEV_trial, trial_template_codes)¶ FIX_NEV_TRIAL_TM ...
fix a (NEV or CTX) trial by Template Matching. TM originally means timing file. and this function is originally designed to work with NEV files. however, it can work with CTX as well, since it only requires codes and times.Yimeng Zhang Computer Science Department, Carnegie Mellon University zym1010@gmail.com DATE : 21-Jul-2015 22:38:13 $ DEVELOPED : 8.3.0.532 (R2014a) FILENAME : fix_NEV_trial_TM.m
-
+nevreader.is_reasonable_CTX_trial(ctx_trial)¶ IS_VALID_CTX_TRIAL Summary of this function goes here Detailed explanation goes here
-
+nevreader.is_valid_CTX_trial(ctx_trial)¶ IS_VALID_CTX_TRIAL Summary of this function goes here Detailed explanation goes here
-
+nevreader.preprocessing_func(NEV_filename, preprocessing_params_path, template_path, CTX_filename)¶ PREPROCESSING_FUNC Summary of this function goes here Detailed explanation goes here
-
+nevreader.prune_ctx_trial_corentin(ctx_trial)¶ - PRUNE_CTX_TRIAL_CORENTIN Summary of this function goes here
- Detailed explanation goes here
remove spikes (with event code 1)
-
+nevreader.read_and_validate_json(json_path, json_schema_path)¶ READ_AND_VALIDATE_JSON Summary of this function goes here Detailed explanation goes here
-
+nevreader.read_preprocessing_params(import_params_path, trial_template_path)¶ READ_PREPROCESSING_PARAMS read preprocessing parameters for NEV/CTX files
Parameters: import_params_path – path to JSON file of import params Returns: [ import_params_java, isValid ]. second argument logical, whether import_params valid or not, first one being the java object of params ifisValid, and empty ([]) otherwise.
-
+nevreader.root_dir()¶ ROOT_DIR return directory of package root.
this is convenient for getting locations of various files in the package.
-
+nevreader.split_trial_NEV(nev_codes, starting_code, ending_code)¶ SPLIT_TRIAL_NEV ...
...Yimeng Zhang Computer Science Department, Carnegie Mellon University zym1010@gmail.com DATE : 21-Jul-2015 22:03:32 $ DEVELOPED : 8.3.0.532 (R2014a) FILENAME : split_trial_NEV.m now, we temporarily assume starting_codes and ending codes are scalars. next we have the problem of how to identify boundaries between trials. now I find trials by first finding a starting code and continue until I find a ending code. Yimeng Zhang, 09/18/2013 Pittsburgh, PA, USA must be scalar.