Skip to content

GUI docs

Jan Clemens edited this page Apr 10, 2020 · 1 revision

Start the GUI

xb will open dialog for opening zarr, folder, wav

Alternatively, command line args can be used:

xb path_to.zarr xb path_to_datadir xb path_to.wav

Menu - load, new from wav/dir

Save - zarr, annotations, …

For list of additional args see below

Navigating the view

video, waveform and spectrogram

WASD - move by 50% of the window, zoom in/out to 50%/200%, Left, Right - move by one frame or a small step

Space - play - only really useful for video playback. Sound playback can be triggered with E

Jump to a specific frame/time via menu. Also cue points (see below)

Viewing tracking data

  • view poses:
  • positions:
  • crop

crop size can be defined when loading via: open dialog or the --box-size command line argument.

You can also edit tracking data to fix tracking errors - see below.

Waveform:

  • select channel via pulldown
  • auto select loudest channel: Q
  • switch to next/previous channel: Up/Down arrow keys
  • playback waveform via your speaker: E (useful when annotating song)

Spectrogram for the currently selected channel:

  • Turn off: G (for faster video playback)
  • Increase frequency/temporal resolution R/T

min/max specfreq can be defined when loading via:

  • open dialog
  • command line --specfreqmin, --specfreqmax,

Cue points

Cue points are a way to define specific time points in the recording to jump to in the GUI.

Cue points are defined in a text file and can be provided via:

  • the open dialog
  • or Playback -> Load cue points

The text file should contain the times of the cue points in seconds, separated by commas. For instance a file my_cue_points.txt with the following content 1.0,20,54.3 will define three cue points at 1.0, 20.0, and 54.3 seconds into the recording.

You can jump to next/previous cue point in the list with K/L or via menu Playback -> Move to previous cue/Playback -> Move ot next cue.

Annotating events

Init annotations

Annotations can be initialized in three ways:

  • menu - add new or delete existing
  • open dialog - add new
  • cmd line - add new

Annotations are initialized in the following format: event_name,event_type;event_name,event_type;…

Where event_name is a string without , ,, or ; and event_type is event or segment. XB recognizes two principal types of annotations

  • event: single time
  • segment: a stretch defined by a beginning and an end

Add, edit, delete annotations

dropdown menu selects annotation that is currently edited. Also via number keys - will select in the same order as they appear in the menu

  • Add: left click
  • Delete: right click
  • Move: Drag
  • Delete those of the selected event_name: key

Can delete events of any type in view with key

Generate annotations using DeepSS

work in progress

Edit tracking data

TODO: describe procedure heres

Complete list of command line arguments

Can be ontained via xb --help:

 usage: xb [-h] [-e EVENTS_STRING] [-t TARGET_SAMPLINGRATE]
          [--spec-freq-min SPEC_FREQ_MIN] [--spec-freq-max SPEC_FREQ_MAX]
          [-b BOX_SIZE] [--skip-dialog] [--no-skip-dialog]
          [source]

optional positional arguments:
  source                Data source to load.
                        Optional - will open an empty file if omitted.
                        Source can be the path to a wav audio file,
                        to an xarray-behave dataset saved as a zarr file,
                        or to a data folder (e.g. 'dat/localhost-xxx').

optional arguments:
  -h, --help            show this help message and exit
  -e EVENTS_STRING, --events-string EVENTS_STRING
                        "event_name,event_category;event_name,event_category".
                        Avoid spaces or trailing ';'.
                        Need to wrap the string in "..." in the terminal
                        "event_name" can be any string w/o space, ",", or ";"
                        "event_category" can by event (pulse) or segment (sine, syllable)
                        Only used if source is a data folder or a wav audio file.
                        (default: )
  -t TARGET_SAMPLINGRATE, --target-samplingrate TARGET_SAMPLINGRATE
                        [description]. If 0, will use frame times. Defaults to None.
                        Only used if source is a data folder or a wav audio file.
                        (default: None)
  --spec-freq-min SPEC_FREQ_MIN
                        [description].
                        (default: None)
  --spec-freq-max SPEC_FREQ_MAX
                        [description].
                        (default: None)
  -b BOX_SIZE, --box-size BOX_SIZE
                        desc.
                        Not used for wav audio files (no videos).
                        (default: 200)
  --skip-dialog         If True, skips the opening dialog and goes straight to opening the data.
                        (default: False)
  --no-skip-dialog