This site is a work in progress.
When you write a script to analyse your data, you'll need to tell MATLAB which files you want to open and where they are. You can make your life and code a lot simpler, If you:
name your files consistently, and
have an organised folder structure for storing your files
In my opinion, a good file name (1) contains sufficient identifying information about the dataset and (2) expresses this in a consistent way. What you should include exactly, depends on the complexity of your study.
In the most simplest form (let's say you had a single-group design), the file name could contain just the Participant ID code (e.g. P001ML29).
My formula for creating Participant ID codes is: Participant Number + Gender + Dominant Hand + Age
'P001ML29' - stands for participant number 1, Male, Left-Hand Dominant, 29 years old.
Start with a letter - 'P001FR09' and not '001FR09' - I think EEGLAB doesn't like file names that start with numbers.
Have the same length- 'P003FR09' and 'P010MR25' are the same length, but 'P3FR9' and 'P10MR25' are not.
You could also put the study name to avoid getting mixed up between studies (e.g. P001ML29_forceP3) - but I don't because it makes your file names long and it's not necessary if you're data is stored carefully.
If your study design is more complex, for example, if each participant does multiple sessions, or you have a separate group design, additional identifying information should be included in the file name, separated by underscores. The file extension should be unchanged.
For Multi-session: Participant ID + Session = e.g. P001ML29_S1, P001ML29_S2
For Multi-group: Participant ID + Group/Condition = e.g. P001ML29_contr, P002MR30_treat
Make sure the group/condition label has the same number of characters (contr and treat are both 5 characters long)
For Multi-session + group: Participant ID + Session + Group/Condition = e.g. P001ML29_S1_contr, P001ML29_S2_treat
Other rules for consistency:
Use consistent spelling for each groups/condition - if you want 'contr' to represent the control condition, make sure you use that throughout. It doesn't matter what you use, just do it consistently.
Capitalise consistently
Only use letters, numbers, and underscores - avoid other characters, especially spaces.
Create a Project Folder - Create a new folder for your project and give it a name (e.g. P300_force_study)
Create Sub-folders - Inside of your project folder, create some more folders for your data, code, plots, manuscripts, and other documents.
This is how I organise my project folder. Feel free to create more folders if you have a group of files that don't fit in nicely to any of these folders, or delete folders that are not relevant to you.
Project_folder
data
raw_eeg - store raw EEG data and nothing else
processed_eeg - store processed EEG data - the output of the pre-processing MATLAB script
behavioural_data - store behavioural data - I have an excel sheet that contains trial-by -trial data for each participant for trial-type, RT, accuracy etc.
exported_data - stores any summarised outputs from the processing script which are ready for statistical analysis
code
experiment_code - store code used to run the actual experiment, with stimuli files
analysis_code - store MATLAB and R code for pre-processing and statistical analyses
plots
individual - stores individual waveform and scalp map plots - if you choose to do this- I find this is a quick way to identify problematic data
grand-average - stores waveform and scalp map plots averaged across all participants - useful for giving an overview of the data
manuscript
figures - to store task diagrams and finalised result plots
submission - to store submitted versions of the manuscript, cover letters, separated abstract and highlights
revision - to store revised manuscript, and response letter to the editor and reviewers
other_documents - storing files like consent forms and information sheets
Put the raw EEG data files in the data > raw_eeg folder
Don't put anything else in this folder - this way you can tell MATLAB to loop through all the files in this folder.
Ok, now we are ready to start writing some code!