Skip to content

Commit

Permalink
Clean up example user config files for version 1.10 release
Browse files Browse the repository at this point in the history
  • Loading branch information
daharoni committed Jan 4, 2021
1 parent 9eab524 commit f1ea4ba
Show file tree
Hide file tree
Showing 24 changed files with 729 additions and 10 deletions.
142 changes: 142 additions & 0 deletions My User Configs/UserConfigExample-V4Miniscope-plus-2-WebCams.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"dataDirectory": "C:/FILL/OUT/THIS/PATH",
"directoryStructure": [
"researcherName",
"experimentName",
"animalName",
"customEntry0",
"date",
"time"
],
"researcherName": "Dr_Miniscope",
"experimentName": "Experiment0",
"animalName": "Fully Ball",
"customEntry0": "customEntValHere",

"recordLengthinSeconds": 600,

"executableOnStartRecording": {
"enabled": false,
"filePath": "C:/FILL/OUT/THIS/PATH.exe",
"arguments": ["arg1", "arg2"]
},
"executableOnStopRecording": {
"enabled": false,
"filePath": "C:/FILL/OUT/THIS/PATH.exe",
"arguments": ["arg1", "arg2", "arg3"]
},

"COMMENT_behaviorTracker": "The behavior tracker is currently in beta testing. It requires you to have a functional Python environment with DeepLabCut-Live setup.",
"COMMENT_behaviorTracker2": "For info on setting up DLC-Live go here, https://github.com/DeepLabCut/DeepLabCut-live",
"COMMENT_behaviorTracker3": "Currently only the type of 'DeepLabCut-Live' is supported. You need to provide an absolute path to your Pythong environment and DLC model.",
"COMMENT_behaviorTracker4": "If you don't to use the behaviorTracker either remove this section or set 'enabled' to false. More info can be found in the primary user config example file.",
"behaviorTracker": {
"enabled": false,
"type": "DeepLabCut-Live",
"pyEnvPath": "C:/PATH/TO/ENV",
"modelPath": "C:/PATH/TO/DLC/MODEL",
"resize": 0.5,
"pCutoffDisplay": 0.3,
"windowX": 200,
"windowY": 100,
"windowScale": 0.75,
"occupancyPlot": {
"enabled": true,
"numBinsX": 100,
"numBinsY": 100,
"poseIdxToUse": [0, 1, 2, 3, 4]
},

"poseIdxForTraceDisplay": ["0wh", "1w", "2w"],

"poseOverlay": {
"enabled": true,
"COMMENT": "Cant be 'point','line',or 'ribbon.",
"type": "point",
"numOfPastPoses": 6,
"markerSize": 20,
"skeleton": {
"enabled": true,
"connectedIndices": [
[0, 1, 2, 3, 4, 5],
[6, 7, 8, 9, 10, 11],
[12, 13]
]
}
}
},

"traceDisplay": {
"enabled": true,
"type": "scrolling",
"windowX": 100,
"windowY": 100,
"windowWidth": 600,
"windowHeight": 800
},

