1€¦  · web viewthe scripts are written in matlab, a widely-used software for technical...

40
1. General remarks......................................................................2 1.1. The IBB Staff – Who is who? …does what? … will help you?.........................3 1.2. Further References...............................................................3 1.3. Rooms and resources..............................................................4 2. Data reduction.......................................................................4 2.1. Downloading the Data.............................................................4 2.2. Average..........................................................................5 2.2.1. Loading the data............................................................5 2.2.2. The ERP Module for preprocessing and averaging..............................7 2.3. Export BESA-EMEGS...............................................................11 2.3.1. Exporting Averages from BESA...............................................11 2.3.2. Exporting sensor positions from BESA.......................................12 2.3.3. Importing sensor positions to EMEGS........................................12 2.3.4. Importing averages into EMEGS..............................................12 2.4. Grand Mean......................................................................14 3. Data analysis.......................................................................14 3.1. Sensor correction...............................................................14 3.2. First visual analysis with EMEGS2D..............................................15 3.2.1. Loading Files..............................................................15 3.3. L2-Minimum Norm.................................................................17 3.4. Samplewise ANOVA................................................................19 3.4.1. Why samplewise ANOVA ?.....................................................19 3.4.2. Menu navigation............................................................20 3.5. Selection of sensor groups......................................................22 3.6. ANOVAs for time-intervals and sensors of interest...............................23 4. Supplementary Information...........................................................23 4.1. Epoch-wise data recording.......................................................23 4.2. Transferring your rawdata from Megserver........................................24 4.3. Installing the latest emegs version.............................................24 4.4. Control of headposition.........................................................25 4.5. The CTF File formats............................................................25 4.6. Defining Time in EMEGS und BESA.................................................26 4.7. F-values........................................................................27 4.8. Batch-driven file renaming......................................................28 4.9. Generating Batchfiles...........................................................28 4.10. Execution of EMEGS Scripts under MATLAB........................................29 4.11. Graphics in EMEGS..............................................................29 4.11.1. Correct Usage of Graphics.................................................29 4.11.2. Making graphs with the GUI................................................33 4.11.3. How to export figures.....................................................34 4.12. Preprocessing with EMEGS.......................................................35 5. References..........................................................................38 1

Upload: others

Post on 28-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

1. General remarks........................................................................................................................................21.1. The IBB Staff – Who is who? …does what? … will help you?...............................................................31.2. Further References.............................................................................................................................31.3. Rooms and resources.........................................................................................................................4

2. Data reduction...........................................................................................................................................42.1. Downloading the Data........................................................................................................................42.2. Average..............................................................................................................................................5

2.2.1. Loading the data.........................................................................................................................52.2.2. The ERP Module for preprocessing and averaging......................................................................7

2.3. Export BESA-EMEGS.........................................................................................................................112.3.1. Exporting Averages from BESA.................................................................................................112.3.2. Exporting sensor positions from BESA......................................................................................122.3.3. Importing sensor positions to EMEGS.......................................................................................122.3.4. Importing averages into EMEGS................................................................................................12

2.4. Grand Mean......................................................................................................................................143. Data analysis............................................................................................................................................14

3.1. Sensor correction.............................................................................................................................143.2. First visual analysis with EMEGS2D..................................................................................................15

3.2.1. Loading Files.............................................................................................................................153.3. L2-Minimum Norm............................................................................................................................173.4. Samplewise ANOVA..........................................................................................................................19

3.4.1. Why samplewise ANOVA ?........................................................................................................193.4.2. Menu navigation.......................................................................................................................20

3.5. Selection of sensor groups...............................................................................................................223.6. ANOVAs for time-intervals and sensors of interest...........................................................................23

4. Supplementary Information.....................................................................................................................234.1. Epoch-wise data recording...............................................................................................................234.2. Transferring your rawdata from Megserver......................................................................................244.3. Installing the latest emegs version...................................................................................................244.4. Control of headposition....................................................................................................................254.5. The CTF File formats.........................................................................................................................254.6. Defining Time in EMEGS und BESA...................................................................................................264.7. F-values............................................................................................................................................274.8. Batch-driven file renaming...............................................................................................................284.9. Generating Batchfiles.......................................................................................................................284.10. Execution of EMEGS Scripts under MATLAB....................................................................................294.11. Graphics in EMEGS.........................................................................................................................29

4.11.1. Correct Usage of Graphics......................................................................................................294.11.2. Making graphs with the GUI....................................................................................................334.11.3. How to export figures.............................................................................................................34

4.12. Preprocessing with EMEGS.............................................................................................................355. References...............................................................................................................................................38

1

Page 2: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

1.General remarks

This Tutorial was initially meant for providing external graduandts and doctoral candidates an iIntroduction into the use of the most frequently used technique at the IBB. In particular, it was meant to guide them through the procedure of data evaluation. Since the lager proportion deals with our in-house software EMEGS, the manual also got interesting for researchers not being affiliated to our institute but using EMEGS. For better overviewwiev, informations that are only useful for our doctoral candidates or undergraduates are highlighted in grey. Other passages are of general interest.

Issued here are qQuestions such as “what do I have to click on in order to …?” Questions that remain open here may be asked to the staff anytime and without hesitation (see paragraph 1.1).

The tutorial guides through the data evaluation chronologically. General explanations that pertain several stations are outsourced to appended chapters and referred to if appropriate. This avoids redundance. Besides, further background informations isare given there, that are not mandatory for the progress, but enhance insight. The mere execution of work stages by just following the instructions does not require this insight.

Here, we describe the most common manner of data processing , which is appropriate for 90 % of study designs. We assume that you recorded MEG- but EEG-data, too. In general this does not make much difference. However, in case you process EEG data, check for the plausibility of our suggestions. In some cases, it may be advisory to ignore our suggestions.

Primary beginners knowledge on MEG or EGG as imaging techniques in general are a prerequisite. As to that, the IBB offers both official and informal courses. Who feels lost there is not the only one … don’t panic and hold on attending them. You grasp more than it feels like subjectively, and progress will accelerate from a certain point coming soon. Besides, not all the information is crucial. Dare asking frequently, too!

As an introduction, we suggest Luck (2005), which has the best choice of topics and degree of details and a comprehensive writing. Another suggestion for reading is Seifert (2008).

This tutorial has some gaps, that shall be filled as time goes by. Besides, our technical setup changes occasionally. To make/keep this manual up to date, we need your suggestions. Ideally, you write them as comments into the manuals electronic version, whenever you encounter obscure or outdated passages during your work along it. Please write them into your local copy that you downloaded from biomag.uni-muenster.de and send us the copy back when your project is finished.

At present, the tutorial starts with the analysis of the data already recorded. Prior steps like writing a PRESENTATION script or an CTF runtime protocol are not addressed here.

1.1.The IBB Staff – Who is who? …does what? … will help you?

Helga Janutta. She will provide you with a key to the Room 027, the graduands'(? :-) ) office. Books from the institute’s library. She maintains an updated email and calling list of the staff and can enrol you into our mailing list. A schedule of the institutes courses and colloquia is also available.

Page 3: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Andreas Wollbrink. He can give you administrator privileges on your computer, which you will need frequently. Specifically, BESA will not work properly without them. Andreas is concerned with all technical devices, computer troubleshooting (Our engineer “Scotty” on board).

Markus Junghöfer. He is the author of the applet EMEGS, which he constantly evolves, and which does not have an immersive help file so far. For the most common tasks in EMEGS, there is the present tutorial. Some help files are included in the progeram folder, too. For the remainder, you may refer to him. He also provides a frequent tutorial on EMEGS. Do attend to it! To get aware of the respective dates, just let yourself be enrolled in his mailing list.

Marcus’ doctoral candidates , which already got familiar with EMEGS, are always accessible and can help you out in most cases. Before addressing Andreas or Markus, ask them first. If the do not know either: see above. Not all the staff is used to EMEGS or BESA, which in turn you will use predominantly. We purchased a lot of alternative software, too. For EMEGS, ask Markus an his coworkers.

The technicians have a database of subjects, in case you want to know some demographical facts about them. The also deliver blank DVD.

Find the calling number, mailto and and a “wanted” photo of our staff members on http://biomag.uni-muenster.de/mitarbeiter/index.php.

1.2.Further References

The EMEGS-Meeting , being held twice a month, in which all Qquestions concerning MEG-Data evaluation may be addressed. The topics are your choice or, in case no questions are forwarded, chosen by the lecturer.

Some individual Mailinglists. It is advisory to send your email address to all members of Markus team. Meetings are frequently cancelled or altered in purpose last-minute.

The EMEGS User Mailinglist. EMEGS ist the data proceassing program that you will use predominantly. New functions in updated versions or recently fixed bugs are announced by the developers via this mailing list. Users post questions to their problems that may be yours, too. Unless you are affiliated to the Institute for Biomagnetism and able to ask us directly, this is an option for you to send your questions to us. Replies rarely take more than a few hours. In case you are affilliated to the IBB it may be more convenient to ask us directly. You may subscribe the list on https://lists.sourceforge.net/lists/listinfo/emegs-user

1.3.Rooms and resources

The student assistants ' office is in the basement of the institute of experimentalAudiology, room 027. Here, you will find a computer with a DVD R/W drive and a desk.

