Contributing to the project

There are several ways to contribute to the project :

  • By reporting bugs (please include a short explanation and, if possible, copy-paste the error message)
  • By making suggestions for new features
  • By submitting new signal-processing or visualization functions (contact us for additional information)

Information for developers

In letswave (LW5), data is stored in two separate files (data and header).

The data is stored in a simple 6D matrix as follows : data(epoch,channel,index,z,y,x).

For a continuous 32-channel EEG recording containing 10,000 bins, the size of this matrix would be [1 32 1 1 1 10000]. For an epoched 32-channel EEG recording containing 15 epochs of 1,000 bins, the size of the matrix would be [15 32 1 1 1 1000]. The index, z and y dimensions are used for other types of data. For example, the index dimension can be used to store the different outputs of a statistical test; and the Y dimension can be used to the different frequency lines of a time-frequency transform, etc.

Information concerning the data is stored in the header structure, as follows :

  • header.filetype : string describing the type of data. In your case, this should be 'time_amplitude'.
  • : name of the datafile
  • header.tags : an array of tags
  • header.history : a structure containing a history of all that was done to the file.
    • history(i).description : the name of the applied process (using the name of the LW_ function)
    • history(i).date : the data when the process was applied
    • history(i).index : additional information such as the parameters used to perform the process
  • header.datasize : a vector containing the size of the dataset.
  • header.xstart : time (s) of the first bin of each epoch.
  • header.ystart : same for the Y dimension
  • header.zstart : same for the Z dimension
  • header.xstep : the latency (s) between two consecutive bins
  • header.ystep : same for the Y dimension
  • header.zstep : same for the Z dimension
  • header.chanlocs : a structure containing info about channels (same as EEGLAB)
    • chanlocs(chanpos).topo_enabled : set to 1 if the channel should be used for scalp maps
    • chanlocs(chanpos).X, .Y, .Z, etc : the location of the electrode
  • : a structure containing info about events (different from EEGLAB)

Optional fields

  • tags : a cell array with tags
  • events : a structured array containing information about events within the epochs, such as triggers.
    • events(eventpos).code
    • events(eventpos).latency
    • events(eventpos).epoch
  • conditions : a matrix of numerical values containing information about trials
  • condition_labels
  • filename_spl
  • filename_bss
  • fieldtrip_dipfit.hdmfile
  • fieldtrip_dipfit_mrifile

Because of these optional fields, it is recommended to pass the entire header of the input dataset to the header of the output dataset and, then, to change what needs to be changed.

For most signal processing steps, we have written two separate functions :
(1) a function that can be used in scripts, of the form : [outheader outdata]=LW_function(header,data,parameters);
(2) a GUI created using GUIDE which allows setting the parameters of the function, and apply it to several datasets, of the form : GLW_function(inputfiles); where inputfiles is an array containing the name of the LW5 datafiles to process.

The GUI function is called through the letswave interface. 

You can download here an example LW_function and GLW_function.
Finally, you can download here a sample dataset.