> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/scopeview/get-started/select-signals-to-acquire/apply-custom-formulas-to-signals.md).

# Apply Custom Formulas to Signals

ScopeView allows users to add custom **formulas** to their signals, enabling advanced processing, transformation, and analysis. By applying formulas, users can create new signals derived from existing ones and perform mathematical operations to extract meaningful information. The results of these formulas can then be displayed, analyzed, and compared alongside the original signals.

<figure><img src="https://1028368895-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfwfLeQP2Iaoefor0ZUNi%2Fuploads%2FsJaOk8VEVfSqHlwlQjBb%2Fimage.png?alt=media&amp;token=ca610cfe-3250-4b5c-8daa-8b1331cafa9c" alt=""><figcaption></figcaption></figure>

## Insert a formula manually

1. Click the signal you want to edit from the **Selected Signals** area.
2. Type your formula.

* If your formula reuses signals from other formulas, you can manually enter the identifiers assigned by ScopeView.
* If the formula contains new signals not part of other formulas, insert them as follows to allow ScopeView to assign identifiers:
  1. Select the source in the **Data Sources** list.
  2. Enable **Multiple Signal Selection Mode**.
  3. Choose a function from the **Simple Function to Apply** pull-down list.
  4. Click the desired signal in the list of signals.

## Formula interpreter capabilities

ScopeView’s formula interpreter can evaluate complex expressions, supporting:

* **Standard arithmetic operators:** `+`, `-`, `*`, `/`, `**` (or `^`), `vs`
* **Variable assignments:** Assign values to one or multiple variables for reuse in other formulas.
* **Standard mathematical functions:** `sin`, `cos`, `log`, etc.
* **Internal functions for spectral analysis:** spectral density, frequency response, etc.
* **TYRAN functions:** e.g., calculation of magnitude and phase for symmetric integral components.
* **External signal processing functions:** fundamental frequency, harmonics, digital filters, etc.

## Edit the list of formulas

The **Selected Signals** area contains all formulas to be evaluated during acquisition.

**Menu Commands:**

* **Select one signal:** Click the far-left column beside the signal.
* **Select All:** Select all formulas.
* **Select None:** Unselect all formulas.
* **Cut:** Remove selected formulas and store them in the buffer.
* **Copy:** Copy selected formulas to the buffer.
* **Paste:** Add formulas from the buffer to the list.
* **Delete:** Remove selected formulas without affecting the buffer.

**Reordering Formulas:**

* Initially, formulas are displayed in the order they appear in the **Selected Signals** list.
* After the first acquisition, you can interactively rearrange graphs to change the display order.


---

# 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://www.opal-rt.com/docs/scopeview/get-started/select-signals-to-acquire/apply-custom-formulas-to-signals.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.
