Skip to content

Commit

Permalink
Merge pull request #451 from NeurodataWithoutBorders/SLEAPInterface
Browse files Browse the repository at this point in the history
Add SLEAP Interface
  • Loading branch information
CodyCBakerPhD authored Oct 17, 2023
2 parents 8cd850e + 3ff284f commit c84139e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
3 changes: 2 additions & 1 deletion guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"AxonaRecordingInterface",
"NeuralynxRecordingInterface",
"AlphaOmegaRecordingInterface",
"DeepLabCutInterface"
"DeepLabCutInterface",
"SLEAPInterface"
]
}
36 changes: 36 additions & 0 deletions schemas/json/generated/SLEAPInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"required": [],
"properties": {
"SLEAPInterface": {
"required": [
"file_path"
],
"properties": {
"file_path": {
"format": "file",
"type": "string"
},
"video_file_path": {
"format": "file",
"type": "string"
},
"verbose": {
"type": "boolean",
"default": true
},
"frames_per_second": {
"type": "number"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "source.schema.json",
"title": "Source data schema",
"description": "Schema for the source data, files and directories",
"version": "0.1.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import AxonaRecordingInterfaceSchema from "../../../../../../schemas/json/genera
import NeuralynxRecordingInterfaceSchema from "../../../../../../schemas/json/generated/NeuralynxRecordingInterface.json";
import AlphaOmegaRecordingInterfaceSchema from "../../../../../../schemas/json/generated/AlphaOmegaRecordingInterface.json";
import DeepLabCutInterfaceSchema from "../../../../../../schemas/json/generated/DeepLabCutInterface.json";
import SLEAPInterfaceSchema from "../../../../../../schemas/json/generated/SLEAPInterface.json";

export default {
title: "Pages/Guided Mode/Source Data",
Expand Down Expand Up @@ -106,6 +107,7 @@ globalStateCopy.schema.source_data.properties.AlphaOmegaRecordingInterface =
AlphaOmegaRecordingInterfaceSchema.properties.AlphaOmegaRecordingInterface;
globalStateCopy.schema.source_data.properties.DeepLabCutInterface =
DeepLabCutInterfaceSchema.properties.DeepLabCutInterface;
globalStateCopy.schema.source_data.properties.SLEAPInterface = SLEAPInterfaceSchema.properties.SLEAPInterface;

const results = globalStateCopy.results;
for (let sub in results) {
Expand Down Expand Up @@ -310,3 +312,9 @@ const DeepLabCutInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
DeepLabCutInterfaceGlobalCopy.interfaces.interface = DeepLabCutInterface;
DeepLabCutInterfaceGlobalCopy.schema.source_data = DeepLabCutInterfaceSchema;
DeepLabCutInterface.args = { activePage, globalState: DeepLabCutInterfaceGlobalCopy };

export const SLEAPInterface = PageTemplate.bind({});
const SLEAPInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
SLEAPInterfaceGlobalCopy.interfaces.interface = SLEAPInterface;
SLEAPInterfaceGlobalCopy.schema.source_data = SLEAPInterfaceSchema;
SLEAPInterface.args = { activePage, globalState: SLEAPInterfaceGlobalCopy };

0 comments on commit c84139e

Please sign in to comment.