Skip to content

Commit

Permalink
Add documentation to include workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ncguilbeault committed Nov 20, 2024
1 parent 7d3d9bf commit 1d07ed1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Bonsai.ML.NeuralDecoder/ImportDecoderModule.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:py="clr-namespace:Bonsai.Scripting.Python;assembly=Bonsai.Scripting.Python"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns="https://bonsai-rx.org/2018/workflow">
<Description>Import the Bayesian neural decoder module.</Description>
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:py="clr-namespace:Bonsai.Scripting.Python;assembly=Bonsai.Scripting.Python"
xmlns="https://bonsai-rx.org/2018/workflow">
<Description>Load a pickle object into an instance of the clusterless spike decoder class and set it to the referenced python variable.</Description>
<Workflow>
<Nodes>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Name" />
<Property Name="Name" DisplayName="Name" Description="The name of the python variable referencing the model object." Category="ModelReference" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:CreateModelReference">
Expand All @@ -24,7 +25,7 @@
<Selector>Name</Selector>
</Expression>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Value" DisplayName="DecoderPath" Description="Path to the decoder file" />
<Property Name="Value" DisplayName="DecoderPath" Description="Path to the decoder file." />
</Expression>
<Expression xsi:type="PropertySource" TypeArguments="io:CsvReader,sys:String">
<MemberName>FileName</MemberName>
Expand Down
5 changes: 3 additions & 2 deletions src/Bonsai.ML.NeuralDecoder/LoadDecodedResultsFromFile.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:scr="clr-namespace:Bonsai.Scripting.Expressions;assembly=Bonsai.Scripting.Expressions"
xmlns="https://bonsai-rx.org/2018/workflow">
<Description>Loads the decoded results from a pickle file and emits the animals position, spikes, predictions, and position bins at a specified sampling frequency.</Description>
<Workflow>
<Nodes>
<Expression xsi:type="ExternalizedMapping">
Expand Down Expand Up @@ -40,14 +41,14 @@
<Combinator xsi:type="py:Exec" />
</Expression>
<Expression xsi:type="ExternalizedMapping">
<Property Name="SamplingFrequency" />
<Property Name="SamplingFrequency" Description="The sampling frequency at which to emit the data." />
</Expression>
<Expression xsi:type="rx:SelectMany">
<Name>Iterate</Name>
<Workflow>
<Nodes>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Period" DisplayName="SamplingFrequency" />
<Property Name="Period" DisplayName="SamplingFrequency" Description="The sampling frequency at which to emit the data." />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Timer">
Expand Down
5 changes: 3 additions & 2 deletions src/Bonsai.ML.NeuralDecoder/LoadSortedSpikeDecoder.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:py="clr-namespace:Bonsai.Scripting.Python;assembly=Bonsai.Scripting.Python"
xmlns="https://bonsai-rx.org/2018/workflow">
<Description>Load a pickle object into an instance of the sorted spike decoder class and set it to the referenced python variable.</Description>
<Workflow>
<Nodes>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Name" />
<Property Name="Name" DisplayName="Name" Description="The name of the python variable referencing the model object." Category="ModelReference" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:CreateModelReference">
Expand All @@ -24,7 +25,7 @@
<Selector>Name</Selector>
</Expression>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Value" DisplayName="DecoderPath" Description="Path to the decoder file" />
<Property Name="Value" DisplayName="DecoderPath" Description="Path to the decoder file." />
</Expression>
<Expression xsi:type="PropertySource" TypeArguments="io:CsvReader,sys:String">
<MemberName>FileName</MemberName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:p2="clr-namespace:Bonsai.ML.NeuralDecoder;assembly=Bonsai.ML.NeuralDecoder"
xmlns="https://bonsai-rx.org/2018/workflow">
<Description>Performs inference using the Bayesian neural decoder.</Description>
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
Expand All @@ -28,7 +29,7 @@
</Combinator>
</Expression>
<Expression xsi:type="ExternalizedMapping">
<Property Name="Name" />
<Property Name="Name" DisplayName="Name" Description="The name of the python variable referencing the model object." Category="ModelReference" />
</Expression>
<Expression xsi:type="SubscribeSubject" TypeArguments="p1:ModelReference">
<Name>decoder</Name>
Expand Down

0 comments on commit 1d07ed1

Please sign in to comment.