loopbio blog

Motif 5.0

Written on Tuesday July 02, 2019

Motif video recording software version 5.0 was released today. This version features an enormous number of new features which continue to make Motif the most capable and versatile solution for biologists looking to recording video and other data from behavioural experiments.

Windows Support

This release adds support for running the Motif software on Windows 10. The user interface and the available features are identical to when running the software on Linux.

alignment feedback

I/O, DAQ, Sensor and Output Support

Motif already allows control of IO and reading of environmental sensors from within the software, including support for the low cost phidget devices. We now support the entire phidget range.

sensor and output values are shown in the UI

a small sample of the existing supported IO devices

In Motif 5, I/O and DAQ support has improved to support more types of hardware, and control and monitoring of configured IO has been improved throughout the software. Of particular note are the following enhancements:

  • Automatic synchronization of IO/DAQ signals with video data. Values of all configured input in Motif will be stored with the recorded video (see information on our imgstore format), including both the framenumber and timestamp of the video.
  • Scheduled and manual control of configured outputs. Any changes to any defined IO/DAQ output will also be saved in the recorded data (as above, in imgstore). This ensures that not only are sensors able to be synchronized with recorded video, but any stimulus changes (scheduled or manually set using the Motif API) are too.
  • Ability to manually control configured outputs in the user interface (see screenshot). The current value of all configured inputs is also shown.
  • IO signals can be set using the Motif API. They can be changed programatically, either from experiment scripts or via the scheduler function. Expected forthcoming scheduled changes to IO are now shown in the UI (see screenshot)
  • Support for other IO types, including certain National Instrument DAQs, and control of IO over HTTP and ZMQ protocols
sensor and output values are shown in the UI

Improved IO support. Current sensor values and outputs are shown and adjustable in the UI. The value of any configured output can be changed programatically via the Motif API or scheduled to do so.

Experiment Scripts and Scripting Improvements

A major new feature is the improvement and integration of scripting and experimental scripts into the user interface. Experiment scripts are written in Python (by default, MATLAB and other scripting environments are also supported).

Users can define experimental scripts and then launch these from within Motif. Scripts are placed in a platform-specific directory. These scripts can interact with Motif using the Motif API in several ways:

  • Scripts can operate in a one-time fashion, for example by setting up an experimental protocol consisting of scheduled outputs and recordings. For more experimental scripts which use the scheduler, see the examples in the experiment script documentation
  • Scripts can also run continuously, manipulating the Motif API in realtime
  • Advanced scripts can even perform realtime image processing to implement closed loop behavioural paradigms depending on the animal behaviour

Scripts placed in the appropriate directory are then shown in the user interface, where they can be launched.

Scripts can be complicated closed loop image processing operations, collections of camera / imaging setting changes, or complete descriptions of experimental protocols including recording time and duration, metadata, stimulus, and much more. For example, the script below implements the following hypothetical experimental paradigm:

Record for 30 minutes, every-hour-on-the-hour between 6am and 4pm. While recording alternately flash a red and blue LED every second.
from motifapi import MotifApi

api = MotifApi()

camera_serial = '22075785'

# initialize LEDs
api.call('io/led_red/set', value=0)
api.call('io/led_green/set', value=1)

# schedule recording
         cron_expression='0 6-16 * * * *',

# describe stimulus protocol (flash 'inf') LEDs
api.call('schedule/camera/%s/io/led_red/set' % camera_serial,
         cron_expression='%2 * * ? * * *',
api.call('schedule/camera/%s/io/led_green/set' % camera_serial,
         cron_expression='%2 * * ? * * *',

Improved User Interface

The user-interface has been polished and unified across the various modes of Motif operation: single-camera mode, and the multiple camera 'master' and 'index' modes. Features which were previously restricted to single camera interfaces (IO and timed recording) have been added to the multicamera interface.

modes of operation

The user interface of the three main modes of Motif operation

Live Image Streaming / Closed-loop Image Processing Support

Motif 5 adds the ability to, with very low latency (<1ms), stream realtime images from the camera, without interfering with the recording, compression, or any other Motif functions. This allows realtime image processing algorithms for closed loop experiments.

Such realtime algorithms can freely use the Motif API and thus, for example, provide stimuli to the animal using configured Motif IO, or user provided custom outputs.

We unveiled this feature at Göttingen Neuroscience Conference with the demo below: A Motif system simultaneously records video and detects the position of the animal before providing a stimulus illuminating LEDs underneath (using Motif IO). Motif saves not only the video, but synchronized with it, the IO status too. From the saved data file Motif thus allows easy analysis of behaviour and stimulus after the experiment.

If you are planning to perform closed loop experiments then consider Motif, it solves all the saving, I/O, reliability, and synchronization problems for you.

Expanded Camera Range Support

This release adds support for cameras from FLIR (formerly Point Grey), extends our support for Basler cameras, adds support for network cameras and standard operating system supported cameras (v4l on Linux and UVC on Windows).

alignment feedback

A small sampling of the more than 300 supported cameras.

Extended Trigger and Synchronization Options

Motif 5 added support for a number of different trigger and synchronization scenarios commonly necessary when synchronizing video recording with neurophysiology recording or stimulation setups. This allows Motif to either take a variety of 'master' or 'slave' roles with respect to the the triggering and recording of frames. Motif can consume trigger pulses produced by other hardware, or generate a variety of different trigger pulses for recording by the secondary neurophysiology hardware.

If you need video synchronized with neurophysiology, electrophysiology, or other hardware devices then contact us to see what Motif can do for you.

Complete and Comprehensive Documentation

Comprehensive documentation is provided online and is continually updated. Documentation explains the use and confiugraton of Motif, as well as use of the Motif API and example experiment scripts.

motif documentation

Interested in Motif?

Motif is the first video and camera recording system designed for the experiments of modern scientists. It supports single and multiple synchronized camera scenarios, remote operation, high framerate and unlimited duration recording. It is always updated and has no single-user or other usage limitations.

If you are interested in a Motif system, please contact us for a quote or to see how Motif can solve your video recording needs.