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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies = [
"deepdiff >=8, <9",
"aind-data-schema==1.1.0",
"aind-data-schema-models==0.5.6",
"pydantic >=2.9.2, <3",
"pydantic==2.10.6",
"stagewidget==1.0.5",
"python-logging-loki >=0.3.1, <2",
"pykeepass >=4.0.7, <5",
Expand Down Expand Up @@ -103,4 +103,4 @@ profile = "black"

[tool.interrogate]
exclude = ["setup.py", "docs", "build", "tests"]
fail-under = 70
fail-under = 70
6 changes: 3 additions & 3 deletions src/foraging_gui/MyFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def _generate_next_coupled_block(self):
if self.TP_Randomness == "Exponential":
self.BlockLen = np.array(
int(
np.random.exponential(float(self.TP_BlockBeta), 1)
np.random.exponential(float(self.TP_BlockBeta))
+ float(self.TP_BlockMin)
)
)
Expand All @@ -520,7 +520,7 @@ def _generate_next_trial_other_paras(self):
# get the ITI time and delay time
if self.TP_Randomness == "Exponential":
self.CurrentITI = float(
np.random.exponential(float(self.TP_ITIBeta), 1)
np.random.exponential(float(self.TP_ITIBeta))
+ float(self.TP_ITIMin)
)
elif self.TP_Randomness == "Even":
Expand All @@ -531,7 +531,7 @@ def _generate_next_trial_other_paras(self):
self.CurrentITI = float(self.TP_ITIMax)
if self.TP_Randomness == "Exponential":
self.CurrentDelay = float(
np.random.exponential(float(self.TP_DelayBeta), 1)
np.random.exponential(float(self.TP_DelayBeta))
+ float(self.TP_DelayMin)
)
elif self.TP_Randomness == "Even":
Expand Down
46 changes: 33 additions & 13 deletions src/workflows/foraging.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -2896,6 +2896,23 @@
<Expression xsi:type="SubscribeSubject">
<Name>BehaviorEvents</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:Take">
<rx:Count>1</rx:Count>
</Combinator>
</Expression>
<Expression xsi:type="beh:CreateMessage">
<harp:MessageType>Write</harp:MessageType>
<harp:Payload xsi:type="beh:CreateEventEnablePayload">
<beh:EventEnable>PortDI PortDIO AnalogData Camera0 Camera1</beh:EventEnable>
</harp:Payload>
</Expression>
<Expression xsi:type="MulticastSubject">
<Name>BehaviorCommands</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>BehaviorEvents</Name>
</Expression>
<Expression xsi:type="beh:Parse">
<harp:Register xsi:type="beh:TimestampedAnalogData" />
</Expression>
Expand Down Expand Up @@ -3579,24 +3596,27 @@
<Edge From="6" To="7" Label="Source1" />
<Edge From="7" To="8" Label="Source1" />
<Edge From="8" To="9" Label="Source1" />
<Edge From="10" To="15" Label="Source1" />
<Edge From="10" To="11" Label="Source1" />
<Edge From="11" To="12" Label="Source1" />
<Edge From="12" To="13" Label="Source1" />
<Edge From="13" To="14" Label="Source1" />
<Edge From="14" To="15" Label="Source2" />
<Edge From="16" To="21" Label="Source1" />
<Edge From="14" To="19" Label="Source1" />
<Edge From="15" To="16" Label="Source1" />
<Edge From="16" To="17" Label="Source1" />
<Edge From="17" To="18" Label="Source1" />
<Edge From="18" To="19" Label="Source1" />
<Edge From="19" To="20" Label="Source1" />
<Edge From="20" To="21" Label="Source2" />
<Edge From="22" To="26" Label="Source1" />
<Edge From="18" To="19" Label="Source2" />
<Edge From="20" To="25" Label="Source1" />
<Edge From="21" To="22" Label="Source1" />
<Edge From="22" To="23" Label="Source1" />
<Edge From="23" To="24" Label="Source1" />
<Edge From="24" To="25" Label="Source1" />
<Edge From="25" To="26" Label="Source2" />
<Edge From="27" To="31" Label="Source1" />
<Edge From="24" To="25" Label="Source2" />
<Edge From="26" To="30" Label="Source1" />
<Edge From="27" To="28" Label="Source1" />
<Edge From="28" To="29" Label="Source1" />
<Edge From="29" To="30" Label="Source1" />
<Edge From="30" To="31" Label="Source2" />
<Edge From="29" To="30" Label="Source2" />
<Edge From="31" To="35" Label="Source1" />
<Edge From="32" To="33" Label="Source1" />
<Edge From="33" To="34" Label="Source1" />
<Edge From="34" To="35" Label="Source2" />
</Edges>
</Workflow>
</Expression>
Expand Down
Loading