> 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/analysis-archive/analysis-gsr-peak-detection-and-aggregation.md).

# Legacy 8.0 Analysis: GSR Peak Detection & Aggregation

*This article covers analysis options for GSR Peak Detection. Note the versions of iMotions below:*

[iMotions 7.2-8.0](#imotions-7.2-8.0)

[iMotions 7.2 and previous](#imotions-7.2-and-previous)

## iMotions 7.2-8.0

Variations in the phasic component of the Galvanic Skin Response (GSR) signal are visible as GSR peaks. And this phasic response is sensitive to emotional stimuli and can be considered as an index of autonomic activity. GSR peaks can be indicative of autonomic arousal based on a certain stimuli or situation. The aggregation procedure can be used to get insights into the consistency of your respondents' autonomous arousal elicited by the provided stimulus.

This article describes the GSR peak detection and aggregation of GSR peaks across respondents based on our new R-notebook integration.

There are two R-notebooks concerned with (1) **GSR Peak Detection:** the single respondent peak detection and (2) **GSR Peak Binned Aggregation**: the aggregation of the peaks across respondents.

This article includes:

1\. [Prerequisites](#id-1.-prerequisites)

2\. [How to Analyze in iMotions Desktop](#id-2.-how-to-analyze-in-imotions-desktop)

(1) [GSR Peak Detection](#as-for-gsr-peak-detection-r-notebook-the-following-steps-need-to-be-followed)

(2) [GSR Peak Binned Aggregation](#as-for-gsr-peak-binned-aggregation-r-notebook-the-following-steps-need-to-be-followed)

3\. [GSR Peak Detection and Aggregation Algorithm](#id-3.-gsr-peak-detection-and-aggregation-algorithm)

(1) [GSR Peak Detection](#the-gsr-peak-detection-algorithm)

(2) [GSR Peak Binned Aggregation](#the-peak-binned-aggregation-algorithm)

4\. [The Outputs](#id-4.-the-outputs)

## 1. Prerequisites

Supported stimulus types: all

Supported sensors: Shimmer, Biopac

Supported iMotions version: iMotions 8.0

## 2. How to Analyze in iMotions Desktop

A more general introduction on how to run R-Notebook in iMotions is documented *here*.

#### As for GSR Peak Detection R-Notebook, the following steps need to be followed:

1. Create a new analysis for the study for which you wish to run the GSR R-Notebook.

   ![Create\_analysis.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-0dfdab4c018a38ac580e462c0ffacef932987132%2F7e9bb2c488_create_analysis-3-.png?alt=media)
2. Advance through the steps "Segmentation settings" with your preferred selections and "Segmentation criteria" until you reach the step "Signal processing".

   ![mceclip0.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-0f684d1ca3305b77dac731ae0d25682694684708%2Ffa9ddaba54_xuphhmjm9ussyjaw2aezwmceclip0.webp?alt=media)
3. By clicking "+" next to "Active flows" you can start to select the algorithms you want to use for signal processing. Select the sensor for which you want to apply the GSR signal processing algorithm in the drop-down "Device" menu. Select the algorithms in the drop-down “Algorithm” menu.

   ![select\_sensor2.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-8663d322a6dcdaaae8b75e4d05bb995b3f5e7c59%2F2f94b4d17c_select_sensor2.webp?alt=media) ![select\_algo.2png.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-e1c2774f7d73763046500274be7072b65523e669%2Fa16f3c3478_select_algo.2png.webp?alt=media)
4. Name the analysis in the "Flow name" menu. Alter the parameters to suit your research needs, then click on “Next”. The parameters will be described in details in the next section of this article: [GSR Peak Detection and Aggregation Algorithm](#id-3.-gsr-peak-detection-and-aggregation-algorithm). ***Note: ONLY for the situation when you use both Shimmer and Biopac for GSR data collection: when creating analysis for Biopac GSR, please make sure to select "Biopac" in the "Selected sensor" drop-down menu. When creating analysis for Shimmer GSR, you can leave it as "Autodetect" or select "Shimmer".***

   ![Alg\_parameters.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-a1a71e1854b41367654695d729f94030b9015ec1%2F703d3c2d07_alg_parameters.webp?alt=media)
5. Select the stimulus to be included in the analysis. Then click the "Add" button to add the analysis and close the dialog.

   ![select\_stimulus.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-67c53bd2a5b22fe57a591c351f16fc4e9150aae8%2F915c3f88a2_select_stimulus.webp?alt=media)

#### As for GSR Peak Binned Aggregation R-Notebook, the following steps need to be followed:

***Note: The GSR Peak Binned Aggregation R-Notebook can only be executed together with the execution of GSR Peak Detection R-Notebook. This means you need to add two R-Notebooks to the analysis if you want to do aggregation - one is GSR Peak Detection R-Notebook, one is GSR Peak Binned Aggregation R-Notebook.***

The first two steps are the same as described above for GSR Peak Detection R-Notebook. In the step 3, please make sure to add two R-Notebooks in the analysis. Alter the parameters to suit your research needs, then click on “Next”. The parameters will be described in details in the next section of this article: [GSR Peak Detection and Aggregation Algorithm](#id-3.-gsr-peak-detection-and-aggregation-algorithm).

![Aggregation\_select\_alg.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-55860ea201338eb755f86f1d13cf280147bebcee%2Fcd9492e466_aggregation_select_alg.webp?alt=media)

The same as described above for the GSR Peak Detection R-Notebook, select the stimulus to be included in the aggregation analysis. Then click the "Add" button to add the aggregation analysis and close the dialog.

## 3. GSR Peak Detection and Aggregation Algorithm

Peak detection is accomplished by separating the faster emotional related changes in GSR, or Phasic signal, from the background process, or slower Tonic signal.

#### The GSR peak detection algorithm:

The algorithm is mostly based on the *one* described in the iMotions help center. Additional information about the methods can be found in paper [(benedek 2010)](#references).

1\. The calibrated GSR signal from the sensor (Shimmer or BIOPAC EDA100C) is retrieved for the given stimulus and respondent (expressed in microSiemens, µS). 2. The sample rate is determined.

If the sensor is Shimmer, parameter **\[Gap interpolation length threshold \[ms]] is** used to identify possible gaps in the signal due to signal drops. If a gap in the signal is shorter than this threshold, then the missing data is linearly interpolated. Otherwise, the gap is left and each of the signal fragments is processed separately. 3. The phasic signal is extracted using a median filter over a fixed length time window: parameter **\[Phasic filter length \[ms]]**. The phasic signal is calculated by subtracting the running median from the calibrated signal, smoothing the ends of the signal by using symmetrical medians of subsequently smaller bandwidth, but for the very first and last value where [Tukey's robust end-point rule](#references) is applied. 4. A low-pass [Butterworth filter](https://en.wikipedia.org/wiki/Butterworth_filter) with cutoff frequency: parameter **\[Lowpass filter cutoff frequency \[Hz]]** is applied to the phasic signal (in order to remove powerline noise). 5. Onsets and offsets are detected on the phasic signal. Onsets are all the points where the phasic signal crosses above the onset threshold: parameter **\[Peak onset threshold \[microSiemens]]**. Offsets are the points where the phasic signal crosses below the offset threshold: parameter **\[Peak offset threshold \[microSiemens]]**. Each onset-offset pair defines a window, and the maximum value attained by the calibrated signal in a window is marked as a possible peak. The amplitude of a possible peak is defined as the difference between the maximum value of the calibrated signal in the window and its value at the onset point. A possible peak is selected if: (1) Its amplitude is above the amplitude threshold: parameter **\[Peak amplitude threshold \[microSiemens]]**, and (2) the time difference between onset and offset is above the duration threshold: parameter **\[Minimum peak duration \[ms]]**.

The selected peaks are returned.

#### The Peak Binned Aggregation algorithm:

**Since GSR peaks across respondents might vary in latency and/or amplitude, the aggregation cannot be a simple average of all GSR waveforms across respondents. Instead, GSR aggregation is accomplished based on binarization of the signal.**

**iMotions can count the number of respondents that had "a response" (*****at least*****&#x20;one GSR peak) in a time window: parameter \[Time bin length \[ms]]. The aggregated result therefore relates directly to the audience and the time window, e.g., 10 out of 29 respondents had a response in the time interval 02:00 - 02:09.**

**1. Break the continuous data of each respondent during the selected stimulus into bins with a certain length: parameter \[Time bin length \[ms]] (5 seconds; default) and overlap: parameter \[Time bin overlap \[ms]] (1 second; default). 2. For each respondent, assign a value of "1" to bins that contain&#x20;*****at least*****&#x20;one GSR peaks (including the overlap). Assign a value of "0" to bins that contain no GSR peak (including the overlap). Instead of the actual GSR peak amplitudes, the binary values 0 or 1 are used. 3. Sum up the binary scores for a bin across all respondents. For example, if you collected GSR data from 10 respondents and all of them had at least one GSR peak in a certain bin, then the aggregated value for this bin is 10. If none of your respondents had a GSR peak in the bin, then the aggregated value for this bin is 0.**

![Aggregation\_alg\_2\_001.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-acdba9e701fbacb878ffde5b0944be3cb6b8bb5a%2F6639513e13_aggregation_alg_2_001.webp?alt=media)

*GSR aggregation example: In the second bin (5s - 10s), 45 respondents had at least one GSR peaks (counted from the bin including the overlap: 4.5s - 10.5s).*

## 4. The Outputs

A more general introduction on R-Notebook outputs in the iMotions is documented *here*.

* *Desktop*: In the individual replays of data the peaks detected and displayed as follows:

  ![individual\_replay.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-cce5c97dec10c5320d4d7707e77529a4eedb69fd%2F240740d36d_individual_replay-3-.webp?alt=media)

**GSR Metrics:**

1\. **\[Peak count]**: Number of detected peaks the respondent had during this stimulus/scene.

2\. **\[Peaks per minute]**: the number of peaks the respondent had total during this stimulus/scene divided by the duration of the stimulus/scene expressed as peaks/min.

3. **\[Signal missing]**: The percentage of lost data during collection.

4\. **\[Exposure time]**: Stimulus/scene duration.

5\. **\[Average peak amplitude]**: Average amplitude of detected peaks the respondent had during this stimulus/scene.

**GSR Peaks**:

1\. **\[GSR Raw (microSiemens)]**: raw GSR data as an impedance measure.

2\. **\[GSR Interpolated (microSiemens)]**: GSR signal after interpolation process.

3. **\[Tonic signal (microSiemens)]**: a slow-varying component of GSR signal

4\. **\[Phasic signal (microSiemens)]**: a faster-varying phasic component of GSR signal

5\. **\[Peak detected (binary)]**: GSR peak samples (GSR values between onset and offset) are assigned a value of "1". Other samples outside the peak duration are assigned a value of "0".

6 **\[Peak amplitude (microSiemens)]**: GSR amplitude at the peak minus GSR amplitude at the onset.

7\. **\[Peak times]**: The time of the detected GSR peak.

8\. **\[Signal interpolation (binary)]**: GSR samples obtained by interpolation are assigned a value of "1". Other samples that are not obtained by interpolation are assigned a value of "0".

* *Exported files*: Please refer to article *here* on how to access the exported files from R processing. There are two types of files you can access: **Sensor Data file** and files from R processing (**GSR Summary Scores, Peaks Per Respondent** and **Moment To Moment Per Respondent**).

1. **Sensor Data file**: raw sensor data export. Can also include processed signals by ticking "Post imported data".

![Export-Post\_imported\_data.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-9ca3837b2afb3a86fde28e030f1533f098ee2d63%2F573158fb3a_export-post_imported_data.webp?alt=media)

2. **GSR Summary Scores, Peaks Per Respondent** and **Moment To Moment Per Respondent:** Processed results from R-Notebooks. The current versions of these files are described in [Export: R Processed GSR Files](https://help.imotions.com/lab/exports/r-processed-exports/export-r-processed-gsr-files.md).

* *HTML output*:

  A one-page readout is generated, along with presenting the actual R Code used to calculate the results, descriptions of each of the analysis steps, and links to the articles that were referred to when writing the algorithm’s script.

  In brief, to find the HTML file:

  1. Right click on your analysis and select “Explore Folder”
  2. Go into the “Ex\_Api\_ Data” folder.
  3. Here you will find a folder for each **participant**. Click into any of these.
  4. Select the folder describing an **algorithm** (e.g. GSR Peak Detection).
  5. Open the HTML file for the stimulus of your choice to see the R-Notebook readout, as below. An example of the HTML output is in the attachment.

![HTML\_Output.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-1767c885803b620aa9df5654baf4ba6997f04c41%2Fa6dc90aad1_html_output.webp?alt=media)

## References

Benedek, Mathias, and Christian Kaernbach. 2010. “A Continuous Measure of Phasic Electrodermal Activity.” *Journal of Neuroscience Methods* 190 (1): 80–91. <https://doi.org/10.1016/j.jneumeth.2010.04.028>.

Tukey's robust end-point rule: <https://stat.ethz.ch/R-manual/R-devel/library/stats/html/runmed.html>

## iMotions 7.2 and previous

*This article describes the method by which iMotions aggregates GSR data using our peak detection algorithm.*

1. Prerequisites
2. Step-by-Step Instructions
3. GSR Peak Detection and Aggregation Algorithm
   1. Algorithm
   2. Optimizing the peak detection algorithm
   3. Aggregation of data
   4. GSR Data
   5. Parameters for GSR Peak Detection and Aggregation

For GSR sensors (Shimmer, Biopac EDA100C) and any type of stimulus iMotions introduces individual GSR peak detection and innovative aggregation procedures. Please note that GSR data from the EMPATICA wristband is currently not supported by the peak detection algorithm.

Benefits of this procedure are:

1. You can use this innovative GSR aggregation procedure to get insights into the consistency of your respondents' autonomous arousal elicited by the provided stimulus material.
2. Working with time windows, iMotions can pool together GSR peaks that are happening approximately at the same time.
3. iMotions can count the number of respondents that had "a response" (at least one GSR peak) in a time window. The aggregated result therefore relates directly to the audience, e.g., 10 out of 29 respondents had a response in the time interval 02:00 - 02:09 (right-click on the image and select "View Image" to expand).

**1. Prerequisites**

* Supported stimulus types: all, including scenes. Supported sensors: Shimmer3 GSR+, Biopac EDA100C.

**2. Step-by-Step Instructions**

1. Create an analysis: In the iMotions library, right-click your study and select "Add Analysis" from the context menu. Specify the segmentation criteria (respondent gender, age, group etc.).
2. In the analysis tab "Signal Processing", and select the appropriate settings. The different settings are described in details in section 3 of this article. **Please note that the lowpass filter is only available from iMotions 6.3.**
3. Then click "Add" to close the dialog.
4. In the stimulus bar, click the stimulus that you would like to generate the aggregate for \[B]. Click "Aggregate" \[C]. The sensor data will now be aggregated. Once aggregation has been accomplished, click "Edit result" \[D] (right-click on the image and select "View Image" to expand).
5. During aggregation, iMotions applies the selected data processing steps for GSR filtering (available from iMotions 6.3 and onwards), denoising and peak detection. The details of this procedure as well as scientific citations are listed in section 3, GSR Peak Detection and Aggregation Algorithm, below.
6. In the aggregation window, iMotions has added an additional data channel with the name of the analysis workflow selected above. Expand the sensor group.
7. The GSR Peak detection now shows the number of respondents with at least one GSR peak within the respective time interval. In the currently active interval (03:09 - 03:17) a total of 7 out of 29 respondents (24.13%) showed at least one GSR peak, indicating autonomous arousal elicited by the stimulus material shown on screen.
8. In the individual replays of data the peaks detected and displayed as follows:
9. Shimmer data graph: GSR (CAL µSiemens) - raw GSR data as an impedance measure.
10. Peak detection data graph: Peak detected - GSR peaks detected across the defined time bins.
11. Peak detection data graph: GSR (CAL µSiemens) - red dots indicate significant peaks in GSR raw data.
12. Peak detection data graph: Phasic - red dots indicate significant peaks in GSR phasic data.

**3. GSR Peak Detection and Aggregation Algorithm**

Peak detection is accomplished by extracting the faster emotional related changes in GSR or Phasic signal to the background process or slower Tonic signal.

Algorithm

To find the peaks for respondent data, the algorithm runs through the set of steps below. More details follow on the bold terms.

1. Get calibrated GSR signal (µSiemens)
2. Calculate sample rate based on samples.
3. Phasic data extraction based on the sliding window **\[Mean Filter]**
4. **\[Lowpass Filter]** of the Phasic data (default: 5Hz) to remove line noise
5. Detect peaks in phasic data signal using **\[Onsets and Offsets]**, **\[Peak Amplitude Threshold]**, and **\[Signal Jump Threshold]**
6. Bin data (assign data to a virtual “bin”)

**\[Mean filter]**: Extract the phasic data from the original GSR signal using a mean filter: For each sample, compute the mean GSR of the time interval \[-4s; +4s] centered on the current sample. The time interval is adjustable by changing the 8000 ms default 'Phasic Data Averaging Window' setting in the signal processing tab when adding an analysis. Subtract the mean GSR value from the current sample. The result is the phasic data.

**\[Lowpass filter]:** The purpose of introducing a lowpass filter is to filter out noise components of the GSR signal. This is a common procedure in signal processing. Dominant noise components would typically be line noise from computers, power outlets etc. This is less of an issue with the BIOPAC GSR sensor since an analog filter is present on the amplifier itself. The default value of the filter is set to 5Hz. Filling in a value of zero (0) will disable the filter.

**\[Onsets and offsets]:** In the phasic data, find peak onsets (> 0.01 uS; default) and offsets (< 0 uS). These values can be adjusted from default in the 'Peak Onset/Offset Start/Stop Thresholds' in the signal processing tab while adding an analysis. The onset/offset defines regions where we look for peaks.

**\[Peak amplitude threshold]:** In the original GSR data, within each pair of onsets and offsets find the maximum values. These are the GSR peaks. GSR peak amplitude is the amplitude at the peak minus the amplitude at onset. iMotions will only consider a peak if it crosses the 'Peak Amplitude Threshold' which is by default .005 above the GSR value at onset but can be adjusted in the signal processing section when adding an analysis.

**\[Signal Jump Threshold]:** The 'Signal Jump Threshold' accounts for false positive peaks due to sudden jumps in the data. Sudden jumps can arise from movement artifacts etc. and are not picked up by the filters.The signal jump threshold allows you to not consider for further analysis data points where the signal jumped by default 0.1 uS from one sample to the next. This can be adjusted in the signal processing section when adding an analysis.

After these steps, iMotions has access to all GSR peaks of a respondent for the selected stimulus.

Optimizing the peak detection algorithm

In some cases it might be useful to change the default settings of the peak detection algorithm. Although the lowpass filter removes baseline noise there might still be residual noise in the signal depending on the sensor used. Baseline noise could mean that the sample to sample change is larger than the default setting of 0.1 uS for the jump threshold. In this case all data will be seen as invalid data and no peak will be identified. Therefore setting the jump threshold to .05 or higher might be useful in some scenarios. Please keep in mind that this may cause more artifacts to be identified as peak. In addition, if the GSR peaks are small lowering the onset threshold and the amplitude threshold could be used to optimize the identification of peaks.

Aggregation of data

Since GSR peaks across respondents might vary in latency and/or amplitude, the aggregation cannot be a simple averaging of all GSR waveforms across respondents. Instead, GSR aggregation is accomplished based on binarization of the signal:

1. Break the continuous data of each respondent during the selected stimulus into intervals with a certain window length (5 seconds; default) and window overlap (1 second; default).
2. Assign a value of "1" to intervals that contain at least one GSR peak. Assign a value of "0" to intervals that contain no GSR peak. Instead of the actual GSR peak amplitudes, the binary values 0 or 1 are used.
3. Sum up the binary scores for a bin across all respondents. For example, if you collected GSR data from 10 respondents and all of them had at least one GSR peak in a certain interval, then the aggregated value for this interval is 10. If none of your respondents had a GSR peak in the interval, then the aggregated value for this interval is 0.

*GSR aggregation for 10 exemplary respondents. In the first interval, 6 out of 10 respondents had at least one GSR peak (6/10). In the second interval, none of the respondents had a peak (0/10) etc.*

Individual peak detection and parameter selection for GSR aggregation is based on the following resources:

* M. E. Dawson, A. M. Schell, and D. L. Filion. **The electrodermal system.** In J. T. Cacioppo, L. G. Tassinary, and G.B. Bernston, editors, *Handbook of Psychophysiology: second edition*, pages 200–223. Cambridge Press, Cambridge, 2000.
* AcqKnowledge User Manual (BIOPAC).
* Bakker, J., Pechenizkiy, M., & Sidorova, N. (2011). **What’s your current stress level? Detection of stress patterns from GSR sensor data.** In *Proceedings - IEEE International Conference on Data Mining, ICDM* (pp. 573–580). doi:10.1109/ICDMW\.2011.178
* Guo, R., Li, S., He, L., Gao, W., Qi, H., & Owens, G. (2013). **Pervasive and Unobtrusive Emotion Sensing for Human Mental Health.** *Proceedings of the ICTs for Improving Patients Rehabilitation Research Techniques*, 436–439. doi:10.4108/icst.pervasivehealth.2013.252133
* Benedek, M., & Kaernbach, C. (2010). **Decomposition of skin conductance data by means of nonnegative deconvolution.** *Psychophysiology*, *47*, 647–658. doi:10.1111/j.1469-8986.2009.00972.x
* Benedek, M., & Kaernbach, C. (2010). **A continuous measure of phasic electrodermal activity.** *Journal of Neuroscience Methods*, *190*, 80–91. doi:10.1016/j.jneumeth.2010.04.028

**4. GSR Data**

There are 5 different folders/ files you can look to for GSR data. The GSR Data Files Explained article goes into detail on the contents and usages of each.

**5. Parameters for GSR Peak Detection and Aggregation**

When you run an aggregation, iMotions uses the following default parameters:

1. Peak detection (unit for all: µS)

* peak onset threshold: 0.01
* peak minimum amplitude threshold: 0.005
* signal jump threshold: 0.1
* Aggregation (unit for all: ms)
* window length: 5000
* window overlap: 1000

If you would like to customize any of these parameters (e.g., extend the window length/overlap or increase the peak onset threshold) you have to edit the analysis options.


---

# 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/analysis-archive/analysis-gsr-peak-detection-and-aggregation.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.
