Skip to content

Commit

Permalink
Update ChannelMap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
medengineer committed Jul 3, 2024
1 parent f4def3a commit c3854f8
Show file tree
Hide file tree
Showing 4 changed files with 272 additions and 50 deletions.
258 changes: 230 additions & 28 deletions configs/channel_map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<INFO>
<VERSION>1.0.0-dev</VERSION>
<PLUGIN_API_VERSION>9</PLUGIN_API_VERSION>
<DATE>27 Jun 2024 14:43:36</DATE>
<DATE>30 Jun 2024 22:37:41</DATE>
<OS>Mac OSX 14.5</OS>
<MACHINE name="computer" cpu_model="computer" cpu_num_cores="8"/>
<MACHINE name="Pavels-MBP.lan" cpu_model="Apple M3 Max" cpu_num_cores="14"/>
</INFO>
<SIGNALCHAIN>
<PROCESSOR name="File Reader" insertionPoint="0" pluginName="File Reader"
type="0" index="2" libraryName="" libraryVersion="" processorType="2"
nodeId="100">
<PROCESSOR_PARAMETERS selected_file="default" active_stream="0" start_time="00:00:00.000"
<PROCESSOR_PARAMETERS selected_file="default" active_stream="0" start_time="00:00:00"
end_time="00:00:04.999"/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="16">
Expand All @@ -23,52 +23,234 @@
</CUSTOM_PARAMETERS>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="File Reader" activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="Record Node" insertionPoint="1" pluginName="Record Node"
type="0" index="3" libraryName="" libraryVersion="" processorType="8"
nodeId="101">
<PROCESSOR_PARAMETERS directory="/Volumes/T7/test-suite/" engine="0" events="1" spikes="1"
main_sync="0"/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="16">
<PARAMETERS enable_stream="1" channels="" sync_line="0"/>
</STREAM>
<CUSTOM_PARAMETERS fifoMonitorsVisible="1"/>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Record Node" activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="LFP Viewer" insertionPoint="1" pluginName="LFP Viewer"
type="1" index="5" libraryName="LFP viewer" libraryVersion="1.0.0-dev"
processorType="3" nodeId="102">
<PROCESSOR_PARAMETERS/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="16">
<PARAMETERS enable_stream="1"/>
</STREAM>
<CUSTOM_PARAMETERS/>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="LFP Viewer" activeStream="0"
Type="LfpDisplayEditor">
<TAB Active="1"/>
<WINDOW Active="0"/>
<VALUES SelectedLayout="1"/>
<VISUALIZER_PARAMETERS/>
<CUSTOM_PARAMETERS>
<LFPDISPLAY0 stream_key="100|example_data" Range="250,2000,10.0" Timebase="2.0"
Spread="40" colourScheme="1" colourGrouping="1" spikeRaster="OFF"
clipWarning="1" satWarning="1" reverseOrder="0" sortByDepth="0"
channelSkip="1" showChannelNum="0" subtractOffset="0" isInverted="0"
triggerSource="1" trialAvg="0" singleChannelView="-1" EventButtonState="255"
ChannelDisplayState="1111111111111111" ScrollX="0" ScrollY="0"/>
<LFPDISPLAY1 stream_key="100|example_data" Range="250,2000,10.0" Timebase="2.0"
Spread="40" colourScheme="1" colourGrouping="1" spikeRaster="OFF"
clipWarning="1" satWarning="1" reverseOrder="0" sortByDepth="0"
channelSkip="1" showChannelNum="0" subtractOffset="0" isInverted="0"
triggerSource="1" trialAvg="0" singleChannelView="-1" EventButtonState="255"
ChannelDisplayState="1111111111111111" ScrollX="0" ScrollY="0"/>
<LFPDISPLAY2 stream_key="100|example_data" Range="250,2000,10.0" Timebase="2.0"
Spread="40" colourScheme="1" colourGrouping="1" spikeRaster="OFF"
clipWarning="1" satWarning="1" reverseOrder="0" sortByDepth="0"
channelSkip="1" showChannelNum="0" subtractOffset="0" isInverted="0"
triggerSource="1" trialAvg="0" singleChannelView="-1" EventButtonState="255"
ChannelDisplayState="1111111111111111" ScrollX="0" ScrollY="0"/>
<CANVAS doubleVerticalSplitRatio="0.5" doubleHorizontalSplitRatio="0.5"
tripleHorizontalSplitRatio="0.33,0.66" tripleVerticalSplitRatio="0.33,0.66"
showAllOptions="0"/>
</CUSTOM_PARAMETERS>
</EDITOR>
</PROCESSOR>
<PROCESSOR name="Bandpass Filter" insertionPoint="1" pluginName="Bandpass Filter"
type="1" index="6" libraryName="Bandpass Filter" libraryVersion="1.0.0-dev"
processorType="1" nodeId="103">
<PROCESSOR_PARAMETERS threads="1"/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="16">
<PARAMETERS enable_stream="1" low_cut="100.0" high_cut="5000.0" channels=""/>
</STREAM>
<CUSTOM_PARAMETERS/>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Bandpass Filter"
activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="Channel Map" insertionPoint="1" pluginName="Channel Map"
type="1" index="8" libraryName="Channel Mapper" libraryVersion="1.0.0-dev"
processorType="1" nodeId="101">
processorType="1" nodeId="108">
<PROCESSOR_PARAMETERS/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="12">
sample_rate="40000.0" channel_count="14">
<PARAMETERS enable_stream="1"/>
</STREAM>
<CUSTOM_PARAMETERS>
<STREAM>
<CH index="0" enabled="1"/>
<CH index="1" enabled="1"/>
<CH index="2" enabled="1"/>
<CH index="3" enabled="1"/>
<CH index="4" enabled="1"/>
<CH index="5" enabled="1"/>
<CH index="6" enabled="1"/>
<CH index="7" enabled="1"/>
<CH index="8" enabled="1"/>
<CH index="9" enabled="1"/>
<CH index="10" enabled="1"/>
<CH index="15" enabled="1"/>
<CH index="14" enabled="1"/>
<CH index="13" enabled="1"/>
<CH index="12" enabled="1"/>
<CH index="11" enabled="1"/>
<CH index="12" enabled="0"/>
<CH index="13" enabled="0"/>
<CH index="14" enabled="0"/>
<CH index="15" enabled="0"/>
<CH index="10" enabled="1"/>
<CH index="9" enabled="1"/>
<CH index="8" enabled="1"/>
<CH index="7" enabled="1"/>
<CH index="6" enabled="1"/>
<CH index="5" enabled="1"/>
<CH index="4" enabled="1"/>
<CH index="3" enabled="1"/>
<CH index="2" enabled="1"/>
<CH index="1" enabled="0"/>
<CH index="0" enabled="0"/>
</STREAM>
</CUSTOM_PARAMETERS>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Channel Map" activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="Spike Detector" insertionPoint="1" pluginName="Spike Detector"
type="1" index="3" libraryName="Spike Detector" libraryVersion="1.0.0-dev"
processorType="1" nodeId="104">
<PROCESSOR_PARAMETERS/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="14">
<PARAMETERS enable_stream="1"/>
</STREAM>
<CUSTOM_PARAMETERS>
<SPIKE_CHANNEL name="Stereotrode 1" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="1,2" thrshlder_type="0" abs_threshold1="-50.0"
std_threshold1="4.0" dyn_threshold1="4.0" abs_threshold2="-50.0"
std_threshold2="4.0" dyn_threshold2="4.0" waveform_type="0"/>
<SPIKE_CHANNEL name="Stereotrode 2" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="3,4" thrshlder_type="0" abs_threshold1="-50.0"
std_threshold1="4.0" dyn_threshold1="4.0" abs_threshold2="-50.0"
std_threshold2="4.0" dyn_threshold2="4.0" waveform_type="0"/>
<SPIKE_CHANNEL name="Stereotrode 3" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="5,6" thrshlder_type="0" abs_threshold1="-50.0"
std_threshold1="4.0" dyn_threshold1="4.0" abs_threshold2="-50.0"
std_threshold2="4.0" dyn_threshold2="4.0" waveform_type="0"/>
<SPIKE_CHANNEL name="Stereotrode 4" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="7,8" thrshlder_type="0" abs_threshold1="-50.0"
std_threshold1="4.0" dyn_threshold1="4.0" abs_threshold2="-50.0"
std_threshold2="4.0" dyn_threshold2="4.0" waveform_type="0"/>
<SPIKE_CHANNEL name="Stereotrode 5" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="9,10" thrshlder_type="0"
abs_threshold1="-50.0" std_threshold1="4.0" dyn_threshold1="4.0"
abs_threshold2="-50.0" std_threshold2="4.0" dyn_threshold2="4.0"
waveform_type="0"/>
<SPIKE_CHANNEL name="Stereotrode 6" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="11,12" thrshlder_type="0"
abs_threshold1="-50.0" std_threshold1="4.0" dyn_threshold1="4.0"
abs_threshold2="-50.0" std_threshold2="4.0" dyn_threshold2="4.0"
waveform_type="0"/>
<SPIKE_CHANNEL name="Stereotrode 7" description="Stereotrode from Spike Detector 104"
num_channels="2" sample_rate="40000.0" stream_name="example_data"
stream_source="100" local_channels="13,14" thrshlder_type="0"
abs_threshold1="-50.0" std_threshold1="4.0" dyn_threshold1="4.0"
abs_threshold2="-50.0" std_threshold2="4.0" dyn_threshold2="4.0"
waveform_type="0"/>
</CUSTOM_PARAMETERS>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Spike Detector"
activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="Record Node" insertionPoint="1" pluginName="Record Node"
type="0" index="3" libraryName="" libraryVersion="" processorType="8"
nodeId="102">
<PROCESSOR_PARAMETERS directory="default" engine="0"
events="1" spikes="1" main_sync="0"/>
nodeId="105">
<PROCESSOR_PARAMETERS directory="/Volumes/T7/test-suite/" engine="0" events="1" spikes="1"
main_sync="0"/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="12">
sample_rate="40000.0" channel_count="14">
<PARAMETERS enable_stream="1" channels="" sync_line="0"/>
</STREAM>
<CUSTOM_PARAMETERS fifoMonitorsVisible="1"/>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Record Node" activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="Audio Monitor" insertionPoint="1" pluginName="Audio Monitor"
type="0" index="4" libraryName="" libraryVersion="" processorType="6"
nodeId="106">
<PROCESSOR_PARAMETERS mute_audio="0" audio_output="1"/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="14">
<PARAMETERS enable_stream="1" channels="" spike_channel="0"/>
</STREAM>
<CUSTOM_PARAMETERS/>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Audio Monitor"
activeStream="0"/>
</PROCESSOR>
<PROCESSOR name="Spike Viewer" insertionPoint="1" pluginName="Spike Viewer"
type="1" index="1" libraryName="Spike Viewer" libraryVersion="1.0.0-dev"
processorType="3" nodeId="107">
<PROCESSOR_PARAMETERS/>
<STREAM name="example_data" description="A description of the File Reader Stream"
sample_rate="40000.0" channel_count="14">
<PARAMETERS enable_stream="1"/>
</STREAM>
<CUSTOM_PARAMETERS/>
<EDITOR isCollapsed="0" isDrawerOpen="0" displayName="Spike Viewer" activeStream="0"
Type="Visualizer" scale_factor_index="5">
<TAB Active="1"/>
<WINDOW Active="0"/>
<VISUALIZER_PARAMETERS/>
<CUSTOM_PARAMETERS>
<SPIKEDISPLAY LockThresholds="0" InvertSpikes="0" NumPlots="7">
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 1" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 2" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 3" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 4" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 5" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 6" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
<PLOT stream_source="100" stream_name="example_data" spike_source="104"
name="Stereotrode 7" isMonitored="0">
<AXIS thresh="0.0" range="250.0"/>
<AXIS thresh="0.0" range="250.0"/>
</PLOT>
</SPIKEDISPLAY>
</CUSTOM_PARAMETERS>
</EDITOR>
</PROCESSOR>
</SIGNALCHAIN>
<CONTROLPANEL isOpen="0" recordPath="default"
<CONTROLPANEL isOpen="1" recordPath="/Users/pavelkulik/Documents/Open Ephys"
recordEngine="BINARY" clockMode="0"/>
<AUDIOEDITOR isMuted="0" volume="50.0" noiseGate="0.0"/>
<AUDIOEDITOR isMuted="0" volume="50.0" noiseGate="10.0"/>
<FILENAMECONFIG>
<PREPEND state="0" value=""/>
<MAIN state="1" value="YYYY-MM-DD_HH-MM-SS"/>
Expand All @@ -85,19 +267,39 @@
<NODE id="102" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
<NODE id="103" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
<NODE id="108" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
<NODE id="104" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
<NODE id="105" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
<NODE id="106" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
<NODE id="107" isProcessorInfoVisible="0">
<STREAM key="100|example_data" isStreamVisible="0" isParamsVisible="0"/>
</NODE>
</GRAPHVIEWER>
<DATAVIEWPORT>
<TABBEDCOMPONENT index="0" selectedTabNodeId="1">
<TABBEDCOMPONENT index="0" selectedTabNodeId="107">
<TAB nodeId="0"/>
<TAB nodeId="1"/>
<TAB nodeId="102"/>
<TAB nodeId="107"/>
</TABBEDCOMPONENT>
</DATAVIEWPORT>
<PROCESSORLIST>
<COLOUR ID="801" R="45" G="45" B="45"/>
<COLOUR ID="804" R="241" G="90" B="41"/>
<COLOUR ID="802" R="0" G="174" B="239"/>
<COLOUR ID="803" R="0" G="166" B="81"/>
<COLOUR ID="805" R="147" G="149" B="152"/>
<COLOUR ID="805" R="90" G="110" B="110"/>
<COLOUR ID="806" R="255" G="0" B="0"/>
<COLOUR ID="807" R="0" G="0" B="0"/>
</PROCESSORLIST>
Expand Down
17 changes: 10 additions & 7 deletions run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@
import platform
from datetime import datetime