"devices": {
"miniscopes": {
"My V4 Miniscope": {
"deviceType": "Miniscope_V4_BNO",
"headOrientation": {
"enabled": true,
"filterBadData": true,
"plotTrace": ["roll", "pitch", "yaw"]
},
"COMMENT": "Change the deviceID to match the input number of your Miniscope.",
"deviceID": 1,
"showSaturation": true,
"ROI": {
"leftEdge": 0,
"topEdge": 0,
"width": 600,
"height": 600
},
"compression": "FFV1",
"framesPerFile": 1000,
"windowScale": 0.75,
"windowX": 800,
"windowY": 100,
"gain": "Low",
"ewl": 50,
"led0": 10,
"frameRate": "20FPS"
}
},
"cameras": {
"My First WebCam":{
"deviceType": "WebCam",
"deviceID": 0,
"showSaturation": true,
"ROI": {
"leftEdge": 0,
"topEdge": 0,
"width": 640,
"height": 480
},
"compression": "MJPG",
"framesPerFile": 1000,
"windowScale": 0.5,
"windowX": 800,
"windowY": 600
},
"My Second WebCam":{
"deviceType": "Minicam-Mono-XGA",
"deviceID": 2,
"showSaturation": true,
"ROI": {
"leftEdge": 0,
"topEdge": 0,
"width": 640,
"height": 480
},
"compression": "MJPG",
"framesPerFile": 1000,
"windowScale": 0.5,
"windowX": 800,
"windowY": 600
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 9 additions & 1 deletion deviceConfigs/userConfigProps.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
},

"executableOnStartRecording": {
"enabled": {
"type": "Bool",
"tips": "This enables or disabled the .exe file from being called."
},
"filePath": {
"type": "FilePath",
"tips": "This is an absolute path to a .exe file you want to have executed at the start of recording. This is usually used to syncronize some third party hardware."
Expand All @@ -35,6 +39,10 @@
}
},
"executableOnStopRecording": {
"enabled": {
"type": "Bool",
"tips": "This enables or disabled the .exe file from being called."
},
"filePath": {
"type": "FilePath",
"tips": "This is an absolute path to a .exe file you want to have executed at the start of recording. This is usually used to syncronize some third party hardware."
Expand Down Expand Up @@ -277,7 +285,7 @@
},
"compression": {
"type": "String",
"tips": "Imaging data is save in .avi file format. You can choose what type of video compression to apply when saving data. We suggest using a lossless compression CODEC for Miniscope data. This would be either GREY or FFV1. GREY does no compression. FFV1 losslessly compresses the data but can be CPU intensive. We generally use FFV1 is our computer can keep up with it. If you notice the frame buffer filling up completely while recording you should switch to GREY."
"tips": "Imaging data is save in .avi file format. You can choose what type of video compression to apply when saving data. A Lossly compression CODEC is generally fine for behavior video data. We like to use MJPG or XVID. When you start the software it will tell you all supported CODECs on your computer."
},
"framesPerFile": {
"type": "Integer",
Expand Down
20 changes: 12 additions & 8 deletions source/controlpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ void ControlPanel::onRecordActivated()
if (m_userConfig.contains("executableOnStartRecording")) {
// Lets setup a exe to execute
exeInfo = m_userConfig["executableOnStartRecording"].toObject();
argArray = m_userConfig["arguments"].toArray();
for (int i=0; i < argArray.size(); i++) {
argList.append(argArray[i].toString());
if (exeInfo["enabled"].toBool(true)) {
argArray = m_userConfig["arguments"].toArray();
for (int i=0; i < argArray.size(); i++) {
argList.append(argArray[i].toString());
}
QProcess::startDetached(exeInfo["filePath"].toString(""), argList);
}
QProcess::startDetached(exeInfo["filePath"].toString(""), argList);
}

// Construct uc props that might have been changed by user
Expand Down Expand Up @@ -162,11 +164,13 @@ void ControlPanel::onStopActivated()
if (m_userConfig.contains("executableOnStopRecording")) {
// Lets setup a exe to execute
exeInfo = m_userConfig["executableOnStopRecording"].toObject();
argArray = m_userConfig["arguments"].toArray();
for (int i=0; i < argArray.size(); i++) {
argList.append(argArray[i].toString());
if (exeInfo["enabled"].toBool(true)) {
argArray = m_userConfig["arguments"].toArray();
for (int i=0; i < argArray.size(); i++) {
argList.append(argArray[i].toString());
}
QProcess::startDetached(exeInfo["filePath"].toString(""), argList);
}
QProcess::startDetached(exeInfo["filePath"].toString(""), argList);
}

recordStop();
Expand Down
2 changes: 1 addition & 1 deletion source/tracedisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TraceDisplay::TraceDisplay()
// Initially sets x labels
QList<QVariant> tempLabels;
for (int i=0;i < 5; i++) {
tempLabels.append(QString::number(i ,'f',1) + "s");
tempLabels.append(QString::number(i*2 ,'f',1) + "s");
}
setXLabel(tempLabels);
}
Expand Down
120 changes: 120 additions & 0 deletions userConfigs/UserConfigExample-V3-Miniscope-plus-WebCam.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"dataDirectory": "C:/FILL/OUT/THIS/PATH",
"directoryStructure": [
"researcherName",
"experimentName",
"animalName",
"customEntry0",
"date",
"time"
],
"researcherName": "Dr_Miniscope",
"experimentName": "Experiment0",
"animalName": "Fully Ball",
"customEntry0": "customEntValHere",

"recordLengthinSeconds": 600,

"executableOnStartRecording": {
"enabled": false,
"filePath": "C:/FILL/OUT/THIS/PATH.exe",
"arguments": ["arg1", "arg2"]
},
"executableOnStopRecording": {
"enabled": false,
"filePath": "C:/FILL/OUT/THIS/PATH.exe",
"arguments": ["arg1", "arg2", "arg3"]
},

"COMMENT_behaviorTracker": "The behavior tracker is currently in beta testing. It requires you to have a functional Python environment with DeepLabCut-Live setup.",
"COMMENT_behaviorTracker2": "For info on setting up DLC-Live go here, https://github.com/DeepLabCut/DeepLabCut-live",
"COMMENT_behaviorTracker3": "Currently only the type of 'DeepLabCut-Live' is supported. You need to provide an absolute path to your Pythong environment and DLC model.",
"COMMENT_behaviorTracker4": "If you don't to use the behaviorTracker either remove this section or set 'enabled' to false. More info can be found in the primary user config example file.",
"behaviorTracker": {
"enabled": false,
"type": "DeepLabCut-Live",
"pyEnvPath": "C:/PATH/TO/ENV",
"modelPath": "C:/PATH/TO/DLC/MODEL",
"resize": 0.5,
"pCutoffDisplay": 0.3,
"windowX": 200,
"windowY": 100,
"windowScale": 0.75,
"occupancyPlot": {
"enabled": true,
"numBinsX": 100,
"numBinsY": 100,
"poseIdxToUse": [0, 1, 2, 3, 4]
},

"poseIdxForTraceDisplay": ["0wh", "1w", "2w"],

"poseOverlay": {
"enabled": true,
"COMMENT": "Cant be 'point','line',or 'ribbon.",
"type": "point",
"numOfPastPoses": 6,
"markerSize": 20,
"skeleton": {
"enabled": true,
"connectedIndices": [
[0, 1, 2, 3, 4, 5],
[6, 7, 8, 9, 10, 11],
[12, 13]
]
}
}
},

"traceDisplay": {
"enabled": true,
"type": "scrolling",
"windowX": 100,
"windowY": 100,
"windowWidth": 600,
"windowHeight": 800
},

"devices": {
"miniscopes": {
"My V4 Miniscope": {
"deviceType": "Miniscope_V3",
"COMMENT": "Change the deviceID to match the input number of your Miniscope.",
"deviceID": 1,
"showSaturation": true,
"ROI": {
"leftEdge": 0,
"topEdge": 0,
"width": 500,
"height": 300
},
"compression": "FFV1",
"framesPerFile": 1000,
"windowScale": 0.75,
"windowX": 800,
"windowY": 100,
"gain": "Low",
"led0": 10,
"frameRate": "20FPS"
}
},
"cameras": {
"My WebCam":{
"deviceType": "WebCam",
"deviceID": 0,
"showSaturation": true,
"ROI": {
"leftEdge": 0,
"topEdge": 0,
"width": 640,
"height": 480
},
"compression": "MJPG",
"framesPerFile": 1000,
"windowScale": 0.5,
"windowX": 800,
"windowY": 600
}
}
}
}
Loading

0 comments on commit f1ea4ba

Please sign in to comment.