EMEGS is an application for MEG/EEG- data evaluation written by Markus. No matter wheather or not it is already installed on the computer at hand, install and use it in your individual folder! See Paragraph 4.2..

Software from third party manufacturers, of which the institute has purchaeased a license, is stored in the office of Andreas and Thomas (Room 10). There is a closed shelf opposite to the window.You will need:

BESAMATLAB

Page 4: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Occasionly driver for pPrinters and the likeHowever, in most cases, the software is already installed by previous users of the respective computer.

2.Data reduction

2.1. Downloading the Data

The technicians store for each of your subjects and for each run a so called dataset folder including quite a lot of files, which is generated by the recording device (the CTF). All of your datasets are stored on Megserver in the full path /data/megserver1/[Your Name].proc/[Title your Study]. Here, you’ll find folders named by the ID of the subjects. For further evaluation, download them to your local drive. You will need quite a lot of storage, a disk of ~30 GB may be required, pending on your study. If there is a lack of storage capacity at your workstation, there are two options:

- Download and process the data subject by subject. After calculation of the averages (see Paragraph 2.2), they are much smaller. Local copieys The continuous data (files with extension *.meg4) may be removed thereafter.

- Borrow an external hard disk device from Andreas.You should avoid altering data on Megserver in order to keep an untouched version thereof. Data on Megserver are deleted after some time, but you receive a warning mail in advance. Besides, the technicians keep a Backup on DVD.

2.2. Average

You can either do the data reduction with BESA or with EMEGS. Data processing via EMEGS up to now requires some study-individual programming of a preprocessing script in MATLAB. This has to be done by Markus and will take some three hours to three days – pending on the complexity of your design. The advantage of this option, however, is a more sophisticated data preprocessing. Moreover, the data will allow for analysis on trial basis. However, to get it done without Markus assistance, BESA is the only option. If you choose the EMEGS, please jump to the appendix section 4.12 and then continue reading section 3. If you chose the standard Option BESA, just continue here.

We presuppose that data are continuously recorded (See Section 4.1).BESA should be installed in the latest version on your computer.

Page 5: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

2.2.1.Loading the data

Start BESA > Browse to a dataset folder > Open the file with the extension *.meg4

Some querieys appear, here are the correct answers:

1st WindowCheck: „Treat simulataneous markers in .... as single event“Check: „Data recorded continuously“ (Irrespective of whether they are.)

2nd Window:There is nothing to insert. Check whether the number of trials found for each condition is according to your number of trials in the experimental setup. Deviations even by just one may not be tolerated without knowing the reason.

3rd WindowDefine head centreCheck: „Head center midway between left and right“Check: „Display Besa coordinates“Check: „Ear fiducials used earplugs“ (in general, the former two are already checked by default)

4th Window: Channel and digitized head...Commonly this is all right, as indicated by the green checkmark

If an error warning 'Can´t read index files' occurs, you do not have administrator privileges. Ask Markus's doctoral candidates to provide you with an according account.Preliminarily, you can ignore it and continue working, the problem does not impair your computation. It may be bothering in the long run, however.

Assure, that the noise reduction in your data is correctly chosen. This is the case, when the value for CTF-Order 1 is set to 1. See the below screenshot. It depicts a correct setting.

Page 6: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

If your data recording included a polhemus scan, you should also include according *.sfp-file, checking the radiobutton “Digitized head surface points”

(Note: The *sfp should be in the folder level above the single recording runs. Since it is altered by BESA and since it is required for all individual recordings, do not put it into the subfolders for individual runs.

2.2.2.The ERP Module for preprocessing and averaging.

Choose „ERP“ form the menu bar and click „edit paradigm“. A window with several tab appears. Insert the below settings:

Tab: TriggerHere, you see your triggers and their naming. In general, the definition of further attributes is not useful.

Tab: Condition:How complex your settings are here depends on the complexity of your design. Any choices you make her should be double-checked. Under adverse circumstances, you will cause fatal coding errors either distorting or eliminating all of your study’s results. Such coding errors will mix up conditions or shift the labelling of single

Page 7: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

epochs by one. Lacks of significant effects or results reversed to your hypothesis are common in research, however, so you will not get aware. How to check for such errors is explained below.

Technically, what is happening here is:When opening an *.meg4, you look upon your continuous data. They do not

yet provide information on the timing of your stimulus onsets. Averages, however, are calculated “time-locked” to your stimuli. During the recording in the CTF, there were visual triggers sent, the respective records received provide information about the actual onsets. (Pending on the modality of your stimulation, it may as well be an acoustical but visual trigger. Technically, there is no difference to our visual example). These informations on time points are given in the editable *.mrk file.

In experimental designs, it is quite common to present different categorieys of stimuli, say, green squares and red circles. Merely by means of the triggers, they are indistinguishable.

Therefore, along with each Trigger, a so-called portcode is sent in close temporal proximity. Portcodes can take on values in a [1:255] range. Thus, they may be used to tell stimulus categories apart. They are, however, related with the stimuli with far less temporal accuracy.

Irrespective of other terminologies, such as in the BESA help, here, we will call the visual signal for timing purposes trigger as opposed to the portcode marker for identification purposes. Tag will be a collective term for both.

Now you want to average the data time-locked to the triggers and separately for different markers. Therefore, you define logical conditions like “A visual trigger, succeeded (or preceded?) by a marker, which in turn has the value xy.”. Later on, individual averages will be calculated for all those epochs, which match according descriptions.

Close the ERP-manual temporarily. Since you did not edit any changes so far, there is nothing to save.

In the status bar of the main window, you see a timeline, displaying your tags as black strokes on a gray background. Here, the recording run is depicted at full length. Above, there is an area showing your MEG-Data as purple plots, just a few seconds of it. There is a button on bottom right corner to alter this time range. Choose a segment of the whole recording run by left clicking on the grey timeline.At the lower border of the area, your tags are shown as '⊥'. Each tag is labelled with a code number and a name. The code is printed right hand to the tag, to see the name, right click on the '⊥'. In general, you will find closely adjacent pairs of tags, referring to a common stimulus. Check, whether the marker precedes or follows the trigger.

Now open up the ERP menu and choose the tab condition. Type a name for each condition in the field ‘name’ and compose an according condition via the Boolean functions. ‘Name’ will be used as a label for the average to be saved later on. So choose a concise and meaningful one.

Page 8: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

In the Boolean functions, you will commonly choose the trigger firsthand (e.g. current name is acoustic trg > insert). It is important to use the trigger as current name. This will be your point zero in time later on. The markers, as already mentioned, have only a rough temporal relationship to the stimulus. To closer restrict your definition, choose with AND one of your tags that precede/follow up (in case there are some more you will have to use the brackets for combining them. In this case, click on ”and”, “or”. The combination will be displayed comprehensively. With the field ‘attribute’ you may choose the code or the name of the tag for the logical term. Do not use the code.

Initially, we mentioned the risk of coding errors. This danger increases along with increasing complexity of your design. The same holds for the complexity of your tag labelling.A likely scenario of error: You define markers and preceding tags, but in the experiment, these tags follow up. Now your marker will be associated with the preceding epoch, and this holds for all epochs in the recording. To be on the safe side, additionally define a short time lag of marker and tag (Field: attribute>interval). Portcode and Trigger of the same epoch rarely deviate by more than 40 msek.

Alternatively, you may count whether the number of epochs found is according to your experiment (Window: condition, column: count). Do not ignore even minor deviations. Besides, there are always several options to define your conditions. For instance, in case other conditions are already defined, via attribute>condition. Check these other options for similar results.

Tab: Epoch:Averaging Epoch: –500 to 800 (as an all-purpose suggestion)Baseline Definition: -200 to 0Artifact: Rejection: -200 to slightly more than your time of interest.

Page 9: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Important: Assign to all!

Tab: Filter:

The filter settings are pending on your interest and a matter of debate. A common selection is 0.01Hz (low cutoff) and 48 Hz (high cutoff). The stronger your filter, the higher the risk of distorting data (see Luck, 2005). A low cutoff is mandatory anyway. It is advisory to set this filter only. If too few epochs are considered artefact free in the next step to come, you may still add the high cutoff, too. As opposed to low cutoff filters, high cutoff filtering may also be postponed to the processing of the averages, so omitting it is not wholly irreversible. Once filtered before averaging, a change of filter settings will require a repetition of all work stages starting from here.

Note that these recommendations are a subjective view in a topic, where every new advisor will suggest you something different.

Save the paradigm as a *.pdg. A prior version of this manual recommends reusing the same paradigm for all subjects. Given a known problem in BESA, this may lead to fatal coding errors. If you are not familiar with this problem, define an individual file for each recording run.

Tab: Artifact:Select: MAG, check: Ampl, with a value of 3000 (in both the left and right field, Point-to-Point 800). Note that this manual describes the processing of MEG but EEG data. For EEG, check also the “Low Sig” criterion.

Click: “Scan for advanced selection” This may take a while. If you now click on a pixel column, you will be presented with the according trial in the continuous data. For trials being rejected as compromised by artefacts, here you can check for the reason. Throughout the process of data reduction, such spot tests are better than just batch processing everything and blindly relying on the algorithms.

Tab: AverageHere, you should see your conditions, which are marked with an “x” and are subject to the constraint A. Before clicking “Average”, ensure that your relevant conditions and only those are listed in “current selection”

Now click „Average“. Accept the suggested names and folders for saving your averages. That´s it.

The settings made so far may be saved in a template file with the extension *.pdg. This is a good documentation for what you have done later on. For the same reason accept the suggested names. It is possible to define this file for your first subject and recycle it for the remaining ones. We discourage this, however. The reason for this is a problem pertaining the data import from CTF to BESA. You should define an individual *.pdg for each run (using the same choices, of course). If you have too many too complex conditions, such that this in no more affordable, contact us before continuing.

Some hints: From the very beginning on (data collection) until the end (final statistics), maintain a spreadsheet of your subjects and recording runs. Any exceptions and characteristics (The subject having impaired vision, mistaking instructions, technical trouble with data acquisition) should be recorded here. Note also how many trials BESA accepted for your conditions and runs. You will need these informations later on to judge the quality of your data. In particular, you will get aware of noteworthy differences in the ratio of rejected trials.

Page 10: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

2.3.Export BESA - EMEGS

The export comprises four steps: Exporting the averages from BESA, exporting the sensor positions from BESA, and accordingly importing both into EMEGS. It is important to use a stable version of EMEGS. Instructions for the download are given in section 4.3. Any user should save its own local copy of EMEGS and use only this one throughout the processing. An individual search path for MATLAB is also required. Therefore, save the file pathdef.m in an account specific folder. Ensure, that MATLAB actually uses this pathdef.m and not a similarly named one in the startup directory. The latter is shared by for all users of your computer.

2.3.1.Exporting Averages from BESA

The averages are stored in files named *.fsg. Such a file can also contain averages of different conditions. Open such a *.fsg with BESA and convert it via >File>Export>check: ascii multiplex, the remaining checkboxes: default.

Files of four different types were exported. Delete three thereof: *.elp, *.pos and *.sfp. They contain wrong information, which may impair further calculations. Similar files with correct information will be obtained via step 2.3.2.

Since you have several runs and subjects, manually exporting each in the above manner is cumbersome. The options for batch processing in BESA are limited in general, however, batched export in particular is possible:Process > Batch ScriptsThen:- File List: Just drag and drop files from the explorer or another file browser. Using the search function to scan for file extensions beforehand is helpful.- Batch: Add Command – Export- Under “select options”, check ASCII multiplexed, the remainder as default.- In the string „Target file name mask” delete the substring “-export”.- Confirm with OK (and save the batch script).- Click on OK and start the export. This will take some time.

2.3.2.Exporting sensor positions from BESA

The *.fsg are still loaded in BESA. Select: File > Head surface points and sensors > Save all files in Device Coordinates. (Not Head Coordinates, which may quickly be messed up). A number of files are exported now. They are all equally named but have different extensions. Delete the substring “_DC” from all names. A useful tool to do so is the freeware JOE.So far, BESA does not provide the option to do this export batch driven.

2.3.3.Importing sensor positions to EMEGS

One remark before doing the import: EMEGS occasionally fails handling overly long file names and –paths. This is all the more trappy, as it gives no error warning in such cases, but possibly overwrites files without notifying the user. It is advisory to move the folder with the datasets into a shorter path. Files names should be cut short to the necessities. Filenames provide information on the name of the study, run, condition, date of recording and subject ID. It is clear what may be missing

Page 11: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

thereof. Since EMEGS takes the names into account to associate corresponding files of the same dataset, it is mandatory to rename all files needed in a similar manner.

Now open an arbitrary *.elp-file with a text editor. Each line represents a sensor. The largest proportion are MEG-sensors. These are lines starting with “MEG”. Write a note the first and the last line number of this section. Do so once for the first and the last subject of your sample. In case the line numbers of meg-sensors do not match between both, address us before continuing. Since this is a rare case and the workaround tricky, we will not detail it here.

Now start pos2pmg.m in MATLAB (see Section 4.10). Load all files to be processed into the filematrix (for how to load file matrices, see section 4.9). Note: Click “Head” but “Device” ! Yes, you exported data in device coordinates … just don’t care.

2.3.4.Importing averages into EMEGS

Starte besa2scads.m.Now a number of prompts appear:

besa format: mulbesa version: segment name (3)EEG or MEG-Data: meg dataspecial sensors: The default ist [33: 307]. Check, whether this is according to the

line numbers you noted (see above). If not, rather insert these noted line numbers. Did you already check, that the line numers of the first and last subject measured are identical?

N conditions: The multiplex files contain several averages per file. How many, that depends on your design. Insert this number her. You may open one of your *.fsg in Besa and look it up, in case you are insecure.

Insert N of Trials You probably noted the numbers of trials that contributed to the different averages in BESA. In case these numbers are approximately equal, there is no reason to care about them. Click ”No” and skip reading the remainder of this point.In case they do deviate from each other considerably:The exported *.mul do no more contain information on these numbers. Therefore, here is the opportunity to insert them manually, by looking them up in your records. What is to be entered are the absolute numbers, but the percentages. If you want to maintain the option to take artefact proportions into account later on, you may click “Yes” and accept the effort to do so. You will soon be prompted to insert the numbersIn case you are in a hurry, you may neglect this. The standard procedure, as described here, does not take this information into account anyway.

Sampling Rate Occasionly, there is this error warning that rounding errors yielded an erroneous sampling rate. The correct one is commonly 600 Hz. You can look it up in the *.hist-Files of the datasets. This prompt does not always appear.

Trigger Point Here, you have got to insert the sample point of your epochs that represents the stimulus onset. See section 4.6 for details.

Now load all files to be processed into the file matrix (see section 4.9 to read more onfile matrices).

Page 12: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

The averages that were bundled in one *.fsg per recording run are now split into single

files with the extension #.at. “#” represents the serial number of the condition in the former *.fsg. Open up such an *.fsg in BESA. You will see your averages as columns,

thenumbering runs from left to right. Since now your conditons do no more havecomprehensive labels, but numbers, take care not to mix them up. It is also worth theextra effort to check whether the order of conditions is the same for all *.fsg. It takes five minutes more and may avoid nasty coding errors.

2.4.Grand Mean

This may be a useful option in case your abovementioned trial numbers per average are highly variable. Otherwise, grand mean signals are also calculated as a by-product of the pointwise ANOVA (see section 3.4). This is much more convenient. That is, in general you may skip this whole section.

Now all the data of several subjects but the same condition are averaged. For a statistical analysis, there is no immediate need to do so. However, it is necessary to make a choice of sensors and time intervals of interest prior to this analysis. Besides, it is required for graphics and plots on a grand mean basis. In sum it is required for all kinds of visual-graphical analyses.

Start EmegsGrandMean.m Click >open data files and load a filematrix with all runs to be averaged (e.g. all *.at1 files in order to grand average the frist condition). All defaults can be left unchanged except for „NoWeigthing“. Use „TrialNumberWeigthing“ instead. The ‘Trigger point in data set’ (that is, the stimulusonset) shoult be determined correctly, if it was inserted during the import of the *.mul. ‘Minimum’ and ‘Maximum Baseline’ have to be defined in terms of sample points, but milliseconds (see section 4.6). A common recommendation is [-200, 0] msek relative to the stimulus onset. The target folder for results may be specified via ‘set result path’. Confirm all settings via > ‘calculate grand mean’. A standard name for the result file is suggested. For the sake of better overview, accept it: “GM.w2.n1.[name.extension]”. GM means grand mean, w2 means active trial number weighting and n1 the lack of a normalisation of the data. [name.extension] is identical to the batch file used, for documentation purposes, store the batch file along with the result file.

A window with the RMS-Plots of the individual runs appears. Here, you can check for exceptions in the appearance of the data that may arouse your suspicion. In case you are unfamiliar with MEG/EEG data, do not worry about a highly individual morphology of the plots, however.

The plot may also be saved as a *.fig file for later usage in your manuscript or just for documentation. You are using a windows operating system and the graphics window is lacking a menu bar? Press [Alt]+[Space] > M and shift the frame with the cursor keys downwards. For a language setting other than English, a letter other than “M” (“move”) may be used.

3.Data analysis

3.1.Sensor correction

For an analysis in sensor space, a correction of sensor positions is required. For our standard analysis in source space, you should on the contrary avoid it due to the slight inaccuracies it yields. In general, there is no urgent reason to prefer a

Page 13: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

sensor space analysis. For the remainder, we will just refer to source space analysis. If you need the other option for some reason, just contact us.

3.2.First visual analysis with EMEGS2D

Emegs2d.m is a viewer for averages, grand means and source estimates.It is explained in the EMEGS help, see [your emegs program folder]\emegsHelp\ twodvisualization.html. Some of the most important operation procedures are explained here. What holds for the remainder is: Just accept the default settings, if they are not mentioned here. The variety of menus and parameters to choose is confusing in the beginning. Really needed is only a small fraction thereof, and those are all mentioned here.

The present stage of your processing would allow for a first glance at your data. If you are frustrated, in need for a sense of achievement and want to see some results but buttons and checkboxes, you may refer to section 4.11. This step may as well be postponed, however. For didactical reasons, we only mention some general issues on the viewer in the next section.

3.2.1.Loading Files

Here, we give an excourse how to load both sensor data as well as source data.This will be a frequent task in the remaining steps. In case you worked along the script chronologically, up to now you only have the former.

Below, we describe two ways of loading data. Firsthand, a slightly cumbersome one that always works. Next to that a quick one that sometimes fails.

Start emegs2d.m. Wait a second. You will be prompted for opening a filematrix. Refuse with <Cancel>. Now two windows are open, entitled “emegs 2d Menu” and “emegs 2d Data” (for the remainder referred to by “2dmenu and 2ddata”).

Now indicate the kind of data at hand. In the dark blue field on the middle right of the 2dmenu is a label “Data Type” with two buttons underneath. Set the upper one to <MEG>. Set the lower one to <Field>, in case you want to handle sensor space data or to L2-Min.-Norm, if you have source space data. In the upper menu bar of 2dmenu, choose: File > File > Sensor format. For sensor space data, continue with > MEG no sphere. For source space data, choose > SCADS.

Now open a sensor file. In the 2dmenu, click: File > Open sensor set. Continue reading before the next step: If you have files of a single subject with sensor space data, the file that you need is in the format *.pmg. It has, except for the extension, the same name and is located in the same folder. Now click > Last folder and browse for it. In case you look at grand average data in sensor space, however, take a *.pdg of some arbitrary subject as a quick-and-dirty option. If you already have data in the source space, the file you need is called 350.ecfg, it is a standard file to be used for all subjects. Now click > emegs default and browse for it. Confirm all highlighted defaults in the upcoming prompts.

Until now, you have inserted the modality of the data (Source space projection or measured fields) and have loaded a sensor file. Now load the signal file. This may be an individual run average or a grand mean. For files with sensor space data, it has in any case the extension *.at#, for source space projections it is *.MN5. Open any such file of your choice. Ignore the windows popping up and read on first.

The manner of loading a file as described above is laborious but failsafe. If not being thwarted by some error message, rather use the following one:

Page 14: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Start em.m (We still assume that you process MEG data, otherwise, it is ee.m)Again, you are asked for selecting a signal file. This time, browse for it as prompted immediately. The according sensor file will be chosen by EMEGS automatically. At minimum, the according file type will be detemined. Some prompts follow, which defaults may be accepted blindly. Only if this simple procedure fails for any reason, go back to our prior one. No matter which on you chose, you will end up at the same state here. Let us continue.

In case you have loaded sensor space data, beneath many other windows, one with the Titel <Pmg-Cot-Rad-Sfp-Fdp-Sfh info> appeared. If so, read section 4.4 first.

A file matrix may be loaded via File > open data set > open batch file as explained in section 4.9. In the 2dmenu in the blue field below the menu bar, there is a dropdown entitled “actual data set”. Here, you can see the array of files in your actual data set. You can also selectively remove single files from your filematrix ([check]: visible set > clear set. Select the file to be moved in the dropdown before). You may also add or change files (File > Open Data Set > Open Data Set [Slotnummer]).

Processing steps, that you apply to the data set in many cases optionally may be applied to the presently selected file (marked in “actual data set”) only or they will apply to all. You will be prompted for your respective choice.

The initially loaded files remain unchanged, however. Thus, do not worry about your steps. If, however, you want to save changes and results purposefully, choose File > Export > Data File > All Data Sets [oder] Actual Data Set > SCADS Format.

As opposed to most other matlab scripts including emegs3d.m, emegs2d.m can only handle up to eighth files simultaneously. For some calculations, there are alternative scripts providing the same or even more functions than emegs2d.m. They will be adressed in other sections. Emegs2d.m is predominantly dedicated to the generation of graphics and not for batched processing. It will thus be a rare case that you want so save files via the 2dmenu.

Along with the initial loading of a file, a number of info windows opened. To keep your screen clear, you may collectively close them with the button <infos> (at the bottom of the 2dmenu). To also close additional graphic windows along with them, choose <no main>. This will leave only the 2dmenu and 2dviewer.

The hints on emegs2d.m given so far are required for the next steps to come. For all further instructions for viewing graphs, refer to section 4.10.

3.3.L2-Minimum Norm

At present, no methods of source localisation other than L2 Minimum Norm are available. The theoretical foundations are explained in Luck, 2005.

First, create a batchfile of all sensor data files, from which you want to create source reconstructions. In general, this will be simply all of your measured data, that is, all *.at#). It is advisory to run a test calculation with just 2-3 datasets first. Let the full batch be processed only if that turns out to work fine, for the calculation may take some time.

Open em.m. Open, as explained in Section 3.2.1, a file with sensor data of a single run (*.at#). It has to be one of the files listed in your batch file. For all of the prompts opening now, just confirm the suggested defaults. To keep overview, you may shut the popup infos by clicking close>infos in the 2dmenu.

In the 2dmenu, you may now choose the time interval to be processed (values in msek). Besides, you choose a time range for baseline subtraction and check the radio button underneath “Calc. baseline”. All other settings may remain unchanged.

Page 15: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

These settings made for the file just loaded will later apply for all other in the batch, a principle that will later hold for other calculations, too.

Now click the button <Emegs3d>. A GUI entitled “emegs3d Menu” (or just 3dmenu) appears. Here as well, most settings can be adopted.

Things to be altered are: Choosing a time range to be processed again. For “Number of intervals”, select all (otherwise, the minimum norm will not be calculated samplewise). In a field closely below, you can set a lambda value of regularisation. For the Minimum Norm, you better set 0.2 instead oft the default of 0.02. Lambda describes the proportion of the signal variance to be accounted for by the estimate. It is unlikely that you have a signal-to-noise ratio of 0.02.

Now open a file matrix via File > File Matrix > Open batch file > [Browse for your prepared batchfile]. In elder EMEGS versions, you will find the initial <File> button in the menu bar of 3dmenu, recently, it has moved to 2dmenu.

The next input also depends on your EMEGS version. For elder versions:On left top of the 3dmenu, there is a dropdown <L2Minimum Norm>. There, you choose <L2, Shell 8 cm, 1 shell>. As common, this setting will apply for all files but just the presently loaded one. Then click Calculate > Minimum Norm => File > Save MN to actual shell. In later versions, just select: Calculate >Minimum Norm=>File > Save MN to shell > MN5 (8cm; 1shell).

The computation is time consuming. Eventually, you will find additional new files beneath all prior ones in each of your dataset folders. Specifically, there ought to be one *.at#.MN5 file for each corresponding *.at# listed in your batchfile. Except for the extension, they are named equally. If so, everything worked fine. However, it may be that for several *.at# just one *.MN5 was created with a shortened name. This is a frequent failure. It occurs in case of lenghty filenames and filepaths. Shortening them and doing the calculation again will help.

The *.MN5-files contain estimates for 350 dipoles, which in turn are arranged on an spherical shell of 8 cm radius. The shell approximately represents the cortex. Other models including further dipole shells for deeper brain structures were in use formerly and are still availabe. For several reasons, they appeared unfavorable. In case your hypotheses include deeper sources, mind that they will be projected to spots on the spherical cortex and beware of overinterpreting source localisations. Instead, restrict your interpretations to the morphology.

EMEGS, in particular emegs2d.m, will treat your *.MN5 very much the same as it will treat *at#. Both files contain a number of signals. While these signals represent dipole moments [nAm] in the *.MN5, in the *at# there are field strenghts [fT] as units. EMEGS, however, does not care for the nature of the signal. Both are associated with a sister file (*pmg for the former or *.ecfg for the latter), that specify a position in space for each signal’s origin. For the *.MN5, these are dipoles on a shell model. For *.at#, these are the sensor coils of your MEG device (or EEG electrode cap channels).

Consequently, the appearance and operation of the GUI 2dmenue and 3dmenue for handling either do hardly differ. Many other scripts, e.g for pairwise subtraction or grand averages apply to both as well. The same holds for graphical analysis (see 4.11). Yet, there is a difference in opening files in emegs2d (If you just finished the L2 minimum norm computation, close emegs and start over). Now start emegs2d.m. You are prompted to open a file: <Cancel>. Now do not open a file with sensor positions, as usual, but the according signal file (in this case, the *.MN5 source space projections) via File> Open Data Set > Opben Batch File > [Fill file matrix with up to 8 slots bis max. 8 Slots]. Deviation form the common proceceding, a prompt appears: “data set seems to contain ... L2-Min.Norm Data.”. Confirm the default SCADS.

Otherwise, EMEGS would erroneously access the *.pmg file and expect the dipoles at positions, that rather hold true for the sensors of your recording device.

Page 16: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Besides, only N out of the 350 dipoles of the models would be shown, N being the number of sensors of the recording device.

If everthing worked out, however, now 350 signals are plotted in 2ddata. Same as with the sensor data, this is a two-dimensional view of a 3d-model in a kind of globe map projection. Since this is a stretched top view of the spherical cortex model, sensors in the peripery of the view are inferior in the sphere and they are adjacent there, even if at opposite sides of the rim in 2d. Sensors in the center at 2d view are superior in the 3d model. Frontal regions are positioned up and occipital down on your screen.

3.4.Samplewise ANOVA

A remaining goal is now to identify time ranges and topographical areas of the cortex that shall be used for your final statistics and to reject others. This selection should ensure that the deflection you are looking at represents the component your hypothesis deals with. Contamination by others components should be reduced as far as possible. In MEG imaging, this is common. When conducting a sensor space analysis of MEG data, the problem occurs that there is few literature to compare for the typical morphology and topograpy of the component at hand. EEG studies including reports about the characteristical scalp distribution of a component are far more widespread. This is yet another reason to evaluate the data rather in sensor space but in source space. The generators of a component are often known and they are independent of the modality.

3.4.1.Why samplewise ANOVA ?

A announced yet, we want to restrict a region and time range. To use a samplewise ANOVA to this end is rather uncommon. This procedure is inspired by related ones routinely used in fMRI, its usage in MEG/EEG is a distinctive feature of EMEGS. Since there is thus no classic literature to suggest, we will briefly address the theoretical background.

We are looking for time ranges, in which two experimental conditons yield activties, whose difference is statistically significant. We now could go ahead and calculate a student's t-test for each sample point. What the test compares are the sample’s values in all subjects in the one versus other condition. As usual, the t statistic is derived calculated from the estimate of the populations variance and its ratio to the difference of condition means. The p-value is calculated on the basis of the actual t and its probability distribution (p(T)|H0).

By applying this sample by sample, we obtain a signal of t-values and an according signal of p-values for each reconstructed dipole (MEG sensor or EEG electrode, respectively). We can plot and handle this signal in emegs.2d, just like dipole moments or field strengths. As mentioned above, in general EMEGS does not care for the nature of the signal.

Given a sampling rate of, say, 600 Hz, an epoch of 800 msek duration and the usual 350 dipoles of the sperical model, we get (600/1000)*800*350 t-tests. An according alpha inflation will result. Primalily, we do not have to care about, nor correct for it. In fact, we do not calculate these statistics for the customary confirmatory purpose. Instead, we will do that later for a more extented time interval and a region including more than just one dipole. For these, just one uncorrected test will be calculated and reported in the final manuscript. Note, however, that there is some debate on the appropriateness of this account. Using the pointwise ANOVA for exploratory studys is acceptable, as soon as you do not claim any a-priory forcast of your results later on and as soon as you use appropriate cross-validations.

Page 17: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Alternatively, some fine-tuning of the precise site and time of an otherwise well known component in a confirmatory study is adequate as well. The power of our tool may seduce to unfair scholar misuse, however.

On the other and, the abovementioned fine-tuning of a-priory hypotheses in terms of time and space is acceptable also from the viewpoint of a reviewer. Some pragmatic tweaking is required anyway. As to that, our way is superior to some subjective visual-graphic analysis. It is data-driven and can be fully documented in a manuscript’s methods section. Take home: The major restrictions have to be done on a theoretical basis, statistical parametric maps should only pave the last meter.

Fore the sake of simplicity, we explained the principle based on samplewise t-test. But the real virtues of statistical plots in EMEGS emerge when we use more than two conditions and plot interactions. Here, the standard visual graphical analysis is no more applicable. When looking upon n conditions and attempting to figure out were and when significant differences emerge, overview gets lost soon. This is jet another virtue of samplewise ANOVA.

When you look at the global power of the F-values, you might get an idea of which time intervals might be of interest for you. A rather controversial question in this context is: Shall I look at the F- or at the p-values? p-values are easier to interpret since you know that p-values above .95 (the emegs scale is reversed to 1-p) are statistically significant on a 5% alpha level. A disadvantage is then that the values of interest (between .95 and 1.00) have a rather small variance. The F-values on the other hand vary more strongly and thus indicate the size of the statistical effects. Which F-values are significant in your study depends on your n and your p (see the Bortz, 1999 or Section 4.7, for information on how to calculate the “significance threshold”). When you know this value, you can plot only F-values larger than this threshold in emegs 2d: Plot the Global Power as explained above and then set the value via “Calculate > Thresholding > lower threshold”.

3.4.2.Menu navigation

Depending on the currently used emegs version, the computation of the point-wise ANOVA takes only a few minutes (emegs version 2.3 or higher) or several hours (emegs version 2.2). In the latter case, it is recommended to run the ANOVA first with a small number of subjects (approx. 5) to test for possible operating errors that might lead to an early abortion of the computation. You should not use other emegs or Matlab functions while executing the ANOVA. After verifying the correctness of your computation, you can repeat the procedure for the complete data set, preferably over night. One possibility to save calculation time under emegs 2.2 is to downsample the data with the matlab script “ResampleAvgFiles.m” (this procedure will not be described here). Still, the fastest way to calculate the pointwise ANOVA is to use emegs 2.3 or higher and if you are currently an emegs 2.2 user, you can actually easily switch to a higher version. First, create a batch file comprising the data files for each subject, hierarchically sorted according to the factors and corresponding factor levels (for a detailed description see section 4.9). Make sure you remember the way you have ordered the factors for later interpretation. Open a single MN5 file in emegs 2d (as described in section 2.2.1). Then, open the emegs 3d navigation surface by pressing the <Emegs3d> button on the 2d panel. Now, read in the batch file containing the filematrix via ‘File > File Matrix > Open Batch File > [Browse]’ (in emegs 2.3, this menu is located on the 3d panel, whereas in earlier versions, it is on the 2d panel). In the 3d menu, click on the radiobutton on the right side to 'Number of intervals' and set the value to ‘All’. In the menu bar on the top, choose: ‘Calculate > Repeated Measures Anova > Define’. A blue window

Page 18: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

entitled 'rmANOVA' instantaneously pops up. Here, you define how your ANOVA should be calculated:

Insert the number of subjects (N) in the box next to the 'number of subjects' text (make sure you insert actually the number of subjects and not the number of files in your filematrix). Check the radiobutton 'all points and sensors'. In the section 'within factors in hierarchical order', define the factors used in your design in the same (hierarchical, descending) order as in the batchfile containing the filematrix. For each factor, you have to specify 'gradation', 'name' and 'cells'. ‘gradation’ is the number of factor levels of the current factor. The entry in ‘name’ will be the label for the current factor in the ANOVA output and in the output files. The name should be short and unique. In ‘cells’, define how each factor level should be. These names must be separated by a space and the order must correspond to the order in which they are mentioned in the filematrix. Now, save your ANOVA design via ‘File > Save design > [Browse]’. You can reuse the design with minor modifications later on for your ANOVAs on certain time-intervals of interest.To start your calculation, press either <ok & run via Matlab> or <ok & run via R (Com)>. If your ANOVA design includes unequal cell sizes, you must use the latter option. It requires that you have installed the open-source statistic environment ‘R’ on your computer. Since most designs provide equal cell sizes, the standard procedure is to calculate the ANOVA via Matlab. These steps are also explained in more detail in the EMEGS help. Look for [Your EMEGS program folder]\emegsHelp\statistics.html. In particular when working with between-subjects factors, you should have a look there, too.

For the interval-wise ANOVA upcoming later on, the menu and the procedures are essentially the same. The remaining deviations will be addressed in the respective section.

It is recommended to create a folder for the statistical results in advance. The ANOVA menu prompts you to define a folder where the results should be saved. EMEGS then automatically generates two subfolders named ‘CAVG’ and ‘STATS’. In the CAVG folder, the cell means (i.e. the means for each condition) are stored. The files are named according to the names you have given your factors. The CAVG files can be viewed in emegs 2d. Open the conditions for which you expect differences and screen the Global Power (click on “GP/RMS/Mean” in emegs 2d) for possible effects. Since the Global Power is an average across all sensors/dipoles, it only serves to give you a first impression of what your data and your effects look like. In the STATS folder, separate files are deposited for the F-values and p-values of the main effects and interactions of the ANOVA. You can also view these results in emegs 2d. You may even open the CAVG and the STATS files at the same time, but usually the are on very different scales.

3.5.Selection of sensor groups

The ANOVA for an extended time range and larger topographical region will be your last step in EMEGS, the next will be writing your manuscript and reporting the according significances (garnished with some plot as suggested in 4.11). Time ranges may be selected by the pointwise ANOVA signals from the last section. However, we did not jet mention how to select sensor groups.

First, visualize your region(s) of interest by plotting the F-values within a self-determined time-interval with emegs 3d. You can determine the time-interval by inserting the time of starting and ending of the interval into the boxes next to “Min.time [ms]” and “Max.time [ms]”. If you want to calculate the ANOVA for the average over the entire time period chosen, make sure that the “Number of intervals” (below the Min. and Max. time boxes) is 1. You can also divide your time-

Page 19: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

interval of interest in several, equally-sized chunks (for example: a time-interval of 210ms might be split into 3 parts of 70ms duration). Next, choose one or more channel groups as regions of interest, that is, regions in which the F-values are large over an extended time period. In the 3d menu bar, select “View > Interactive Sensor Grouping > 3D contour/ no contour”. Now, two windows pop-up that allow you to select up to 4 channel groups. Sensors in the 3-d view are highlighted and included in a group when clicking on them. Save your current sensor or dipole selection and return to the emegs 3d menu with the ‘write group file & close’ command. The currently selected groups are now active and automatically applied as channel groups in the ANOVA. If you would like to use the same selection in a later session (after a new start of emegs), you have to open the text-file, where you have saved the groups. This can be accomplished in the 2d menu via ‘Calculate > Channel groups > Open group file > [Browse]’. Other options here are to load standard channel group selections such as Left Hemisphere and Right Hemisphere. You will probably do your final statistics on customized groups, but the standard groups might give you a first impression of differences between the hemispheres or anterior vs. posterior regions. The selection of sensor groups is also addressed in the EMEGS help. Browse for [Your EMEGS program folder]/emegsHelp/interactivesensorgrouping.html.

3.6.ANOVAs for time-intervals and sensors of interest

Remark: These kinds of ANOVAs have definitely to be executed with EMEGS version 2.3 if you would like to export the results for later use in statistical software packages such as SPSS. After loading your desired channel groups and defining a time-interval of interest (in which you expect your effect to be evident) you can start calculating your ANOVA. The procedure is quite similar to the pointwise calculation, but there are also some important differences: Again, load a filematrix and start the „rmANOVA“ menu via ‘Calculate > Repeated Measures Anova > Define’. Importantly, the selected channel groups and time-intervals enter the ANOVA as “standard within factors” on the top of the rmANOVA panel. Uncheck the box “all points and sensors” and then indicate the number of groups and intervals under gradations on the left side of the panel. On the right side next to the number, name each of the groups or intervals. Again, the names of each factor level must be separated by a space (e.g. when you have two channel groups, then write a ‘2’ into the box on the left and write ‘occipital temporal’ on the right side). Handle the remaining boxes as was explained above for the point-wise ANOVA. After EMEGS has calculated the ANOVA, a window pops-up that gives you a summary of the statistical results. To visualize the results, click ‘Graph > Cellplot’ and choose the conditions for which you would like to see the results. You can export the data (the means for all conditions for each subject) as a text-file via ‘data > export data’. An export of the data has the advantage that you can continue your analysis with statistic software such as SPSS or R, which are more convenient when it gets to creating graphics etc.

We are now done with our chronological outline of the data processing. The remaining chapters provide general remarks and have been referred to already. We would appreciate your feedback in order to rework this manual. Please take your time for a short review!

Page 20: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

4.Supplementary Information

4.1.Epoch-wise data recording

When you record data with CTF you can choose between continuous recording or epoch-wise recording. In epoch-wise recording, the signal is divided into sections of several seconds and later on merged into a continuous signal again. One advantage is that only the last epoch is lost if there is a recording problem during measurement. A disadvantage on the other hand is that the merging processing is rather tedious. Since the problem of data loss during acquisition is very rare, we therefore recommend to record the continuous signal. The recording modus is defined in the so-called run-time protocol. This protocal is created by our MTAs.

4.2.Transferring your rawdata from Megserver

Megserver has to be accessed in two occasions: (1) to update your emegs version and (2) to transfer your raw data to your own hard disk.

Launch the program „SSH Secure File Transfer Client (SSH)“ which is installed on most of the computers here in the institute. Choose ‚Quick Connect > Hostname: 10.34.35.5; User Name: meg > Return > Password: [ask any IBB employee for the pwd] > Add Profile: megserver’ . (when you add the profile, it is stored and the next time you access the server you do not have to enter the hostname again). Files and Folders on Megserver are displayed in the right window. In the left window, the contents of your local computer are shown. Open the target location for the rawdata on the left side. Enter ‚data’ as path in the address box on the right side. Confirm by pressing ‚return’. Choose the subpath, where your data is located.

Your data should be usually located under Megserver1 in your own or in your supervisor’s folder (since the MTAs have stored the data, they know the exact location).

The current emegs version is located on Megserver2/downloads. Highlight the folders/files that you would like to download from Megserver in the right window. Choose ‚Download’ in the contextmenu or drag’n drop the files to the left window. The download might take a while, especially for larger amounts of data. You can monitor the progress in the upper window. After complete download, disconnect from the server vie ‚File > Disconnect’ and close the program SSH.

Please do not use Megserver as a Backup server and upload data of any kind! Some folders are emptied regularly. If you encounter problems with your hard disk capacity on your local computer, please contact Andreas.

4.3.Installing the latest emegs version

It is recommended to install the latest emegs version before starting with your analysis. Oftentimes, the most current version offers new functions. Since the program is „home-made“, we cannot guarantee that it is completely free of bugs. If a bug is noticed, Markus Junghöfer usually fixes it and all users are informed about possible changes at once.

After transferring the complete folder [../emegs[version number] to your local computer, store it in your personal profile. It is not advisory to share your emegs version with other users.

The path, where your emegs folder is stored must be embedded into matlab: Start Matlab and choose ‚File > Set Path ...> Default (confirm question) > Add with

Page 21: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

subfolders ...> [Browse to the emegs folder] > OK > Move to Bottom > Save’. Saving the settings can only be accomplished with administrator rights. (Ask Andreas for help.) This embedding has to be done for all emegs versions that you use. Once you have saved the settings though, you do not have to repeat the procedure again. In case that the embedding was not successful, you cannot start the EMEGS script as described under section 4.10, but the error notification Fehlermeldung '??? Undefined function or variable '[name of thedes scripts]' occurs.

If you find one or more emegs program folders already on your computer that do not belong to you, do not use them. They might be outdated or modified by other users to meet their needs. To avoid any problems, just use your own local copy under ‚C:/Documents and Settings/[your name]/Matlab/...’.

4.4.Control of headposition

In case you use EEG data, this does not pertain you. When opening sensor data, a window pops up that displays the sensor

positions, the location of the fiducials and the head surface in space. When opening the data for the first time, you should check whether the images look plausible (that is whether the spatial arrangement of the sensor positions and locations of fiducials looks as expected). If this is not the case, something went wrong during export from BESA and import into EMEGS. Before proceeding with your analysis, you should fix this problem. Otherwise, it might have devastating consequences. The green and blue points indicate the primary and secondary coils of the gradiometers. You can tell from these points where the front of the sensor helmet is located. The front is where the sensors are omitted so that the subject has free viewing. The pink points reflect the locations of the fiducials and the red points marks the center of the head. A net of sensors on the head surface is displayed as black points. As long as you do not use realistic head models, this surface should approximate a round shell.

The fiducials at the preauricular points should be located on the left and right side, the nasion point at the front of the helmet. The confusion of these three points is a common source of error, since when transforming the data from one program to another, different coordinate system must be dealt with. Oftentimes, the head is rotated by 90° in the helmet.

Consecutively, you have to check whether the head is located approximately in the center of the helmet. Additionally, the head center should also be in the middle between the two ears. In case that the ears are above or beyond the head surface, you should not worry about it. This is due to the approximation of the head by the shell model.

4.5.The CTF File formats Die CTF-Dateiformate

Together with your rawdata some other files for each run and subjects are stored on Megserver1. In the following, the most important file-types will be shortly described (this does not mean that the other files, we do not mention here, can be deleted!)

*.meg4 (can only be opened with corresponding programs)rather large in size, contains the rawdata (depending on the recording mode

either continuous or epoch-wise)

MarkerFile.mrk.bak (copy of MarkerFile.mrk) (can be opened with any text editor); contains the number of markers (triggers), their names and when and how

Page 22: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

often they appeared in the run; without markers, your data is worthless, since they are needed to define the stimulus onsets; if you have the feeling that something is wrong with your data when importing it in Besa, you should check the Marker File; you have named the markers yourself when setting up the runtime protocol in the CTF system; the number of markers is determined in Presentation

*.cot (can be opened with any text editor); contains the head center coordinates and the radius; is generated in BESA based on either the fiducials of the sfp file

If the Polhemus measurement was conducted for your study, two additional files contain information about the head shape and fiducials

*.sfp (can be opened with any text editor);contains the results of the Polhemus procedure; based on this information, BESA calculates the head center and generates a .cot file

*.pos (can be opened with any text editor); contains the results of the Polhemus procedure in CTF format

4.6.Defining Time in EMEGS und BESA

In EMEGS, sometimes time is counted in sampling points rather than milliseconds. You have to define time points in EMEGS in various situations:

Stimulus onset: In EMEGS, the 0 can either be the start of an epoch or the onset of a stimulus. Since we would like to investigate event-related processes relative to stimulus onset, in the former case the sample point of the stimulus onset must be marked (in emegs 2d).

To define a time interval (for an ANOVA or a plot)

All EMEGS GUIs indicate which time scale is used: [#] symbolizes the sampling rate, [ms] Msek the time in milliseconds. To convert milliseconds into sampling rate, use the following information:

SR samplingrate in Hz, documented in the *.hist-file (usually 600HZ)TM an arbitrary time-point in mseckTA the same point in sampling points

ThenSR*TM/1000=TA(strictly speaking, you have to add a ‚1’ to the result)

Time points are always given relative to the null point. In EMEGS and BESA, the null point is the onset of the trigger (stimulus onset). Any time points before the trigger have a negative sign. In contrast, the sampling points are continually numbered starting at 0 at the beginning of the epoch.

Example: You have averaged an epoch of -500ms to xms in BESA. The sampling rate was 600Hz. The Triggerpoint (stimulus onset) can be calculated with: (500 * 600) / 1000 = 300.

Page 23: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

4.7.F-values

After executing the point-wise ANOVA, you should have a look at your statistical results. Based upon the F-values, you select your time-intervals and regions of interest for your final ANOVAs. In this data screening process, you are interested in significant F-values to see where and when your effects are evident in the data. Open a data file containing the F-values in EMEGS 2d. Then set a threshold above which values should be displays via „Calculate > Thresholding > upper threshold > below = 0, above = value“. As value, insert your critical F-value. All values below your critical one are set to zero. These values are then used to plot the Global Power.

How to find the critical F-value? The critical F-value depends on the degrees of freedom and thus on your design. You calculate a repeated measures ANOVA. When you have one factor, then:

df(treat) = df(enumerator) = (p – 1), df(error) = df(denominator) = (p-1)*(n-1), where p is the number of factor levels and n the number of subjects

You can look up the corresponding value in tables in the appendix of respective statistic textbooks or in EXCEL with via „Functions > statistics > FINV“.

4.8.Batch-driven file renaming

Sometimes it becomes necessary during the preprocessing procedure to rename your filenames since EMEGS assumes that all files with the same name and different extensions belong to a single data set. One option for easily renaming files is the free program JOE.

4.9.Generating Batchfiles

The usage of batch files (file matrices) in EMEGS facilitates and speeds up your work. Several times during the different processing steps in emegs you will encounter a situation which requires the application of the same computation on a number of files (usually for each subject and run separately). The first step in EMEGS – pos2pmg.m - already requires such batch processing. The following steps such as besa2scads, EmegsGrandMean.m, the calculation of the Minimum Norm solution and the ANOVA can also be accomplished with batch processing. In each of the aforementioned processing steps, a small browser window pops up and asks for files that should be used in the current processing step. You have two possible options:

a. Without filematrix: each file has to be highlighted and confirmed separately; when you have loaded all files, click <Cancel> to indicate that your list of files is complete; EMEGS creates temporarily a filematrix, which is not available in later processing stages; this procedure is time-consuming and error-prone, and if you do a mistake you might have to do it all over again.

Page 24: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

b. With filematrix (batch processing): the more convenient option requires you to only load your batchfile; the batchfile is of normal text format and comprises one row for each datafile containing the complete file path.

When loading a file, EMEGS automatically recognizes whether it is an actual data file or a batch file.

In order to create the batch file, we recommend to use the free program „FreeCommander“. With the function „edit > select group“ you can highlight files selectively according to their names. With „edit > copy full name as text“, you can then copy and paste the entire pathes into a new text file. If you wish to use a specific ordering in your filematrix, sort the file paths in EXCEL. The row-wise order can be chosen arbitrarily except in the following cases:

- Calculation of ANOVAS (section 3.4.2): [emegs-folder]\emegsHelp\anovabatchfile.html and [emegs-folder]\emegsHelp\statistics.html (section 'Repeated Measures ANOVA').EMEGS contains a script that facilitates the generation of theses file matrices: [emegs-Dateiordner]\emegsHelp\filemanagement.html

- CalcAvgMean.m for merging files (e.g. across runs): files must be ordered pair- or blockwise!

4.10.Execution of EMEGS Scripts under MATLAB

EMEGS is not a contiguous, monolithic program, but a loose bunch of scripts which consist of command lines for quite narrowly circumscribed processing steps in the overall analysis procedure. The scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective script in MATLAB. You can either do this via a graphical user interface (GUI) or via the prompt of MATLAB.

The prompt of MATLAB: launch MATLAB and type in the name of the script (without extension) that you would like to execute; then confirm with <Enter>; the most prominent example is the emegs.m script

The graphical user interface (GUI): after executing emegs.m via the prompt of MATLAB, a first GUI pops up; depending on which button you then choose, other GUIs appear; these GUIs enable you to execute a lot of different computations and use other functions, such as plotting.

The respective scripts must be embedded in MATLAB (as was described under 4.2). In this tutorial, sometimes you are asked to, e.g., „start emegs2d.m“. This should be executed via the MATLAB command window. While executing an EMEGS script, sometimes a lot of different control windows will pop up. Most of them can be ignored. Still, we recommend that you look at them at least once to evaluate their significance. The MATLAB command window also gives you feedback concerning the current computations and its progress. It is especially useful to look at this feedback if the program takes a long time or aborts early. In the latter case, MATLAB gives you an error notification in red. MATLAB is computing as long as the word <busy> is visible in the lower left corner of the MATLAB window (this is not true when you run MATLAB under LINUX).

4.11.Graphics in EMEGS

4.11.1.Correct Usage of Graphics

Page 25: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

We will first consider 2-dimensional ways to visualize the signal. Generally speaking, a signal is the variation of a measured unit over time. Sound, seismographic recordings or data from a weather station are thus signals. With regards to MEG, the variation of the magnetic field in a certain time-interval following stimulus onset is of interest. In order to get an impression of typical ways to displays results of MEG data analyses, it it recommendable to look into some publications based on MEG.

Different ways to visualize data are necessary, since we usually like to describe our results on different levels of data aggregation. After reducing our data by averaging across instances of a single conditions and different runs, we still have [N] x [Number of Conditions] x [Number of Sensors/Dipoles] signals. For each signal, we have [sampling rate] x [duration of the epoch] measurements. In order to further reduce your number of signals, you can additionally average across epochs and/or sensors/dipoles.

In favor of a highly aggregated visualization speaks the relatively clearness of the picture, in favor for a less aggregated visualization the possibility to view details. For instance, in the 'Emegs2d Data' window, you can simultaneously investigate the 275 sensors or even the 350 dipoles (depending on whether you look into in the sensor or into the source space). You can get an overall impression of the spatial distribution of the magnetic field, but at the same time, the single signals are quite tiny and only large deflection are detectable. Alternatively, you can average across all sensors/ dipoles to receive a single signal. This signal can be plotted in a well-visible style at the expense of spatial resolution. Another option is to calculate the mean of sampling points for an extended time interval. The size of the mean is color-coded and each sensor can be visualized by few pixels. The spatial resolution it improved at the expense of the temporal one.

Besides deciding whether to aggregate the data in the spatial or in the temporal dimension, another choice to be made concerns the averaging across conditions and subjects. In some cases, it might be feasible to look at single subjects, whereas in other cases, averaging all subjects is the most reasonable approach. The same holds true for your conditions. It is probably the best to have a rather exploratory look into your data and based on your impressions decide which visualization can convey your message most comprehensively.

The following figures represent a selection of possible visualizations with EMEGS. They all refer to the same data set and thus are supposed to give you an impression of the overall information content of each figure type.

Page 26: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Sensorplot: The spatial arrangement of the sensors in emegs 2d corresponds to the three-dimensional positions in the sensorhelmet. The map is viewed from top, frontal is at the top, occipital at the bottom. The figure gives a good first impression of the data (e.g. weird drifts?). The figure can also be used in presentations and diploma theses, but should not be used for publication.

The same time-interval displayed as field topography. An average across all sampling points had been calculated here. You can display several averages across short time intervals in a row to monitor the temporal dynamics of the fields. Suitable for slides, posters and papers, since even on a small scale, the figures are well visible.

Page 27: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

Left: Butterfly-Plot. Probably a relict of former times, when fewer channels were available to the experimenter. It is not recommended to use this plot today. A minor advantage over Meanplots might bet he circumvention of the sign problem. Still, this can also be accomplished through the visualization of selected sensors.

Right: Plot of selected sensors. Suitable for a preliminary report of your data. Especially if you would like to visualize hemispherical differences or differences between other regions of interest. Usually the sensor with the largest effect is chosen. For more official report of your data, you should show averages across larger sensor groups. Such a figure is far more persuasive, because your data looks more reliable and not manipulated by a "Wishful Choice". In EEG-analysis, this does not hold true and the plotting of selected sensors is rather popular.

0 250 500 750 1000

-3

-2

-1

0

1

2

3

4

5

6

Time [ms]

Mea

n [fT

]

0

-0.29

0 250 500 750 1000

-3

-2

-1

0

1

2

3

4

5

6

Time [ms]

Mea

n [fT

]

0

-0.63

Root-mean-square- (RMS), grand-mean- (GM), or, as depicted here, meanplot.

Page 28: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

On the left hand figure, data of all 275 Channels were averaged. On the left hand figure, only a selected choice of 54 channels was used, selected by the largest deflections. As demonstrated by the comparison, the remaining channels do hardly change the result. Since their only contribution is noise, they worsen, howvever, the signal-to-noise ratio.

The option to average over selected sensor sets only also provides the opportunity to include topographical information and draw regional comparisons of e.g., hemispheres.

Since what is shown here are means, a problem like this is likely to happen: Two simultaneous deflections of inverse polarity and equal strenght occur. On average, they cancel each other out. Magnetic field lines leaving the head also enter again elsewhere. A related statement holds for EEG potentials. Two optional correctives are either to take a restricted sensor set, or rectifie channels before averageing. The latter is the case in RMS or GM.

4.11.2.Making graphs with the GUI

We listed some types of graphs and discussed their appropriate usage, so far. Here is how you get hold of them.

The sensor plot is automatically shown in the 2ddata window. For the sake of better overwiev, the depicted time range may be shortened. Insert according interval boundaries in the fields <min time [ms]> und <max time [ms]> of 2dmenue. The scale range of the signal may be constrained for the same reason via <min Amp. []> or <max Amp. []> (It is not reasonable to cut off both, however). Restricting the plot to the upper (or lower) range of the amplitude scale masks minor deflections. Sensors that are limited to such minor activity in the range of noise will then appear all white. The interesting regions pop up.

The option to vary time- and amplitude ranges is also available for other manners of depiction. There, it may help to a) better exploit the scaling and b) give different figures the same scaling to enhance comparability.

RMS-, GM-, Meanplot-: Click the button <GP/RMS/Mean>. Two windows open, one with the plot and another one entitled <GP/RMS/Mean Menu>. Apart from the abovementioned time and scaling adustment, there is a dropdown which lets you choose between depiction of mean or modulus. Another dropdown provides the choice between mean (or modulus) calculation based on all sensors (choose <all visible sensors>) or a defined subgroup, respectively. The latter (choose <Group N>) is only available when you have presently loaded a group file. This can be done by the menu bar of 2dmenu: Calculate > Channel Groups > Open Group File.There are other options to adjust the selection of sensors to be taken into account, which we will not cover here, however.

Plotting single sensors Look for a sensor in the 2ddata GUI. Select it in 2dmenu with the dropdown <zoom sensor>. Two windows open up with options similar to the ones in the abovementioned meanplot procedure. The <zoom sensor> dropdown from the 2ddata GUI is mirrored here and allows a rapid change within the window already opened. However, when you use the one from the 2ddata GUI again, the selected channel will be plotted in an additional window, enabling easy comparisons. The button <GP/RMS/Mean>, by the way, behaves likewise.

Page 29: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

4.11.3.How to export figures

In the window with the respective graph, select from the dropdown File > Save as … and save the image preliminarily as suggested in *.fig format. This is a proprietary MATLAB format. You may open it with MATLAB later on, even without starting emegs, but not with other programs. This format permits you to introduce changes of scaling, line color and other layout properties. You will find such options in the menu bar. Plots from different figures may be merged int one or, inversey, multiple plots may be abstracted. Any export into another format includes a loss of informations and thus reduced opportunities to change the layout.

If you are familiar with PHOTOSHOP or another plot routine, you may export the standard vector format *.emf and edit it accordingly. The Institute for Biomagnetism has a PHOTOSHOP license. WORD or POWER POINT can import *.emf as well. Among all formats available, it is the most suitable one for our purposes and the one claiming the least storage. Anyway, keep a *.fig-version as backup. Carefully document what they depict, including information on condition, subject sample, filtering, choice of channels and the like.

The 2ddata window that appears when starting emegs2d.m or em.m is an exception. You can not save and export it as mentioned above. There is no other option than taking a screenshot. Maximise the picture to the screen size (ALT+SPACE > x). Also try to artificially enhance the screen size setting of your computer. A screenshot will be taken into the clipboard by ALT+PRINT. Open PAINT or any other plot routine and paste it with CRTL+V. The options to alter the size or layout of the picture are limited however. Thus, you may at least change the time- and amplitude range as recommended. In the menu bar of the 2dmenu GUI > style, there are also options to hide axes and sensor names.

4.12. Preprocessing with EMEGS

The necessary preprocessing can also be done using EMEGS instead of BESA. The advantage of this method is that you can avoid the exporting from BESA to EMEGS, which does not always go without complications. Furthermore working with EMEGS is fast and comfortable, because most tasks can be done in batch-mode.However, some files have to be adapted to your respective experiment, which means a little extra work for Markus and is the reason why the approach in your case may differ from the one described here.The basic principle of data analysis is as follows (possible program names in parentheses):1.Create a segmented and filtered data file (BatchYourStudy.m)2.Artifact correction (EditAEM.m)3.Average data (EmegsAvg.m)Now you have finished the preprocessing. From this point on the “actual” data analysis takes the same route as outlined in section 2.4. and following of this reader. This could for example be:4.Calculate Grand Means (Emegs2d.m or EmegsGrandMean.m)5.Calculate Minimum Norms (Emegs)6.Calculate ANOVA (Emegs)As these points are discussed in detail in the respective sections (2.4. ff) of the reader, the following part will deal with the first three steps only.

Page 30: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

The MEG-data are recorded continuously, i.e. as one long sequence of measured electric potential or magnetic field power at each sensor. As the event-related fluctuations of the intracerebral current flow (event-related potentials =ERP) or of the emerging magnetic fields (ERMF) are mostly tiny compared to the random noise that the sensors pick up, we have to sum up the brain's response to many events of the same category, in a way that random components cancel out and only the systematically varying part of the signal (the ERP/ERMF) remains. A first necessary step is:

c. Segmentation and Filtering

First, the continuous signal is segmented into short epochs around a marker (the input CTF gets whenever you present a new stimulus). Second, the signal has to be high-pass (syn.: low-cutoff) filtered to exclude low frequency fluctuations (e.g. skin potentials) from the analysis.Both is done by the program BatchYourStudy.m (and some other ones BatchYourStudy.m automatically calls and which therefore are not of primary interest :-) ).In my study you had to do the following to make the program do the rest :

Open /data/megserver1/junghoefer.proc/ConditiaVisual Rename the folders in this directory: Come up with a logical continuous

numbering of the participants in the experiment (from now on: Vp-Nr) and replace the subject IDs by them

e.g. A0123 → 01 , A0345 → 02 ... Start Matlab and type edit BatchConditiaVisual The file opens. Change SubVec to whatever subject's dataset you want to

process. Change SessIndVec to whatever run you want to process. Run the program.

(Remark: SubVec and SessIndVec, as the name suggests, can be vectors. Things like SubVec = [1 2 3 4 5 6 7 8 9 10] , SessIndVec = [1 2 3 4] work. All 4 runs of all 10 persons are processed. However, there is at least one step in the further analysis (which I do not exactly remember and which you could add here when you find out) where a program seems to accept vector input but does not properly handle it. So be careful with that and control what the programs do from time to time.)

That's it for the first step. The data are downloaded from /megserver, segmented and high-pass filtered. The results are saved in an own folder (named <StudyStr>-<SubVec>, e.g. Cvp-14) within your study folder. The data still contain artifacts from eyeblinks and so on, which should be identified and corrected/deleted by some

- Artifact control

This is done with the program EditAEM.m. You could do the following:

Open Matlab. Type EditAEM (not edit EditAEM, this won't probably help you...)

A menu opens which allows you to change the parameters for identification and correction of artifacts. Usual settings are: N=1, StdExp=0.15, ChannelExclusion=6, standard of approximation = 0.01 (fixed).

Click the button that says “Fast Auto II” to start the procedure.

Page 31: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective

A pop-up window wants to know which files the program should use. In every subject's folder there is a *AEM-file for every run. Open BatchAemFileMat.AEM, which the previously used program BatchYourStudy has hopefully created for you in your study folder. This batchfile contains the path of each *AEM-file for all subjects and runs that you specified by SubVec and SessIndVec the last time you used BatchYourStudy.

Save the logfiles and confirm the default “no” when asked for “external sensor status”

Lean back and watch how the program identifies sensors that are noisy across the whole run and single bad trials according to the parameters you have specified. Press the space bar to “accept” the results. They are saved as “*ses.CTF” files.

Now that the signal has been filtered, corrected for artifacts and cut into short epochs, it still does not provide any insight into the the ERP/ERMF-components that underlie part of it, because the noise-issue has still to be solved. The next step therefore is

Averaging

The first aim is to average over all epochs of the same condition within a run. The program used is EmegsAvg.

1. Start EmegsAvg either by clicking on the “EmegsAvg”-button in EditAEM or by typing EmegsAvg in the Matlab console

2. The EmegsAvg-menu opens. Choose “ses.ctf”as file format.3. If you are lucky, there is already a BatchCtfSes.ses.ctf file in your study folder.

If you are not, you have to create a batchfile that contains the complete path to all “ses.ctf files you want to use (typically one per subject and run)

4. Specify the correct trigger point and baseline interval5. Click “Run Average” and save the logfiles. The averaging proceeds and one

*at-file per condition is created.

Now the preprocessing is finished and you can continue reading at section 2.4. of the reader.

5.References

Bortz, J. (1999). Statistik für Sozialwissenschaftler: Mit 247 Tabellen (5., vollst. überarb. und aktualisierte Aufl.). Berlin: Springer.

Jänke, L. (2005). Methoden der Bildgebung in der Psychologie und den kognitiven Neurowissenschaften (1st ed.). Stuttgart: W. Kohlhammer.

Luck, S. J. (2005). An introduction to the event-related potential technique. Cognitive neuroscience. Cambridge Ma.: MIT Press.

Picton, T. W., Bentin, S., Berg, P., Donchin, E., Hillyard, S. A., & Johnson, R., et al. (2000). Guidelines for using human event-related potentials to study cognition: Recording standardts and publication criteria. Psychophysiology, (37), 127–152

Seifert, J. (a 2008). Ereigniskorrelierte EEG-Aktivität. Lengerich: Pabst.

Page 32: 1€¦  · Web viewThe scripts are written in MATLAB, a widely-used software for technical computing. In order to execute a certain processing step, you have to execute the respective