tests = (
gui_tests = (
#'processor_graph_actions.py',
#'get_set_parameters.py',
#'basic_acquire.py',
#'basic_record.py',
'basic_record.py',
#'get_set_recording_info.py',
'config_audio_device.py',
#'config_audio_device.py',
#'round_trip_record.py',
#'channel_map.py' #TODO: add more plugin specific tests
)

GHA = os.getenv("GITHUB_ACTIONS") == "true"
#TODO: Add more plugin tests
plugin_tests = (
'channel_map.py',
)

GHA = os.getenv("GITHUB_ACTIONS") == "true"

LOCAL_MAC_PATH = '/Volumes/T7/test-suite/'

Expand All @@ -32,7 +35,7 @@
if GHA: pass #RECORD_PATH = '<path/to/Mac/runner>' # TODO
else: RECORD_PATH = LOCAL_MAC_PATH

for test in tests:
for test in gui_tests + plugin_tests:
print("--------------------------------")
print("Running: ", test[:-3])
print("Start time: ", datetime.now().strftime("%Y-%m-%d_%H-%M-%S"))
Expand All @@ -41,4 +44,4 @@
if rc != 0:
print("TEST FAILED: ", test)
break
time.sleep(1)
time.sleep(1)
Loading

0 comments on commit c3854f8

Please sign in to comment.