What is TSlib

The TSlib toolbox contains a suite of MATLAB functions and Graphical (GUI) tools for organizing and analyzing collections of time-stamped experimental data. Time-stamped data (tsdata) is a two columned matrix in which the first column is a time stamp and the second column is an integer event code that signifies what event occurred at the given time. The time stamp is a positive number in arbitrary units. The event code numbers must be positive integers and may range from 11-99999. Variables names (event code names) can be associated with the event code numbers to make it easier to refer to them. One file of tsdata is referred to as a session. Groups of sessions are associated with a subject and together these subjects and their associated sessions form an experiment.

Each session of tsdata gets loaded from a file that is created by ones experimental system. These files contain the tsdata and additional information about that session such as which subject was run, what time it was run, etc. The TS system supports a number of file formats. In conjunction with TSlib, a system has been developed that creates session files from Med-PC programs (ref).

 

Library of TS Routines

Creating, Loading and Saving Experiment Structures
TSinitexperiment - Creates a new Experiment Structure
TSloadexperiment - Loads an Experiment Structure mat-file
TSsaveexperiment - Saves an Experiment Structure to mat-file
TSbegin - Leads the user through the process of creating and experimental structure

Loading Session Data
TSloadsessions - Loads in MED-PC data files
TSsetloadparameters - Sets several loading parameters
TSsetoverwritemode - Sets the overwritemode value
TSsetdata - Sets the active data

Creating trials
TSdefinetrial - Creates a trial definition
TSsettrial - Sets the current trial

Creating statistics
TSapplystat - Applies statistics to all places in the Experiment
TSsessionstat - Applies statistics to sessions only
TStrialstat - Creates trial statistics from definitions and function
TScombineover - Creates statistics at a higher level by combining lower data
TSlimit - Limit what data groups are active

Working with Experiment structure
TSmatch - Searches TSdata for matches to given code combinations
TSparse - Parses TSdata matches and evaluates mcode against them
TSedit - Modifies or inserts TSdata codes found by matching

Handling Event Codes
TSdeclareeventcodes - Call this to declare the event codes as global and use them
TSimporteventcodes - Imports a text readable list of codenames and values
TSexporteventcodes - Exports event codes from the Experiment to a text file
TSsetdefaulteventcodes - Sets the TSlib default event codes when no Experiment is loaded
TSaddeventcodes - Adds one or more event codes to the current Experiment
TSrmeventcodes - Removes one or more event codes from the current Experiment

Special Plotting Functions
TSraster - Creates a raster plot of Time Stamped Data.

Gui Tools
TSexperimentbrowser - General browsing tool for the Experiment
TSrastergui - GUI interface to TSraster, makes raster plots

Miscellaneous
TSrmfield - Recursively removes fields from the structure
TScheckconsistency - Checks the consistency of the structure.

Installer/Updater
DownloadTSlib - Download a copy of TSlib
UpdateTSlib - Updates installed TSlib to the most curren version