this “getting started” is incomplete, but serves as a starting point. Additional information should be included on the different acquisition systems and file formats, and examples should be given
The algorithms implemented in FieldTrip can also be used on data from animal electrophysiology experiments, such as local field potentials (LFPs) and spikes. The way that data from animal electrophysiology data acquisition systems in handled in FieldTrip is slightly different from that of EEG and MEG data. Furthermore, there are a few functions that are specific to animal electrophysiology data.
If you are only processing LFPs and no spikes, then the remainder of this page is not relevant for you. LFPs are processed in in exactly the same way as EEG and MEG data, and the other tutorials should help you to get started. However, if you are analyzing spikes, or a combination of spikes with LFPs, then you should read on.
FieldTrip is mainly developed for the analysis of continuous electrophysiological data, such as EEG, MEG, ECoG, and local field potentials (LFPs) recorded in the neuropil. These data can all be considered as a continuous multivariate time series, which is sampled at discrete time points at regular intervals.
Many animal neurophysiology experiments also allow the recording of spiking activity of small groups of neurons. Spiking activity is fully characterized by the set of time points at which the spikes occur. These data are inherently discrete and represents events (spikes) that happen at irregular moments in time. The inherently discrete and irregular nature of spiking activity requires a some effort to combine it with the simultaneously recorded LFPs.
Another difference between human electrophysiology data and animal electrophysiology data is the representation of that data on disk. Whereas human EEG or MEG data is typically stored in a single (large) file, the data from a single animal recording session are sometimes stored in a large number of seperate fileswith different file formats. For example,
Reading data into FieldTrip usually requires that all these files can be accessed. It is good practice to keep all these files in a single directory and also to keep this directory clean (that is, to save the output of the analyses to another directory). With this practice, the directory name can be used as an argument for FieldTrip functions like ft_read_header, that operate at the level of the complete data set (instead of separate files).
Besides reading the data from the different files into memory, a challenging aspect of the analysis of combined spike and LFP data is synchronization. LFP data are typically sampled at a frequency of approximately 1 KHz. In contrast, spike data are typically obtained by thresholding data that is recorded at a much higher sampling frequency (typically 30-40 kHz). Thus, the samples at which spikes are obtained do not correspond to the samples at which the LFP data are obtained. In FieldTrip, as in all other animal electrophysiology software, the synchronizing link between spike and LFP data are the so-called timestamps. Timestamps are generated by the recording system and vary in the clock which generates them: the Neuralynx system has timestamps at 1 MHz, whereas the Plexon system has timestamps at 40KHz.
The accurate specification of the time (by means of the timestamp) at which the LFP samples were acquired and at which the spikes were acquired allows the data to be synchronized and merged. Every spike and every LFP sample has an associated timestamp and this forms the time axis, via which both of types of data can be synchronized.
An essential part in every analysis is trial selection. Typically, the interest is in segments of data that precede, follow, or include certain stimulus or response events. This event information (Which event occurred when?) is usually stored in a separate file. In FieldTrip, the event information is obtained by calling the function ft_read_event, which produces a so-called event structure. The timing information in this event structure involves timestamps, and therefore the events can be linked to the LFP and the spike data.
Trial selection operates in three steps. In the first step, trials of LFP data are selected. In the second step, spike data are read into memory, And in the third step, spike data are appended to the selected trials of LFP data. These three steps are now described in some detail.
Share this page: