> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/analysis/eeg/abm/analysis-deriving-power-spectral-density-and-frontal-asymmetry-from-the-abm-sdk.md).

# Analysis: Deriving Power Spectral Density and Frontal Asymmetry from the ABM SDK

Find the PSD files the ABM SDK generates, match their epochs to iMotions data and compute a frontal alpha asymmetry index from F3 and F4 alpha power.

*Below we provide information on how to collect PSD and ECG data.*

## iMotions 6.3+

PSD can be calculated using R Notebooks in iMotions ([see the article here](https://help.imotions.com/lab/analysis/eeg/r-notebook-eeg-power-spectral-density-psd.md)). Advanced Brain Monitoring also allows the generation of frequency-based metrics such as *Power Spectral Density (PSD)*. *PSD* values are available for each sampling point, for each channel, for frequencies between 1 - 40 Hz (1 Hz bins). A description of PSD and how it is computed can be found in the attached B-Alert Software User Manual, page 60.

In *iMotions*, PSD measures are available as follows:

1. Open iMotions.
2. From the iMotions menu, select "Preferences" > "Global Settings".
3. Open the tab "Sensors", and go to the option group "B-Alert EEG".
4. Select the option "*Save ABM format data (Needed for StimTracker)*" and click "OK" to close the dialog.

   ![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-53c1fc99e2e067a19d517c90aef0482bfd900a69%2F14d9117838_ziaxptgroumjso9rvnur9w.webp?alt=media)

The EEG data for each respondent will now be stored in the default ABM folder "C:\ProgramData\iMotions\Attention Tool 5.7\Data\\<**name of study**>\ABM\_Data\\<**name of respondent\_randomNumber**>". Each respondent will be stored into a separate sub-folder (randomNumber-respondentName) containing all ABM data files.

C:\ProgramData\iMotions\Attention Tool 5.7\Data\Markus EEG\ABM\_Data\ABM\_Data

According to page 64 in the "*B-Alert Software User Manual*" (see [Downloads](#downloads)), the PSD data is stored in the file labelled "***Xxxxxxxxx\_Ref\_Raw\.csv***". The file content is further described in the manual, returning PSD data per channel, sample, and frequency bin (either in 1-Hz steps or averaged within predefined frequency ranges such as delta, theta, alpha, beta and gamma).

The data arrangement of the CSV file is explained on pages 71 onward.

**Please note:** While the EEG data in the iMotions output file is completely synchronized with the other data streams from eye tracker, facial expression analysis etc., the CSV files generated by the ABM SDK are not. However, you can use the ABM time stamp in columns B (*Elapsed Time*) and C (*Clock Time*) and compare these numbers with the ABM time stamp stored in the iMotions output file, column "*SDKTimeStamp (Raw)*".

The matching of the data can also be accomplished based on the ABM data columns "*Epoch*".

## iMotions 6.2 and previous

**\[1] Accessing the ABM files (generated by the ABM SDK)**

These files are generated by the ABM SDK and can be accessed as follows:

1. Right-click a respondent with ABM data.
2. Select "Browse ABM files".
3. This will open Windows Explorer, and you can find two folders for each respondent: one folder containing the benchmark data (EEG data during the benchmark) and one folder containing the EEG data during the actual experiment. Please note that the folder/respondent names might differ from the respondent names in iMotions - this is a result of the folders being generated by the ABM SDK. However, you can check when the folder was created. This is the test date for each respondent.

   The data folder contains the following files:
4. These files are explained in more detail in the "B-Alert Software User Manual" (**B-Alert Live Software User Manual.pdf**) - this PDF is installed with the ABM SDK. You can search for it in Windows, but you can also download it from the [partner files on my.imotions.com](https://my.imotions.com/#downloads/partners) under **ABM**. Pages 64pp. contain detailed descriptions of all of these output files, including explanations of the data columns.

   The manual also contains a basic introduction to decontamination, see pages 19 and 61, and how Power Spectral Densities are computed.

**\[2] Power Spectral Density (FFT)**

Power Spectral Density is a frequency-based measure of band power. The following ABM files contain PSD scores:

* \<name\_ID>.Ref\_Raw\.csv
* \<name\_ID>.Ref\_Class.csv

The difference between "Class" and "Raw" can be found in the ABM manual, page 64/65. We recommend going with the "Class" version as the results are based on the decontaminated data and therefore statistically more valid.

In the "Class" file, you can find the general bandwidth power across all electrodes at the very end of the data columns. They are labeled "Theta total", "Alpha total", "Beta total" and "Sigma total". The frequency bands are listed in the manual on page 17: "Default bands are: Theta (3-7 Hz), Alpha (8-13 Hz), Beta (13-29 Hz), and Sigma (12-15 Hz)."

**\[3] Epoch index in the ABM SDK files vs. iMotions**

In the ABM files the epoch index is listed in column 2 ("**Elapsed Time**"). Therefore, "**epoch 1**" in the iMotions files corresponds to the elapsed time **00:00:00:00** which covers the time interval from **00:00:00:00** to **00:00:01:00**.

**\[4] Computing the frontal lateralization index based on PSD data**

Now we'll dig deeper into the computation of the frontal lateralization index. Note that this index covers one widely cited method (Davidson 2004; Coan & Allen 2004; Smith et al., 2017) for calculating frontal alpha asymmetry based off the formula: lnF4 - lnF3 or lnF8 - lnF7. This index states the difference in Alpha power between right and left hemispheres.

One way to calculate this measure from ABM PSD data (ABM format files for each subject) in iMotions versions previous to 6.2 is:

1. Copy the PSD values from the columns for F3\_AlphaTotal (left) and F4\_AlphaTotal (right) (you have the choice to use F7 and F8 if you are using the ABM B-Alert X24 and are interested in lateral electrode sites) in the output file and paste into a different tab.
2. in a new column, calculate the following formula for each cell: ln(F4\_AlphaTotal)-ln(F3\_AlphaTotal)

The PSD scores for electrode F3 can be found in column TT:

The PSD scores for electrode F4 can be found in column XF:

In the resulting column, you will have the moment-by-moment lateralization index, but you can also compute the average over time.

## Downloads

The B-Alert Live Software User Manual (D51-8201-2 Rev 3), `b-alert-live-software-user-manual-d51-8201-2-rev-3.pdf`, is in the [partner files on my.imotions.com](https://my.imotions.com/#downloads/partners) under **ABM**. Sign in with your iMotions account.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/analysis/eeg/abm/analysis-deriving-power-spectral-density-and-frontal-asymmetry-from-the-abm-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
