# NVGate Mask And Alarm

The Masks (also called *Mask*) are used to compare a measured result with a template.

## Contents

- 1 Tutorial
- 2 Mask Parameters
- 2.1 Manage
- 2.2 Save
- 2.3 Save As
- 2.4 New
- 2.5 Mask settings

- 3 Alarm parameters

### Tutorial

Here is an example of a template plotted over the FFT spectrum for three inputs.

This tutorial will show you how to use a mask and an alarm to start the recording of 3 inputs when the FFT spectrum of the first input crosses the mask. To do that, we will need a to use a mask, an alarm and a macro. The setup must contain three input channels connected to the recorder and the FFT plugins. The average spectrum must be displayed. The starting event of the recorder must be set on "Manual Trigger".

#### Setup a mask

The Mask manager can be found in the "Tools" tab of the NVGate Ribbon :

To create a new mask, select "New" :

And set the parameters of your mask :

You can then draw the template by adding points with the mouse and adapt the coordinates in the info-trace :

Once you close the window, the mask is then created under the project in the project manager and can be dropped into the result graph, here the FFT spectrum :

#### Add an Alarm

Once you added the mask on the graph, you can create an alarm. The alarm will then allow you to use as an event in a Macro.

To create the alarm, select "Add Alarm" from the NVGate ribbon :

Then, in the next window, create the alarm between the mask and the selected curves :

#### Setup the Macro

We will use the If command of the Macro to start the recording on the crossing of the Mask. After creating a the Macro containing a while loop "Until measurement stopped", add the "If" command inside the loop and set it up as follow :

Then, add the "Manual trigger" (by using the record option of the the Macro) into the If command.

#### Conclusion

You can now run the measurement and start the the Macro: the recording of the signal will began only if the spectrum of the first input crosses the mask template.

### Mask Parameters

##### Manage

Opens the Mask manager and displays the list of masks classified by project

- New: Creates a new mask in the project selected in the list. The "Masks settings" dialog box is displayed, in order to define masks characteristics.

Disabled if a template is already being edited.

- Edit: Edits the mask selected in the list.

See "Frequency narrow band mask settings" topic p 56.

- Rename: Renames the mask selected in the list.
- Delete: Deletes the template selected in the list.

##### Save

: Saves the mask loaded in the editor in the current project.

##### Save As

: Saves the mask with a new name in the current project.

##### New

: Creates a new mask. The "Masks settings" dialog box is displayed, in order to define masks characteristics.

Disabled if a template is already edited.

Template types

Displays the type of the new mask. The different types are

- 1/n octave (available if 1/n octave plug-in analyzer is available)
- Profile
- Frequency narrow band (available if one or more FFT plug-in analyzer is available)
- Order narrow band (available if one or more synchronous order analysis plug-in analyzer is available)

#### Mask settings

##### 1/n octave mask settings

###### Central frequencies

- Min: Minimum value on X-axis.
- Max: Maximum value on X-axis.
- Mode: Defines the number of frequency bands. Available with 1/n octave template result only.

The possible values are

- Octave
- 1/3
^{rd}octave - 1/12
^{th}octave - 1/24
^{th}octave

###### Y axis

- Min: Minimum value on Y-axis.
- Max: Maximum value on Y-axis.
- Physical quantity: Physical quantity represented on Y-axis.

##### 1/n octave mask editor

- Select a bar : Switches to "Select" mode. Bar is selected by clicking on it. The selected bar can be resized by dragging and dropping.
- Select all bars : Selects all bars of mask. All bars can be resized by resizing one of them. The same offset is applied to all bars.

- Y scale: Switches between linear and dB scale on the Y-axis.

###### Edit grid

- Select point: A click on a grid line selects the corresponding point in the graph area.
- Edit point: You may double-click on a cell to edit the X-coordinate or Y-coordinate of a point.

The Y-coordinate value is bound by the Y minimum and maximum values.

The X-coordinate value is bound by the previous and next point’s X-coordinate.

Clicking on another cell or pressing enter key validates a value.

- Paste special: The edit grid or a part of the edit grid may be filled by editing the grid content in Excel
^{®}, and then copying and pasting from the clipboard.

Only selected cells are updated, if the grid content is valid.

The X-coordinates of the first and last point cannot be edited. The corresponding cells are disabled.

The values used in the Excel® sheet must be specified in the current units.

##### Profile mask settings

###### X axis

- Min: Minimum value on X-axis.
- Max: Maximum value on X-axis.
- Physical quantity: Physical quantity of the reference (represented on X axis).

###### Y axis

- Min: Minimum value on Y-axis.
- Max: Maximum value on Y-axis.
- Physical quantity: Physical quantity represented on Y-axis.

##### Profile mask editor

- Add a point : Switches to "Add point" mode. In this mode, a new point is created by clicking in one of the two graph areas. A point with the same X-coordinate is added to the curve of the other graphic area. The Y-coordinate of this point is calculated by linear interpolation between previous and next point.
- Select a point : Switches to "Select" mode. A point is selected by clicking on it. The selected point can be moved by dragging and dropping. The drop area is bound by the X-coordinates of the next and previous points, and the Y-axis minimum and maximum values.

When a point is selected in one of the two curves, the point with same X-coordinate is selected in the other curve. When a point is moved, the point with the same X-coordinate in the other curve is moved also, in order to keep the same X-coordinate.

The two end points can be translated on the Y-axis only. Their X-coordinates are the X-axis minimum and maximum values, respectively.

- Select all points : Selects all points on both curves. A curve can be translated on the Y-axis by moving one of its points.
- Remove selected point : Removes the selected point from both curves. The previous point becomes the new selected point. Not available if all points or one of the end points are selected.

- Add point: Used to add a point by right-clicking on the desired position. A point with the same X-coordinate is added in the other curve. The Y-coordinate of this point is calculated by linear interpolation between previous and next point.
- Remove point: Used to remove the designated point by right-clicking on it. The point with same X-coordinate is removed from the other curve.

Only available when the user has right-clicked a given point (except end points).

- Move point: Used to move the designated point by right-clicking on it. A left click in the graph area determines the new position of the point. The point with the same X-coordinate in the other curve is moved also, in order to keep the same X-coordinate
- Y scale: Switches between linear and dB scale on the Y-axis.

###### Edit grid

- Select point: By clicking on a grid line, you may select the corresponding point in the graph area.
- Edit point: Double-click on a cell to edit the X-coordinate module or phase. A cell can be also edited by selecting it and pressing the enter key.

The module value is bound by the module minimum and maximum values. The phase belongs to the range [-Pi,Pi]. The X-coordinate value is bound by the X-coordinate of the previous and next points.

A value is validated by clicking on another cell or pressing the enter key.

- Paste special: The edit grid or a part of the edit grid may be filled by editing the grid content in Excel
^{®}, and then copying and pasting from the clipboard.

Only selected cells are updated, if the grid content is valid.

The X-coordinates of the first and last point cannot be edited. The corresponding cells are disabled.

The values used in the Excel® sheet must be specified in the current units.

##### Frequency narrow band mask settings

###### Frequencies

- Min: Minimum value on X-axis.
- Max: Maximum value on X-axis.

###### Y axis

- Min: Minimum value on Y-axis.
- Max: Maximum value on Y-axis.
- Physical quantity: Physical quantity represented on Y-axis.

###### Settings

- Number of lines: Defines the number of lines.

This setting is particularly usefull to exploit Power Spectrum Density or Energy Spectrum Density

- Weighting window: defines the used weighting window. This setting is used to use mask in PSD units

##### Frequency narrow band mask editor

- Add a point : Switches to "Add point" mode. In this mode, a new point is created by clicking in the graph area.
- Select a point : Switches to "Select" mode. The point is selected by clicking on it. It can be moved by dragging and dropping it. The drop area is limited by the next and previous point X-coordinates, and Y minimum and maximum values. The two end points can be translated on the Y-axis only. Their X-coordinates are the X minimum and maximum values, respectively.
- Select all points : Selects all points of mask. The entire curve can be translated according to the Y-axis by moving one of its points.
- Remove selected point : Removes the selected point. The previous point becomes the new selected point.

Not available if all points or one of the end points are selected.

- Generate min-max mask : Displays a dialog box used to generate a min-max mask from the mask edited, applying an offset ratio. The min-max mask is made up of two curves: from each point on the mask edited, two points with same X-coordinate are generated, applying the offset ratio negatively and positively on theY-coordinate.

A click on the OK button changes the mask edited to a min-max mask, which is displayed in the editor (see Min-Max mask editor).

- Add point: Used to add a point by right-clicking on the desired position.
- Remove point: Used to remove the designated point by right clicking on it.

Only available when the user has right-clicked a given point (except end points).

- Move point: Used to move the designated point by right-clicking on it. A left-click in the graph area determines the new position of the point.
- Y scale: Switches between linear and dB scale on the Y-axis.

###### Edit grid

- Select point: Clicking on a grid line selects the corresponding point in the graph area.
- Edit point: A double-click on a cell is used to edit the X-coordinate or Y-coordinate of a point. A cell can be also edited by selecting it and pressing the enter key.

The Y-coordinate value is limited by the Y minimum and maximum values.

The X-coordinate value is limited by the X-coordinate of the previous and next point.

A value is validated by clicking on another cell or pressing the enter key.

- Paste special: The edit grid or a part of the edit grid may be filled by editing the grid content in Excel
^{®}, and then copying and pasting from the clipboard.

Only selected cells are updated, if the grid content is valid.

