forked from bonvision/BonVision
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sparse noise section and minor content edits
- Loading branch information
Showing
13 changed files
with
434 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Neuroscience Stimuli | ||
|
||
## Sparse Noise | ||
|
||
The `SparseNoise` operator generates a non-overlapping discrete sparse grid of randomly activated quads. | ||
|
||
Drawing the stimuli produced from the `SparseNoise` operator is a little different from the other `DrawX` stimuli. | ||
|
||
1) Add a `Texture2D` resource called `DynamicVideo` using the `TextureResource` operator. | ||
2) Add a `DrawImage` operator that renders the `DynamicVideo` texture. | ||
3) Connect a `UpdateTexture` operator to the `SparseNoise` operator and choose the `DynamicVideo` texture to update. | ||
|
||
:::workflow | ||
![SparseNoise](../workflows/neuroscience-stimuli-sparse-noise.bonsai) | ||
::: | ||
|
||
- Add logging information? | ||
|
||
|
||
## Gratings | ||
As grating stimuli are commonly used in visual physiology experiments, we have created a few specialized nodes that make it convenient to design grating experiments very easily. | ||
|
||
- Shawn's note - currently some of these nodes appear to be broken, awaiting feedback on https://github.com/bonsai-rx/bonsai/issues/1832 | ||
|
||
### Nodes to document | ||
`GratingsSpecification`, `CreateGratingTrial`, `GratingSequence`, `DrawGrating` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Frame,Timestamp,Value | ||
10,0.1833524,{Width=10, Height=10, Depth=U8, Channels=1} | ||
22,0.38393479999999996,{Width=10, Height=10, Depth=U8, Channels=1} | ||
34,0.58393719999999993,{Width=10, Height=10, Depth=U8, Channels=1} | ||
46,0.78393989999999991,{Width=10, Height=10, Depth=U8, Channels=1} | ||
58,0.98394399999999993,{Width=10, Height=10, Depth=U8, Channels=1} | ||
70,1.1839461999999998,{Width=10, Height=10, Depth=U8, Channels=1} | ||
82,1.3839484,{Width=10, Height=10, Depth=U8, Channels=1} | ||
90,1.5946148999999998,{Width=10, Height=10, Depth=U8, Channels=1} | ||
102,1.7946171,{Width=10, Height=10, Depth=U8, Channels=1} | ||
114,1.9946197999999999,{Width=10, Height=10, Depth=U8, Channels=1} | ||
126,2.1946224000000001,{Width=10, Height=10, Depth=U8, Channels=1} | ||
138,2.3946332999999997,{Width=10, Height=10, Depth=U8, Channels=1} | ||
150,2.5995718999999999,{Width=10, Height=10, Depth=U8, Channels=1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<WorkflowBuilder Version="2.8.2" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:gl="clr-namespace:Bonsai.Shaders;assembly=Bonsai.Shaders" | ||
xmlns:res="clr-namespace:Bonsai.Resources;assembly=Bonsai.System" | ||
xmlns="https://bonsai-rx.org/2018/workflow"> | ||
<Workflow> | ||
<Nodes> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="gl:CreateWindow"> | ||
<gl:Width>640</gl:Width> | ||
<gl:Height>480</gl:Height> | ||
<gl:VSync>On</gl:VSync> | ||
<gl:SwapSync>false</gl:SwapSync> | ||
<gl:ClearColor>Black</gl:ClearColor> | ||
<gl:ClearMask>DepthBufferBit ColorBufferBit</gl:ClearMask> | ||
<gl:CursorVisible>true</gl:CursorVisible> | ||
<gl:Location xsi:nil="true" /> | ||
<gl:WindowBorder>Resizable</gl:WindowBorder> | ||
<gl:WindowState>Normal</gl:WindowState> | ||
<gl:DisplayDevice>Primary</gl:DisplayDevice> | ||
<gl:TargetRenderFrequency>60</gl:TargetRenderFrequency> | ||
<gl:TargetUpdateFrequency xsi:nil="true" /> | ||
<gl:RenderState /> | ||
<gl:GraphicsMode> | ||
<gl:ColorFormat> | ||
<gl:Red>8</gl:Red> | ||
<gl:Green>8</gl:Green> | ||
<gl:Blue>8</gl:Blue> | ||
<gl:Alpha>8</gl:Alpha> | ||
</gl:ColorFormat> | ||
<gl:Depth>16</gl:Depth> | ||
<gl:Stencil>0</gl:Stencil> | ||
<gl:Samples>0</gl:Samples> | ||
<gl:AccumulatorFormat> | ||
<gl:Red>0</gl:Red> | ||
<gl:Green>0</gl:Green> | ||
<gl:Blue>0</gl:Blue> | ||
<gl:Alpha>0</gl:Alpha> | ||
</gl:AccumulatorFormat> | ||
<gl:Buffers>2</gl:Buffers> | ||
<gl:Stereo>false</gl:Stereo> | ||
</gl:GraphicsMode> | ||
</Combinator> | ||
</Expression> | ||
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Primitives.BonVisionResources.bonsai" /> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="gl:TextureResources"> | ||
<gl:Textures> | ||
<gl:TextureConfiguration xsi:type="gl:Texture2D"> | ||
<gl:Name>DynamicVideo</gl:Name> | ||
<gl:Width xsi:nil="true" /> | ||
<gl:Height xsi:nil="true" /> | ||
<gl:InternalFormat>Rgba</gl:InternalFormat> | ||
<gl:WrapS>Repeat</gl:WrapS> | ||
<gl:WrapT>Repeat</gl:WrapT> | ||
<gl:MinFilter>Nearest</gl:MinFilter> | ||
<gl:MagFilter>Nearest</gl:MagFilter> | ||
</gl:TextureConfiguration> | ||
</gl:Textures> | ||
</Combinator> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="res:LoadResources" /> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="gl:RenderFrame" /> | ||
</Expression> | ||
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Environment.NormalizedView.bonsai" /> | ||
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Primitives.DrawImage.bonsai"> | ||
<TextureName>DynamicVideo</TextureName> | ||
<ExtentX>1</ExtentX> | ||
<ExtentY>1</ExtentY> | ||
<LocationX>0</LocationX> | ||
<LocationY>0</LocationY> | ||
<Layer>0</Layer> | ||
<Angle>0</Angle> | ||
<ScaleX>1</ScaleX> | ||
<ScaleY>1</ScaleY> | ||
<ShiftX>0</ShiftX> | ||
<ShiftY>0</ShiftY> | ||
</Expression> | ||
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Collections.SparseNoise.bonsai"> | ||
<Duration>PT0.2S</Duration> | ||
<ActiveQuads>5</ActiveQuads> | ||
<GridSize> | ||
<Width>10</Width> | ||
<Height>10</Height> | ||
</GridSize> | ||
</Expression> | ||
<Expression xsi:type="Combinator"> | ||
<Combinator xsi:type="gl:UpdateTexture"> | ||
<gl:TextureName>DynamicVideo</gl:TextureName> | ||
<gl:TextureTarget>Texture2D</gl:TextureTarget> | ||
<gl:InternalFormat>Rgba</gl:InternalFormat> | ||
</Combinator> | ||
</Expression> | ||
</Nodes> | ||
<Edges> | ||
<Edge From="0" To="1" Label="Source1" /> | ||
<Edge From="1" To="2" Label="Source1" /> | ||
<Edge From="2" To="3" Label="Source1" /> | ||
<Edge From="4" To="5" Label="Source1" /> | ||
<Edge From="5" To="6" Label="Source1" /> | ||
<Edge From="7" To="8" Label="Source1" /> | ||
</Edges> | ||
</Workflow> | ||
</WorkflowBuilder> |
Oops, something went wrong.