Skip to content

Commit 1a95afd

Browse files
committed
2 parents fc70f7b + d4def37 commit 1a95afd

File tree

7 files changed

+1311
-903
lines changed

7 files changed

+1311
-903
lines changed

src/DataSchemas/aind_behavior_vr_foraging.json

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"AindBehaviorSessionModel": {
44
"properties": {
55
"aind_behavior_services_pkg_version": {
6-
"default": "0.12.2",
6+
"default": "0.12.3",
77
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
88
"title": "aind_behavior_services package version",
99
"type": "string"
1010
},
1111
"version": {
12-
"const": "0.12.2",
13-
"default": "0.12.2",
12+
"const": "0.12.3",
13+
"default": "0.12.3",
1414
"title": "Version",
1515
"type": "string"
1616
},
@@ -353,7 +353,7 @@
353353
"AindVrForagingRig": {
354354
"properties": {
355355
"aind_behavior_services_pkg_version": {
356-
"default": "0.12.2",
356+
"default": "0.12.3",
357357
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
358358
"title": "aind_behavior_services package version",
359359
"type": "string"
@@ -611,7 +611,7 @@
611611
"title": "Rng Seed"
612612
},
613613
"aind_behavior_services_pkg_version": {
614-
"default": "0.12.2",
614+
"default": "0.12.3",
615615
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
616616
"title": "aind_behavior_services package version",
617617
"type": "string"
@@ -917,16 +917,6 @@
917917
"type": "object"
918918
},
919919
"BlockEndCondition": {
920-
"discriminator": {
921-
"mapping": {
922-
"Choice": "#/$defs/BlockEndConditionChoice",
923-
"Distance": "#/$defs/BlockEndConditionDistance",
924-
"Duration": "#/$defs/BlockEndConditionDuration",
925-
"PatchCount": "#/$defs/BlockEndConditionPatchCount",
926-
"Reward": "#/$defs/BlockEndConditionReward"
927-
},
928-
"propertyName": "condition_type"
929-
},
930920
"oneOf": [
931921
{
932922
"$ref": "#/$defs/BlockEndConditionDuration"
@@ -3376,16 +3366,6 @@
33763366
"type": "object"
33773367
},
33783368
"PatchTerminator": {
3379-
"discriminator": {
3380-
"mapping": {
3381-
"OnChoice": "#/$defs/PatchTerminatorOnChoice",
3382-
"OnDistance": "#/$defs/PatchTerminatorOnDistance",
3383-
"OnRejection": "#/$defs/PatchTerminatorOnRejection",
3384-
"OnReward": "#/$defs/PatchTerminatorOnReward",
3385-
"OnTime": "#/$defs/PatchTerminatorOnTime"
3386-
},
3387-
"propertyName": "terminator_type"
3388-
},
33893369
"oneOf": [
33903370
{
33913371
"$ref": "#/$defs/PatchTerminatorOnRejection"
@@ -3945,15 +3925,6 @@
39453925
"type": "object"
39463926
},
39473927
"RewardFunction": {
3948-
"discriminator": {
3949-
"mapping": {
3950-
"OnThisPatchEntryRewardFunction": "#/$defs/OnThisPatchEntryRewardFunction",
3951-
"OutsideRewardFunction": "#/$defs/OutsideRewardFunction",
3952-
"PatchRewardFunction": "#/$defs/PatchRewardFunction",
3953-
"PersistentRewardFunction": "#/$defs/PersistentRewardFunction"
3954-
},
3955-
"propertyName": "function_type"
3956-
},
39573928
"oneOf": [
39583929
{
39593930
"$ref": "#/$defs/PatchRewardFunction"
@@ -4997,8 +4968,18 @@
49974968
"type": "object"
49984969
},
49994970
"TruncationParameters": {
5000-
"description": "Parameters for truncating a distribution to a specified range. Truncation should\nbe applied after sampling and scaling.\n\nUsed to constrain sampled values within minimum and maximum bounds.",
4971+
"description": "Parameters for truncating a distribution to a specified range. Truncation should\nbe applied after sampling and scaling.\n\nThe truncation_mode determines how out-of-bounds values are handled:\n- \"exclude\": Resample until a value within [min, max] is obtained.\nIf after a certain number of attempts no valid value is found, it\nwill use the average of sampled values and pick the closest bound.\n- \"clamp\": Clamp values to the nearest bound within [min, max].\nUsed to constrain sampled values within minimum and maximum bounds.",
50014972
"properties": {
4973+
"truncation_mode": {
4974+
"default": "exclude",
4975+
"description": "Mode of truncation to apply",
4976+
"enum": [
4977+
"exclude",
4978+
"clamp"
4979+
],
4980+
"title": "Truncation Mode",
4981+
"type": "string"
4982+
},
50024983
"min": {
50034984
"default": 0,
50044985
"description": "Minimum value of the sampled distribution",
@@ -5097,13 +5078,6 @@
50975078
"type": "string"
50985079
},
50995080
"VideoWriter": {
5100-
"discriminator": {
5101-
"mapping": {
5102-
"FFMPEG": "#/$defs/VideoWriterFfmpeg",
5103-
"OPENCV": "#/$defs/VideoWriterOpenCv"
5104-
},
5105-
"propertyName": "video_writer_type"
5106-
},
51075081
"oneOf": [
51085082
{
51095083
"$ref": "#/$defs/VideoWriterFfmpeg"

src/Extensions.csproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net48</TargetFramework>
3+
<!-- <OutputType>Exe</OutputType> -->
4+
<!--<TargetFramework>net8.0-windows</TargetFramework>-->
5+
<TargetFramework>net480</TargetFramework>
46
<UseWindowsForms>true</UseWindowsForms>
5-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
68
</PropertyGroup>
79
<ItemGroup>
810
<PackageReference Include="Bonsai.Core" Version="2.9.0" />
9-
<PackageReference Include="AllenNeuralDynamics.Core.Design" Version="0.3.0" />
11+
<PackageReference Include="AllenNeuralDynamics.Core.Design" Version="0.3.0" />
1012
<PackageReference Include="OpenCV.Net" Version="3.4.2" />
1113
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
12-
<PackageReference Include="Bonsai.Harp" Version="3.5.0" />
14+
<PackageReference Include="Bonsai.Harp" Version="3.5.2" />
1315
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
1416
<PackageReference Include="Harp.Olfactometer" Version="0.1.0-build231127" />
1517
<PackageReference Include="AllenNeuralDynamics.AindManipulator" Version="0.1.6" />
16-
<PackageReference Include="Hexa.NET.ImGui" Version="2.2.8.4" />
17-
<PackageReference Include="Hexa.NET.ImPlot" Version="2.2.8.4" />
18+
<PackageReference Include="Hexa.NET.ImGui" Version="2.2.9" />
19+
<PackageReference Include="Hexa.NET.ImPlot" Version="2.2.9" />
1820
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" />
1921
<PackageReference Include="Bonsai.Dsp.Design" Version="2.9.0" />
20-
<PackageReference Include="Hexa.NET.ImGui.Backends" Version="1.0.17" />
22+
<PackageReference Include="Hexa.NET.ImGui.Backends" Version="1.0.17.4" />
2123
<PackageReference Include="AllenNeuralDynamics.AindBehaviorServices" Version="0.12.0" />
2224
</ItemGroup>
2325
</Project>

src/Extensions/AddRewardSite.bonsai

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<WorkflowBuilder Version="2.8.2"
2+
<WorkflowBuilder Version="2.9.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
55
xmlns:p1="clr-namespace:AindVrForagingDataSchema;assembly=Extensions"
66
xmlns:sys="clr-namespace:System;assembly=mscorlib"
77
xmlns:num="clr-namespace:Bonsai.Numerics;assembly=Bonsai.Numerics"
8+
xmlns:p2="clr-namespace:;assembly=Extensions"
89
xmlns="https://bonsai-rx.org/2018/workflow">
910
<Workflow>
1011
<Nodes>
@@ -180,6 +181,16 @@
180181
<Property Name="OperantLogic" />
181182
</PropertyMappings>
182183
</Expression>
184+
<Expression xsi:type="Combinator">
185+
<Combinator xsi:type="p2:NullDistribution" />
186+
</Expression>
187+
<Expression xsi:type="PropertyMapping">
188+
<PropertyMappings>
189+
<Property Name="Amount" />
190+
<Property Name="Probability" />
191+
<Property Name="Available" />
192+
</PropertyMappings>
193+
</Expression>
183194
<Expression xsi:type="Combinator">
184195
<Combinator xsi:type="p1:RewardSpecification" />
185196
</Expression>
@@ -188,7 +199,7 @@
188199
<Edges>
189200
<Edge From="0" To="1" Label="Source1" />
190201
<Edge From="1" To="2" Label="Source1" />
191-
<Edge From="2" To="16" Label="Source1" />
202+
<Edge From="2" To="18" Label="Source1" />
192203
<Edge From="3" To="4" Label="Source1" />
193204
<Edge From="4" To="5" Label="Source1" />
194205
<Edge From="5" To="6" Label="Source1" />
@@ -201,8 +212,10 @@
201212
<Edge From="12" To="13" Label="Source1" />
202213
<Edge From="13" To="14" Label="Source2" />
203214
<Edge From="14" To="15" Label="Source1" />
204-
<Edge From="15" To="16" Label="Source2" />
215+
<Edge From="15" To="18" Label="Source2" />
205216
<Edge From="16" To="17" Label="Source1" />
217+
<Edge From="17" To="18" Label="Source3" />
218+
<Edge From="18" To="19" Label="Source1" />
206219
</Edges>
207220
</Workflow>
208221
</Expression>

0 commit comments

Comments
 (0)