> 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/signal-processing-r-notebooks/my-library/annotations.md).

# Annotations

Mark and comment on time periods with respondent and stimulus annotations, manually, automatically or from CSV, and export them for analysis.

*This help center article explains how* *to annotate your data.*

Annotations are a simple, but essential tool for analyzing data: they allow you to mark important parts of the data, and to add comments. However, the tool can be used in many different ways. For instance, in observation studies the tool could be used for coding human behavior (**Scenario 1**), but the tool could also be used for epoching data in event-related analyses (**Scenario 2**) or for binning the timeline (**Scenario 3**). In these scenarios, the same annotations tool would be used in very different ways.

If your study already contains recorded events (e.g. from the [API](https://help.imotions.com/lab/sensor-setup/api/imotions-api-setup-and-programming-guides.md)), [live markers](https://help.imotions.com/lab/data-collection/creating-live-markers-during-data-collection.md), or if you set manual markers during the analysis, you can also use these markers to automate the placement of your Annotations (**Scenario 4**).

For most types of stimuli, you can choose between *Respondent annotations* and *Stimulus annotations*. *Respondent annotations* only mark the data of the currently selected respondent, for example when you want to mark something about their individual responses (see for example **Scenario 1**). *Stimulus annotations* are automatically applied to all respondents who were exposed to that stimulus, for example if you want to mark a certain scene in a video (**Scenario 5**). Stimulus annotations are only available for stimuli that can be [aggregated](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/aggregate-replay.md), i.e. that had the same exposure for all respondents (such as for example images or videos).

Note: [Abridged Annotations article](https://help.imotions.com/lab/analysis/using-annotations.md)

## How to set Annotations

Annotations tool can be added and edited in the [Replay](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md) editor, the [Aggregate replay](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/aggregate-replay.md), and the [AOI editor](https://help.imotions.com/lab/analysis/eye-tracking/areas-of-interest/areas-of-interest-aois.md). They will also show in the [Gaze Mapping editor](https://help.imotions.com/lab/analysis/eye-tracking/gaze-mapping/gaze-mapping.md) and can be used to define timelines for the Gaze Mapping procedure, but you cannot edit Annotations here.

![replay\_editor\_bar.JPG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-ab06d40d59b03307db39d28de0336bde3ef1c05a%2F529e51af09_replay_editor_bar.webp?alt=media)

#### Navigate to the Annotations menu

In all editors, you will find a tab for Annotations in the left hand menu, which can be identified by the ![mceclip0.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-6ad5ac585a11469bfd3f27fab695bdca971b5e7e%2Fbb760ba1ac_aei2r1pemu2xf0sndpm41gmceclip0.webp?alt=media) icon. Make sure that all relevant panels are being displayed on screen. This is done by navigating to the interface options menu bar.

![full\_interface\_options\_replay\_editor\_edit.JPG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-0de9d16c7f8f07b59a673327da15a74b16340b86%2F4bf14077a2_full_interface_options_replay_editor_edit.webp?alt=media)

*How to select the panels for navigating through the data*

After having activated the relevant panels, you would navigate to the 'Respondent' menu for selecting a respondent, to the 'Recordings' menu for selecting a stimulus, and to the 'Signals' menu for displaying the signals of interest. Note that the R-processed data will only be available if you have already run the relevant R-Notebooks (see also: [R-Notebooks](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/what-are-r-notebooks.md)).

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

*How to add signals*

Now you should be ready to navigate to the Annotations menu and define a first annotation.

#### Types of annotations: Respondent and Stimulus annotations

*Respondent annotations* are added and edited at the level of the individual Respondent. They make most sense if you want to mark something relating to this individual's data, responses visible in the video recordings, or other study events whose timing varies from respondent to respondent. Respondent annotations are always available in the individual [Replay](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md). In the [AOI editor](https://help.imotions.com/lab/analysis/eye-tracking/areas-of-interest/areas-of-interest-aois.md), they are only available if you are working on an individual recording such as data from mobile eye tracking glasses, website or screen recordings.

*Stimulus annotations* are added and edited for all respondents in your study. They only make sense if you are marking time points that will be the same for all respondents, for example stimulus-based events (such as certain scenes in a video) or fixed time stamps (e.g. binning). They are always available in the [aggregate Replay](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/aggregate-replay.md), and also in the [individual Replay](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md) given that the stimulus is aggregatable. For videos, they are also available in the [AOI editor](https://help.imotions.com/lab/analysis/eye-tracking/areas-of-interest/areas-of-interest-aois.md).

#### Define annotations (manual workflow)

You can set Annotations manually (described here) or through an automated workflow (next paragraph). In order to annotate your data, you first have to define the annotations; hereafter, you navigate through the data to mark the important parts of the data.

Defining a manual annotation is done in the following way.

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

*How to define manual annotations*

Define a new annotation

1. Navigate to the menu *Annotations*
2. Choose to add either a *Respondent* or *Stimulus Annotation*
3. Type a name
4. Keep the toggle set to *manual* (if working with *Respondent Annotations*)
5. Select a key for the annotation (optional)
6. Select a color for the annotation (optional)
7. Click ‘Add’

Now that the annotations are defined, you may start navigating through your data to mark the relevant parts of the data on the timeline. You could either use the allocated keys on the keyboard, or the mouse.

![Slide8.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-533c12d65507e7984f71d8a0283226d42e7ee662%2F4e7deee54c_slide8-8-.webp?alt=media)

*How to place annotations using allocated keys*

Add the annotation(s) to the timeline – using a selected key

1. Set the Step size for the cursor to the right level of precision (e.g., per ‘x’ milliseconds, per frame, etc.)
2. Use the left and right arrow keys to place the cursor precisely where the annotation should start.
3. Press the allocated key for the annotation; now, the annotation shows up from the start time until the end of the timeline.
4. Repeat step 2 to place the cursor precisely where the annotation should end
5. Press the dedicated key for the annotation; now, the annotation is set from the start time until the cursor.

![Slide9.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-087a4cf906311d78a4f633ff8626c456f4afaf8a%2F270d1e7256_slide9-7-.webp?alt=media)

*How to place annotations using the mouse*

Add the annotation(s) to the timeline – using the mouse

1. Hover over the (empty) annotation panel; note that the mouse icon becomes a pencil
2. Use the pencil to manually draw an annotation (by clicking at the desired start location and releasing at the end location); now, the annotation is placed on the timeline, but not with precision.
3. To correct the start time, first, set the Step size for the cursor to the right level of precision (e.g., per ‘x’ milliseconds, per frame, etc.)
4. Use the left and right arrow keys to place the cursor precisely where the annotation should start.
5. Hover over the edges of the annotation; note that the mouse icon becomes a ‘\[’ and ‘]’ in these areas
6. Grasp the start of the annotation (by clicking and holding the mouse ‘\[’) and snap the annotation to the cursor
7. Hereafter, repeat step 4 and 5 and place the cursor precisely where the annotation should end
8. Grasp the end of the annotation (by clicking and holding the mouse ‘]’) and snap the annotation to the cursor

Eventually, the analysis may look like the example below. Here, we used the annotations tool to analyze the composition of a famous cello suite written by J.S. Bach.

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

*Example analysis with annotations*

#### Define annotations (automated workflow)

Annotations can also efficiently be placed by defining a rule based [Markers](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md#markers) in your study, for example [API events](https://help.imotions.com/lab/sensor-setup/api/imotions-api-setup-and-programming-guides.md) or [live markers](https://help.imotions.com/lab/data-collection/creating-live-markers-during-data-collection.md). This saves you time because the same rule will be applied across all respondents and all stimuli. It is also very precise because it eliminates the risk of manual error.

In iMotions 10.0.7 and later, markers generated from the signal processing algorithms such as GSR peak detection, EMG muscle contractions, blinks, facial expression thresholding, or dwelling on AOIs are shown in the replay. Automated annotations can efficiently be placed by defining rule-based GSR peak markers in your study.

Defining an automated annotation is done in the following way.

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

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

*How to define automated annotations*

Define a new automated annotation

1. Navigate to the menu *Annotations*
2. Choose to add a *Respondent Annotation*
3. Type a name
4. Set the toggle to *automated*
5. Click 'Add'
6. Select a start and end trigger
7. Customize offsets (optional)
8. Customize if you wish to subdivide the Annotation (optional)
9. Click ‘Create’

The rule you define will be applied even for Respondents that you have not selected right now.

Epochs (see also **Scenario 2**) can easily be created by selecting the same start and end trigger and working with offsets.

To bin the timeline (see also **Scenario 3**), you can use the function to subdivide the Annotation.

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

*Example analysis with automated annotations*

## Good to know (features)

A few more annotation features are good to be aware of.

#### Add a comment

Firstly, it is possible to add comments to the annotations (only manual, not automated ones).

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

*How to add comments*

To add a comment:

1. Hover over the annotation in the Annotations menu, click the expand button, and then, click the 'text balloon' icon for a given annotation fragment. Alternatively, right-click the annotation fragment in the annotation panel.
2. Click ‘Edit comment’
3. Type a comment
4. Click 'Ok' to confirm

Comments can easily be reviewed and edited by popping out the Annotations field.

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

#### Edit

If you want to rename the annotation, allocate a new key, change the color, or edit the automation rule, this can be done by clicking the edit button.

![Slide11.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-843b06a0d8cb1a1ef8f6b5a6a533c82d200592b4%2Fb58d5d3c72_slide11-3-.webp?alt=media)

*How to edit the annotations*

To edit the annotations:

1. Hover over the annotation in the Annotations menu, and click the ‘pencil’ icon
2. Change the name, select a different key, or choose a new color
3. Click in a random location outside the annotation window to confirm

It is further also possible to edit the start and end times of the annotation fragments (for manually defined Annotations).

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

*How to edit start/end times*

To edit start/end times:

1. Hover over the annotation in the Annotations menu, and click the expand button. Alternatively, right-click the annotation fragment in the annotation panel.
2. Click on the start/end time of a given annotation fragment.
3. Type a new start/end time

#### Lock an annotation

To prevent unwanted changes to the annotations, you may choose to lock the annotations after placement.

![Slide13.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-2140bcf66a40bc5a1cc038eaed33466d7338b522%2F3a67bc39c7_slide13-3-.webp?alt=media)

*How to lock the annotations*

To lock the annotations:

1. Hover over the annotation in the Annotations menu, and click the ‘lock’ icon. Alternatively, right-click an annotation in the annotation panel, and click 'Lock annotation'

#### Copy to other respondents

If you want to set Annotations that apply to all respondents, you would typically use *Stimulus annotations*. However, these are only supported for [aggregatable](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/aggregate-replay.md) stimulus types whereas certain scenarios (e.g. binning, see also **Scenario 3**) would require to set the same annotations across respondents. In this case, you can choose to copy an annotation to other respondents.

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

*How to copy annotations to other respondents*

To copy to other respondents:

1. Right-click the annotation in the Annotations menu, and click 'Copy to other respondents'
2. Confirm by clicking 'Ok'

#### Markers

The annotations tool would often also be used in conjunction with markers.

Markers are discrete point markers that are either already placed *during* the data collection (e.g. [Live markers](https://help.imotions.com/lab/data-collection/creating-live-markers-during-data-collection.md) or [API events](https://help.imotions.com/lab/sensor-setup/api/imotions-api-setup-and-programming-guides.md)), obtained by processing the recorded sensor data, or manually placed during the analysis. Using existing markers can speed up the placement of annotations (as you can now navigate through the data from marker to marker) as well as increase the precision of the annotation placement (see [Scenario 2](#scenario-2-epochs)).

You can read more about markers [here](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md).

#### Delete

Finally, it may also be useful to know how to delete annotations. You may either delete individual annotation fragments (in individual respondents), or the entire annotation; the latter deletes the annotation for all respondents.

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

*How to delete an annotation fragment*

To delete an annotation fragment (in one respondent):

1. Hover over the annotation in the Annotations menu, click the expand button, and then, click the 'trash bin' icon for a given annotation fragment. Alternatively, right-click the annotation fragment in the annotation panel, and click 'delete interval'.

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

*How to delete an annotation*

To delete the annotation (in all respondents):

1. Right-click the annotation in the Annotations menu, and click 'delete annotation'.

## Import from csv

It is possible to define the start and end times of annotations in an external csv file and then import them to your study.

This csv file needs to contain the following columns:

* Respondent Name
  * *Allowed values are: Text input or blank.*
  * *If specified, the annotation will only be applied to this respondent.*
  * *If left blank, the annotation will be applied to all respondents in the study.*
* Stimulus Name
  * *Allowed values are: Text input or blank.*
  * *If specified, the annotation will only be applied to this stimulus.*
  * *If left blank, the annotation will be applied to all stimuli in the study.*
* Marker Type
  * *Allowed values are:* Respondent Annotation *or* Stimulus Annotation *(or blank)*
  * *If* Respondent Annotation *is specified, the annotation will be added as Respondent annotation and only be shown in individual respondent’s recordings.*
  * *If* Stimulus Annotation *is specified, the annotation will be added as Stimulus annotation and be shown in aggregated replays. Stimulus annotations are always added to all respondents, so specifying a Respondent name is not needed.*
  * *If left blank, the annotation is added as Respondent annotation.*
* Marker Name
  * *Allowed values are: Text input.*
  * *Name of the Annotation. This must be specified and cannot be left blank.*
* Start Time (ms)
  * *Allowed values are floats (numeric values with decimals indicated by a “.”).*
  * *Start time of the annotation relative to stimulus start, in milliseconds.*
* End Time (ms)
  * *Allowed values are floats (numeric values with decimals indicated by a “.”).*
  * *End time of the annotation relative to stimulus start, in milliseconds.*
* Comment
  * *Allowed values are: Text input or blank.*
  * *Optional.*
  * *Comment to be added to the current annotation segment.*
* Color
  * *Allowed values are: Text input or blank.*
  * *Optional.*
  * *Must be specified in hex code.*

This is an example for how the definition could look like:

| **Respondent Name** | **Stimulus Name** | **Marker Type**       | **Marker Name** | **Start Time (ms)** | **End Time (ms)** | **Comment**                                        | **Color** |
| ------------------- | ----------------- | --------------------- | --------------- | ------------------- | ----------------- | -------------------------------------------------- | --------- |
|                     |                   |                       | First 10s       | 0                   | 10000             | This marks the first ten seconds of every stimulus | #0000FF   |
|                     | Chewing gum ad    | Stimulus Annotation   | Brand mentioned | 5000                | 5500              | Actress mentions brand                             | #2FD09F   |
|                     | Chewing gum ad    | Stimulus Annotation   | Brand mentioned | 21000               | 21500             | Brand presented in video                           | #2FD09F   |
| Respondent 1        | Chewing gum ad    | Respondent Annotation | Laughed         | 4000                | 4500              |                                                    | #FF0000   |
| Respondent 1        | Rating scale      | Respondent Annotation | Laughed         | 1200                | 1700              |                                                    | #FF0000   |
| Respondent 2        | Chewing gum ad    | Respondent Annotation | Laughed         | 8500                | 9000              |                                                    | #FF0000   |
| Respondent 2        | Rating scale      | Respondent Annotation | Laughed         | 3500                | 3800              |                                                    | #FF0000   |

You can find a template attached to the bottom of this Help Center article which you can use to populate your annotation definitions.

Please note that the headers must specifically be called as shown above, and the file must not contain any other headers. iMotions will check the file for errors and notify you in case invalid formatting was found.

To import the defined annotations to your study,

1. Right click on the study name
2. Select External Data > Import annotations from csv
3. And browse for the file that you want to import

In case your study already contains annotations with the same name, you will be asked if you want to

* Rename: Will add a new annotation in addition to the existing one, with an appended ID
* Replace: Will overwrite all already existing instances of the existing annotation and only place the imported new annotation
* Ignore: Will not import the new annotation

In the end, you will receive information about the imported annotation as well as information about annotations that

* were renamed
* were replaced
* were ignored
* had to be trimmed, because the specified end time exceeded the actual duration of the stimulus they were applied to
* had to have segments discarded, in case they overlapped with other segments or started later than the stimulus ended
* could be imported unaltered
* could not be imported because the specified respondent or stimuli did not exist in the study

## A few scenarios

The annotations tool is a versatile tool, which can be used in many different ways depending on the scenario. Below, we discuss how to use the annotations tool most optimally in three common research scenarios: **(1)** for human behavior coding, **(2)** for epoching, and **(3)** for binning.

#### Scenario 1: Human behavior coding

One common way of using the annotations tool is for coding human behavior, meaning: for making qualitative ‘observations’. This type of coding could already be done live, using the Live marker functionality (see also: [**Live markers**](https://help.imotions.com/lab/data-collection/creating-live-markers-during-data-collection.md)), or it could be done after the fact, by replaying the recordings and placing annotations. In this scenario, you would define a set of anticipated behaviors, and then, code the respondents' behavior *while* making your observations, hence, *while* replaying the recording.

This type of coding could be done in the following way.

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

*Example scenario 1: human behavior coding*

For human behavior coding:

1. Define a Respondent annotation for every type of observation you expect to make, and set a different key for each of the annotations
2. Replay the video-recording at normal speed (1x), at double the speed (2x) or in slow-motion (0.5x, 0.25x)
3. Press the annotation key when you observe the expected behavior
4. Press the annotation key again when the expected behavior is no longer observed; now, the annotation is placed on the timeline, but not yet with precision.
5. If you want to correct the start and end time of the annotations, pause the recording and define a Step for navigating through the recording with precision. This could be a step in milliseconds (e.g., 100 milliseconds), or per 'Frame'. Hereafter, navigate the cursor to the exact time in the recording (by using the left and right arrow keys on the keyboard). As soon as the cursor is placed correctly, snap the border of the annotation to the cursor.

Note that Respondent annotations always mark a time-interval (with a start and end time). This is different from point markers, which only mark unique time-events.

Demo study: In-store VR (Shelf-testing in VR environment)

#### Scenario 2: Epochs

A second way of using the annotations tool is for defining event-related 'epochs'. This is a classic approach for studying the responses *to* certain events. In this scenario, you would typically have a lot of repetitions of the same events, and you would define a time-window of a certain window length centered around the events. For instance, it could be that you would define time-windows that range from 1 second before until 2 seconds after every event. It could also be that you would define time-windows that range from an onset event (e.g., a stimulus appears) to an offset event (e.g., a response is being made), for instance, to analyze response times.

In this type of study, the precise timing of the events is usually very important, and you would have used the API for coding the events with great precision; this is essentially the same functionality as Live markers (see also: [Live markers](https://help.imotions.com/lab/data-collection/creating-live-markers-during-data-collection.md)), but with automated placement of the markers (rather than a manual placement) using the API.

If onset and offset events were coded using API markers, the epochs can be created in the following way:

For epoching:

1. Define an automated Annotation for every type of epoch you want to create
2. Pick the relevant start and end triggers for your epoch
3. Adjust offsets if needed

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

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

Demo study: Strooptest (Psychology experiment)

#### Scenario 3: Binning

A third common way of using the annotations functionality is for ‘binning’ the timeline. Binning means that you subdivide the timeline into time-windows of a fixed window length; for instance, time-windows of 1 second, of a few seconds, or even a few minutes (depending on the type of sensor data you want to analyze). This is typically something you would do to study the progression of your data over time.

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

Binning can be done in the following way.

1. Define an automated Annotation
2. Choose a start trigger from where onwards you want to bin the data, for example the Start of the Recording or the Start of the Stimulus
3. Choose an end trigger on which you want to stop binning the data, for example the End of the Recording or the End of the Stimulus
4. Choose to subdivide your intervals and the length of each subdivision

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

Demo study: Sony Bravia (Testing of video commercials)

#### Scenario 4: Annotating data based on other markers

To speed up data segmentation, you may have placed live markers already during data collection. Similarly, you might have sent triggers over the API, or placed manual markers when reviewing the data.

Now, you can use these event markers as start and stop events for your Annotations. It is possible to automate this so that you can efficiently place Annotations across all respondents and stimuli with these event markers.

This can be done the following way:

1\. Add a new automated Annotation

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

2\. Select the start and end triggers for your Annotation from the list of all events

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

3\. Review if the Annotation is correctly placed

![mceclip2.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-39f17b2174fa4b64c7e0dc83a09e06763d5dbc7b%2F1dc3c29079_v8rekzsouu2ybwqzuh6bcgmceclip2.png?alt=media)

#### Scenario 5: Annotations relative to signal events

iMotions' signal processing generates analysis markers, for example GSR peaks, blink onset/ offsets, muscle contraction onset/ offsets, or when eye tracking gaze enters or leaves an AOI (dwell start/ end). Using these analysis markers together with automated Annotations allows you to triangulate data from different modalities as annotations are included in all summary metrics exports available from signal processing.

For AOI dwells, you can create annotations from a preset to annotate in one go when respondents were looking at the AOIs you drew:

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

When you're in the marker section of the replay, you should now see two types of event: Dwell Start and Dwell End. Enabling these will add them to the Marker timeline.

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

This will allow you to add a manual marker for when the specific AOI starts and when it ends. After confirming you have done both types of events. Then you can use the AOI dwelled on function as seen in the image on the left hand side.

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

If you select any or all AOIs linked to this stimuli, it will create annotations based on the Dwell start and end. An annotation shows up in many different exports. Primarily into the Sensor data export. This is a quick, fast way to get all your sensor data while the AOI is looked at segmented into a Row of data. e.g see next picture

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

Row 39 shows the data collected for when an AOI was active, via the Annotation that was created.

#### Scenario 6: Video-based analyses

Working with Stimulus annotations makes sense if your analysis is stimulus-driven and the events happen at the same time for every respondent. This is the case for videos (e.g., video commercials, trailers, films, etc.) as the videos play at the same speed for every respondent. Hence, if your analysis focuses on the respondents' emotional response to the events in the video, you may consider using the Stimulus annotations for analyzing these responses. This has the advantage that the annotations immediately apply to all respondents, but also that you would be able to review the aggregated signals in relation to the Stimulus annotations. For instance, this is useful when you want to identify the parts of a video that, at the group level, evoke the strongest emotional responses.

Video-based analyses could be done in the following way.

*Example scenario 1: video-based analysis*

For video-based analyses:

1. Define annotations for marking the video events, and set a different key for each of the annotations
2. Replay the video-recording at normal speed (1x), at double the speed (2x) or in slow-motion (0.5x, 0.25x)
3. Press the annotation key when the event starts
4. Press the annotation key again when the events end; now, the annotation is placed on the timeline, but not yet with precision.
5. If you want to correct the start and end time of the annotations, pause the recording and set the 'Step' to 'Frame'. Hereafter, navigate the cursor to the exact frame in the recording (by using the left and right arrow keys on the keyboard). As soon as the cursor is placed correctly, snap the border of the annotation to the cursor.

Demo study: Sony Bravia (Testing of video commercials)

## Export

The annotations can finally be exported in various ways.

#### Export annotations (.txt)

A first option is to export a list of annotations (.txt). This export file lists the annotations for every respondent, including **(1)** start time, **(2)** end time, **(3)** duration, and **(4)** added comments.

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

*Example export of a list of annotations*

The same functionality that exports this list of annotations also exports an 'aggregated' version of the same file (.txt), listing **(1)** the average duration and **(2)** standard deviation of the annotation duration across all respondents included in the analysis.

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

*Example export of the aggregated list of annotations*

Read more: Export: Annotations

#### Export annotations as part of sensor data export files (.csv)

The annotations can also be exported as part of the sensor data export files (.csv). Here, the annotations mark all data samples that are present within the time range of the annotations.

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

*Example of annotations in a sensor data export file (.csv)*

#### Export annotations as part of R-processed export files (.txt)

The annotations can further also be exported as part of most R-processed export files (.txt). Here, the annotations serve as 'measurement windows' for the data generated by R Notebooks (see also: [**R-Notebooks**](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/what-are-r-notebooks.md)).

For instance, if you would have applied a peak detection R Notebook for detecting peaks in the electrodermal activity data (a measure of physiological arousal) and you export the metric export file, then you would be able to retrieve the peak results *for every annotation* and even *for every annotation fragment* (e.g., whether a peak was detected, how many peaks were detected, the average amplitude of the peaks, etc.).

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

*Example of annotations in an R-processed export file (.txt)*

Read more: How to export R-processed data?

#### Export image (.png) or video of annotated graphs (.wmv, .mp4)

A final export option is to export an image (.png) or video (.wmv, .mp4) of the graphs visualized in the Replay editor, including the annotations placed.

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

*Preview of an annotated graph export*

**Read More:** [**Replay**](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md)

*If you want to see the Annotations tool in action, or if you want to play around with the Annotations tool yourself, please consider downloading the* [*Sony Bravia (Testing of video commercials)*](https://help.imotions.com/lab/getting-started/demo-studies/9-0-demo-studies/demo-study-sony-bravia-testing-of-video-commercials-9-0.md)*,* [*In-store VR (Shelf-testing in VR environment)*](https://help.imotions.com/lab/getting-started/demo-studies/9-0-demo-studies/demo-study-in-store-vr-shelf-testing-in-vr-environment-9-0.md)*, or* [*Strooptest (Psychology experiment)*](https://help.imotions.com/lab/getting-started/demo-studies/8-1-demo-studies/demo-study-strooptest-psychology-experiment.md) *demo-studies.*


---

# 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/signal-processing-r-notebooks/my-library/annotations.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.
