Skip to content

Neuro-Mechatronics-Interfaces/NHP_MATLAB_Utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NHP_Matlab_Utilities

Note: this repo must be added as a submodule named +utils for most of the functions to work together properly. Matlab package containing miscellaneous utility functions such as file-transfer shortcuts or random math functions.

Install

You should be in the repository folder that is the parent repo of this submodule, which should be added as a MATLAB package (i.e. with the leading + in the name of the submodule folder). For example, add it to your workspace repository as:

git submodule add git@github.com:Neuro-Mechatronics-Interfaces/NHP_MATLAB_Utilities.git +utils

This will add the folder with the correct package name. Adding +utils to the end of the git submodule add command is critical for making sure the functions work together properly.

Contents

Filtering Functions

Math

  • interpsmooth - This function interpolates and smoothes a curve onto data points.
  • NEO - Returns the nonlinear energy operator (NEO) for signal X.
  • SNEO - Returns the smoothed nonlinear energy operator (SNEO) for signal X.

Parsers

  • tmsi_folder_2_datetime - Convert TMSi folder timestring to datetime.
  • tmsi_header_2_datetime - Convert TMSi header start_time field to datetime.
  • parse_artifact_sync - Outputs a vector of trigger events that match up with logic parsed from a threshold set under the assumption that the input is a vector with large stimulus-related artifacts in it.
  • parse_date_args - Parse date input arguments.
  • parse_bit_sync - Outputs a vector of trigger events that match up with the bit value from sync_bit. Accepts either a struct or vector.
  • parse_parameters - Parses input parameters given a default struct.
  • parse_polybench_data_manager_notes - Parse notes taken in Polybench Data Manager.
  • parse_uevt_trials - Parse table from io.load_uevt, identifying trial metadata.
  • parse_xml - Convert XML file to a MATLAB structure.
  • parse_xy_grid_vec - Parses xy grid to encapsulate values in x and values in y.
  • parameters - Return parameters struct, which sets default values for things like epoch durations etc.

Handling NML Data Structures

Typesetting and Formatting Text

  • showModelInfo - Print model info and optionally make figure for covariances.
  • contents_report_2_markdown - Convert Contents.m MATLAB index file into formatted Contents for README.md.
  • fixCase - Fixes the input string so first character in string is capitalized and rest are lower-case.
  • get_tmsi_stim_data - Return stim data specifically for TMSi blocks.
  • print_model_info - Prints sfit object model coefficients in Command Window, or to a text file ID (if specified).
  • pattern_name_to_metadata - Helper function to convert pattern files to metadata struct.
  • save_figure - Exports figure in desired file formats, creating output folder if needed.

About

Miscellaneous utilities that help handling data in MATLAB.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages