Skip to content

Annotating Your Data

Ann Kennedy edited this page May 26, 2019 · 12 revisions

The Bento interface allows you to create, edit, and load multi-channel annotations. To see a list of external annotation formats that can be loaded into Bento, see Supported Data Formats.

Organization of Annotations

Bento annotations are divided into Channels, with multiple Behaviors annotated per channel. Bento allows any number of channels to be created, and allows multiple annotations per frame within a channel.

When multiple annotations are assigned to a frame, only one will be visible in the displayed rasters of annotations, however all annotations are still present (You can hide/show annotations by clicking on their names in the annotation legend (see figure below).) In most panels of Bento, only annotations in the currently selected channel are displayed.

While nothing is stopping you from annotating everything in one channel, creating multiple channels can be useful for separating different types of annotation, eg stimulus conditions vs. behavior, or for separating annotations for different animals in a video.

Setting up Annotation Channels and Behaviors

Bento's Annotation toolbar lets you create and manage new annotation channels and behavior labels: the Bento annotation toolbar The "MARS" button will not appear unless you have integrated MARS with Bento (feature still in development).

To create a new set of annotations for a video, you first need to add a Channel for those annotations, using the channel Add button. This will launch a channel creation dialog box; name the channel anything you like.

Creating a channel will toggle visibility of an annotation legend to the left of your movie; this will be populated with the list of behaviors you have defined for that channel.

Next, add one or more Behaviors with the behavior Add button. You will be prompted for a behavior name, followed by (if you haven't annotated for this behavior before) a one-character hotkey that you will use to toggle the start/stop of annotation. The hotkey can also be changed later.

The annotation legend has been added to the left The annotation legend has been added to the left.

Click Edit hotkeys in this legend to change the hotkeys assigned to each behavior, or Edit colors to change the color associated with each behavior. If you've created an annotation with this name before, Bento will recover your preferred hotkey/color settings from past sessions.

You can also toggle the visibility of different behaviors on/off by clicking on their name in the legend.

Adding, Removing, and Editing Annotations

To start annotation of a new behavior bout, first check to make sure that the Channel you wish to annotate into is selected. Begin annotation of a behavior by pressing that behavior's assigned hotkey, which is listed next to that behavior's name in the Annotation Legend. When an annotation hotkey is toggled, scrolling/dragging creates a box highlighting the frames to be labeled on most panels with a time axis (including Traces, Spectrogram, Features, and fineAnnot). Press the hotkey again to stop annotation and add the annotated bout to the current channel- or press Esc to cancel highlighting.

Annotations in action Annotation of the Approach behavior is toggled on/off by pressing p.

To remove annotations, press the Backspace or Delete key, scroll/drag to highlight a segment of time, then press Backspace or Delete again: this will remove all behavior bouts in the highlighted window in the current channel.

To remove only one type of behavior label, press that behavior's hotkey (as if you were annotating a new bout), scroll/drag to highlight the window over which you wish to remove that behavior, then press Backspace or Delete to end highlighting and remove all occurrences of that behavior in the highlighted window.

Lastly, the most recent change to annotations can be undone/redone by pressing Ctrl-z.

Saving Annotations

Bento will automatically store all annotations for a given trial as you move between annotation channels. But to load a different mouse, session, or trial, or for annotations to be accessible in future sessions, you must save your current annotations to a file.

Click the disk icon in the annotation toolbar to save annotations for all channels of the current trial into a file using the Bento .annot format. Bento will also automatically prompt you to save annotations if you move to a different mouse, session, or trial within your dataset; unsaved annotations will be discarded.