Skip to content

User Configuration Files

Daniel Aharoni edited this page Feb 26, 2020 · 7 revisions

User Configuration files are at the center of the Minsicope DAQ Software. These files define how the software constructs its GUI, connects to data streams, and processes and saves data. User Configuration files are written in the human-readable JSON format and can (and should) be edited by the user using their favorite text editor (suggested editors: VS Code, Sublime, Notepad++). A quick JSON tutorial can be found here but you likely can learn all the formatting/syntax you need by just looking at an included example User Configuration file.

Structure of User Configuration Files

Below will outline the layout and construction of these files. While you can write one from scratch, we suggest building off of an included example User Configuration file.

General Configuration Information

  • "researcherName": Your name goes here. It will be used to create the data folder structure and be saved in the recording's metadata.
  • "dataDirectory": The root folder where your data folder structure will be created.
  • "directoryStructure": This lists your preferred data folder structure. It is an array which can include "researcherName", "experimentName", "animalName", "date", and "time". The order of these entries in the array will define the folder structure.
  • "animalName": Put you animal name here. Will be saved in metadata and can also be used in your data folder structure.
  • "experimentName": You can name your experiment here. Used in metadata and folder structure.
  • "recordLengthinSeconds": Sets the length of recording. Leave this out or set as 0 if you do not want to limit your recording to a specific amount of time.

"experiment"

This is currently a work in progress and not implemented with software

"behaviorTracker"

This is currently a work in progress and not fully implemented yet. When finished, it will define specific experiment protocols so that the software can control a behavior experiment while recording neural and behavioral activity.

"devices":

Devices holds the information of all the different data generating devices you want to connect to and stream data from during your recording. Currently, devices is broken up into an array of "miniscopes" and an array of "cameras" (for recording behavior). As new devices get added to the Minsicope ecosystem, they will be added here.

The Miniscope DAQ Software is designed to open up as many data streams as your User Configuration File requests. For video devices, a video compression codec can be chosen. More information on supported codecs can be found on the Video Compression Options page.

  • All Devices must have a unique "deviceName".
  • "deviceType" must be a type defined in the Device Configuration Files in the deviceConfig folder. Some supported device types are "Miniscope_V4", "Miniscope_V4_BNO", Miniscope_V3". For a full list visit the Device Configuration Files page.
  • "deviceID" is the camera connection number that that specific device enumerates to on your computer. You will need to change this to find the correct video stream (starts at 0 and goes up to the number of cameras connected to your computer). Once found this number doesn't change.

"miniscopes":

This is an array of JSON objects, with each object defining one Miniscope connection.

The specific entries in here will depend on which type of Miniscope you are defining a connection to. We suggest modifying an example User Configuration File as these example files will list a full configuration for each type of Miniscope. For example, the code below is for a V4 Miniscope with on board head orientation sensing:

{
    "deviceName": "Miniscope 2",
    "deviceType": "Miniscope_V4_BNO",
    "imageRegistration": "Off",
    "streamHeadOrientation": true,
    "deviceID": 2,
    "compressionOptions": ["MJPG","MJ2C","XVID","FFV1"],
    "compression": "FFV1",
    "framesPerFile": 1000,
    "windowScale": 0.75,
    "windowX": 800,
    "windowY": 100,
    "gain": "Low",
    "ewl": 50,
    "led0": 30,
    "frameRate": "30FPS"
}

"cameras":

This is an array of JSON objects, with each object defining one camera connection. The structure of a "camera" device is similar to "miniscopes". An example webcam connection would look like this:

{
    "deviceName": "BehavCam 0",
    "deviceType": "WebCam",
    "deviceID": 0,
    "cameraCalibrationFileLocation": "",
    "compressionOptions": ["MJPG","MJ2C","XVID","FFV1"],
    "compression": "FFV1",
    "framesPerFile": 1000,
    "windowScale": 0.75,
    "windowX": 800,
    "windowY": 600
}