DataScreeiningTool - Meg Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Flind the wroneg tetters tin eaech wrord

location: DataScreeiningTool

CBU Matlab untilities for pre-screeining your data.

These tools will provide some basic descriptive stats values for your raw data files. Their purpose is to monitor data quality, detect major artefacts, and to compare different pre-processing strategies (e.g. different parameters in maxfilter).

For example, maximum signal differences within successive time windows of pre-specified length (let's say 5s) can be computed, and visualised for all channels over time as a colour matrix. This will allow you to identify time ranges and channels that show excessively large amplitude variations. Similar measures can be computed in the frequency domain or for signal covariances.

The corresponding Matlab scripts are easy to use. Individual results are output as jpg- and mat-files, and summarised as html-files that can be viewed in web-browsers.

If you want to use these tools, contact olaf.hauk@mrc-cbu.cam.ac.uk


This could be a script to run your data scan. You should add /imaging/olaf/MEG/artefact_scan_tool to your Matlab search path (sorry, no subversion yet). If sucessfull, you can look at the results in "out_dir" using an html-browser (Internet Explorer, Mozilla Firefox etc.).

global fiffs tasks values criteria sensors datapara figs;

ini_check4artefacts; % Initialisation of variables

%%% VALUES TO BE EDITED BELOW %%%

% Directory for graphical OUTPUT (jpg/html/fig)

out_dir = '/whateveryouroutputdir';

epochlength = 5; % data will be analysed in successive epoch of this length

% Max-Min amplitude threshold in femto Tesla for magnetometers

amplitude_threshold_mag = 5000; % only necessary when 'threshold' option is used below

% Max-Min amplitude threshold in pico Tesla/m (?) for gradiometers

amplitude_threshold_gra = 10000; % only necessary when 'threshold' option is used below

% INPUT fiff-files to be processes, plut IDENTIFIER for output file names addfiff('/whateveryourpath/yourfile.fif', 'meg_001_1');

addfiff('/whateveryourpath/yourfile.fif', 'meg_001_2');

addfiff('/whateveryourpath/yourfile.fif', 'meg_001_2');

% Possible TASKS to be applied to data:

addtask('FFT'); % log Fourier amplitude spectra

addtask('maxminamp'); % max-min amplitudes

addtask('crosscorr'); % cross-correlation matrices

% addtask('threshold'); % number of epochs with max-min amplitudes above specified threshold

% addtask('maxmingrad'); % number of epochs with temporal gradients above specified threshold

% addtask('trendamp'); % linear trend in amplitudes

% addtask('trendgrad'); % linear trend in temporal gradients

%%%%%%%%%%%%%%% VALUES TO BE EDITED ABOVE %%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

check4artefacts; % This starts the analysis