The X-coordinates of the first and last point cannot be edited. The corresponding cells are disabled.

The values used in the Excel® sheet must be specified in the current units.

###### Min-Max mask editor

- Add a point to top curve : Switches to "Add point" mode. In this mode, a point is added to the top curve by clicking in the graph area.
- Add a point to bottom curve : Switches to "Add point" mode. In this mode, a point is added to the bottom curve by clicking in the graph area.
- Select a point : Switches to "Select" mode. A point is selected by clicking on it. The selected point can be moved by dragging and dropping. The drop area is bound by the X-coordinates of the next and previous points, and the Y axis minimum and maximum values. The two end points can be translated on Y axis only. Their X-coordinates are the X-axis minimum and maximum values, respectively.
- Select all points of top curve : Selects all points of the top curve. The entire curve can be translated on the Y axis by moving one of its points.
- Select all points of bottom curve : Selects all points of the bottom curve. The entire curve can be translated on the Y-axis by moving one of its points.
- Select all points of both curves : Selects all points of both curves. Both curves can be translated on the Y-axis by moving one of their points.
- Remove selected point of top curve Removes the selected point of top curve. The previous point becomes the new selected point.

Not available if all points or one of the end points are selected.

- Remove selected point of bottom curve : Removes the selected point of bottom curve. The previous point becomes the new selected point.

Not available if all points or one of the end points are selected.

###### Edit grid

The editor contains two edit grids, one for each curve. The top and bottom grid are intended to edit the top and bottom curves, respectively.

- Select point: By clicking on a grid lines, you may select the corresponding point in the associated curve. A cell can be also edited by selecting it and pressing the enter key.
- Edit point: You may double-click on a cell to edit the X-coordinate or Y-coordinate of a point.

The Y-coordinate value is bound by the Y minimum and maximum values.

The X-coordinate value is bound by the previous and next point’s X-coordinate.

A value is validated by clicking on another cell or pressing enter key.

- Paste special: The edit grid or a part of the edit grid may be filled by editing the grid content in Excel
^{®}, and then copying and pasting from the clipboard.

Only selected cells are updated, if the grid content is valid.

The values used in the Excel® sheet must be specified in the current units.

##### Order narrow band mask settings

###### Orders

- Min: Minimum value on X-axis.
- Max: Maximum value on X-axis.

###### Y axis

- Min: Minimum value on Y-axis.
- Max: Maximum value on Y-axis.
- Physical quantity: Physical quantity represented on Y-axis.

##### Order narrow band mask editor

- Add a point : Switches to "Add point" mode. In this mode, a new point is created by clicking in the graph area.
- Select a point : Switches to "Select" mode. The point is selected by clicking on it. It can be moved by dragging and dropping it. The drop area is limited by the next and previous point X-coordinates, and Y minimum and maximum values. The two end points can be translated on the Y-axis only. Their X-coordinates are the X minimum and maximum values, respectively.
- Select all points : Selects all points of mask. The entire curve can be translated according to the Y-axis by moving one of its points.
- Remove selected point : Removes the selected point. The previous point becomes the new selected point.

Not available if all points or one of the end points are selected.

- Generate min-max mask : Displays a dialog box used to generate a min-max mask from the mask edited, applying an offset ratio. The min-max mask is made up of two curves: from each point on the mask edited, two points with same X-coordinate are generated, applying the offset ratio negatively and positively on theY-coordinate.

A click on the OK button changes the mask edited to a min-max mask, which is displayed in the editor (see Min-Max mask editor).

- Add point: Used to add a point by right-clicking on the desired position.
- Remove point: Used to remove the designated point by right clicking on it.

Only available when the user has right-clicked a given point (except end points).

- Move point: Used to move the designated point by right-clicking on it. A left-click in the graph area determines the new position of the point.
- Y scale: Switches between linear and dB scale on the Y-axis.

###### Edit grid

- Select point: Clicking on a grid line selects the corresponding point in the graph area.
- Edit point: A double-click on a cell is used to edit the X-coordinate or Y-coordinate of a point. A cell can be also edited by selecting it and pressing the enter key.

The Y-coordinate value is limited by the Y minimum and maximum values.

The X-coordinate value is limited by the X-coordinate of the previous and next point.

A value is validated by clicking on another cell or pressing the enter key.

- Paste special: The edit grid or a part of the edit grid may be filled by editing the grid content in Excel
^{®}, and then copying and pasting from the clipboard.

Only selected cells are updated, if the grid content is valid.

The values used in the Excel® sheet must be specified in the current units.

### Alarm parameters

##### Manage alarms

Opens a dialog box displaying the list of available alarms

Select an alarm and click the remove button to remove the alarm.

##### Add Alarm

Create a new comparison alarm in the active a graphic window. Disabled if the window does not contain a template result and a result coming from a plug-in.