Skip to content

Documentation

Gabe Nespoli edited this page Nov 13, 2018 · 5 revisions

Below is a complete list of user functions that are included in PHZLAB, along with a short description of what it does. Documentation for each function is provided at the top of each file, and can be accessed using the links below. It can also be obtained from the MATLAB command window using the help command:

>> help phz_create

Tutorials on how these functions work together can be found the sidebar menu of this wiki. Also included are tips on writing custom scripts to automate much of your analysis. These tutorials together with the below function references comprise PHZLAB's documentation.

File I/O

These functions are used to create, save, load, and generally manage PHZ files.

  • phz_create: Create a PHZ structure from a data file.
  • phz_combine: Combine many PHZ structures into a single one.
  • phz_field: Change the values of certain PHZ structure fields (beta).
  • phz_load: Load a PHZ structure.
  • phz_save: Save a PHZ structure.

Processing

These functions perform some kind of processing to the data in the PHZ variable. The all add a field to PHZ.proc.

  • phz_blsub: Subtract mean of baseline region from each trial.
  • phz_discard: Remove trials marked by reject, subset, and review.
  • phz_epoch: Split a single channel of data into trials.
  • phz_filter: Butterworth filtering (requires Signal Processing Toolbox).
  • phz_labels: Add names to each trial of epoched data.
  • phz_norm: Normalize across specified grouping variables.
  • phz_proc: Apply many processing functions in one step.
  • phz_rectify: Full- or half-wave rectification.
  • phz_smooth: Sliding window averaging (incl. RMS)
  • phz_transform: Transform data (e.g., square root, etc.)
  • phz_reject: Mark trials with values exceeding a threshold or SD.

Analysis

These functions deal with selecting and summarizing data in various ways.

  • phz_subset: Mark data only from specified grouping variables.
  • phz_region: Keep only data from a certain time region.
  • phz_feature: Convert data to the specified feature.
  • phz_summary: Average across grouping variables.

Visualization and Export

These functions are used plot data in various ways, and to export data frames as csv files.

Specialty Functions

These functions are provided as utilities to help with tasks not directly related to PHZLAB per se.