Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 37 additions & 23 deletions src/Extensions/InstantiateSite.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
xmlns:p1="clr-namespace:AindVrForagingDataSchema;assembly=Extensions"
xmlns:dsp="clr-namespace:Bonsai.Dsp;assembly=Bonsai.Dsp"
xmlns:harp="clr-namespace:Bonsai.Harp;assembly=Bonsai.Harp"
xmlns:p2="clr-namespace:Bonsai.Numerics.Distributions;assembly=Bonsai.Numerics"
xmlns:p2="clr-namespace:AllenNeuralDynamics.Core;assembly=AllenNeuralDynamics.Core"
xmlns:p3="clr-namespace:Bonsai.Numerics.Distributions;assembly=Bonsai.Numerics"
xmlns:bv="clr-namespace:BonVision;assembly=BonVision"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
Expand Down Expand Up @@ -849,20 +850,31 @@ it.Item2 as EntryPosition)</scr:Expression>
<Expression xsi:type="SubscribeSubject">
<Name>patchState</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p2:CreateSoftwareEvent">
<p2:EventName>PatchStateAtReward</p2:EventName>
</Combinator>
</Expression>
<Expression xsi:type="MulticastSubject">
<Name>SoftwareEvent</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>patchState</Name>
</Expression>
<Expression xsi:type="MemberSelector">
<Selector>Probability</Selector>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>RngSeed</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p2:CreateContinuousUniform">
<p2:Lower>0</p2:Lower>
<p2:Upper>1</p2:Upper>
<Combinator xsi:type="p3:CreateContinuousUniform">
<p3:Lower>0</p3:Lower>
<p3:Upper>1</p3:Upper>
</Combinator>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p2:Sample" />
<Combinator xsi:type="p3:Sample" />
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Zip" />
Expand Down Expand Up @@ -972,31 +984,33 @@ it.Item2 as EntryPosition)</scr:Expression>
<Edge From="3" To="4" Label="Source2" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="6" To="7" Label="Source1" />
<Edge From="7" To="11" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="9" To="10" Label="Source1" />
<Edge From="10" To="11" Label="Source2" />
<Edge From="10" To="14" Label="Source1" />
<Edge From="11" To="12" Label="Source1" />
<Edge From="11" To="13" Label="Source1" />
<Edge From="12" To="13" Label="Source2" />
<Edge From="13" To="14" Label="Source1" />
<Edge From="14" To="17" Label="Source1" />
<Edge From="15" To="16" Label="Source1" />
<Edge From="16" To="17" Label="Source2" />
<Edge From="17" To="18" Label="Source1" />
<Edge From="17" To="26" Label="Source1" />
<Edge From="12" To="13" Label="Source1" />
<Edge From="13" To="14" Label="Source2" />
<Edge From="14" To="15" Label="Source1" />
<Edge From="14" To="16" Label="Source1" />
<Edge From="15" To="16" Label="Source2" />
<Edge From="16" To="17" Label="Source1" />
<Edge From="17" To="20" Label="Source1" />
<Edge From="18" To="19" Label="Source1" />
<Edge From="19" To="22" Label="Source1" />
<Edge From="19" To="20" Label="Source2" />
<Edge From="20" To="21" Label="Source1" />
<Edge From="21" To="22" Label="Source2" />
<Edge From="22" To="23" Label="Source1" />
<Edge From="20" To="29" Label="Source1" />
<Edge From="21" To="22" Label="Source1" />
<Edge From="22" To="25" Label="Source1" />
<Edge From="23" To="24" Label="Source1" />
<Edge From="24" To="25" Label="Source1" />
<Edge From="25" To="28" Label="Source1" />
<Edge From="24" To="25" Label="Source2" />
<Edge From="25" To="26" Label="Source1" />
<Edge From="26" To="27" Label="Source1" />
<Edge From="27" To="28" Label="Source2" />
<Edge From="28" To="29" Label="Source1" />
<Edge From="27" To="28" Label="Source1" />
<Edge From="28" To="31" Label="Source1" />
<Edge From="29" To="30" Label="Source1" />
<Edge From="30" To="31" Label="Source2" />
<Edge From="31" To="32" Label="Source1" />
<Edge From="32" To="33" Label="Source1" />
</Edges>
</Workflow>
</Expression>
Expand Down
7 changes: 7 additions & 0 deletions src/aind_behavior_vr_foraging/data_contract/v0_6_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,13 @@ def dataset(
root_path / "behavior/SoftwareEvents/SpoutParkingPositions.json"
),
),
SoftwareEvents(
name="PatchStateAtReward",
description="An event emitted whenever the reward is about to be given and the patch state is sampled.",
reader_params=SoftwareEvents.make_params(
root_path / "behavior/SoftwareEvents/PatchStateAtReward.json"
),
),
],
),
DataStreamCollection(
Expand Down