Stimulus Mapping¶
ModuleGUI¶
Page¶
Each Page instance contains the mapping data for one stimulus type
-
class
mesmerize.viewer.modules.stimmap_modules.page.
Page
(parent, stim_type: str)[source]¶ -
set_data
(dataframe: pandas.core.frame.DataFrame)[source]¶ Set the stimulus map
- Parameters
dataframe – DataFrame with the appropriate rows (see add_row())
-
add_row
(pd_series: Optional[pandas.core.series.Series] = None)[source]¶ Add a row to the stimulus map
- Parameters
pd_series – pandas series containing the following: stimulus name, start, end, and color
- Returns
-
DataFrame Format¶
Page.set_data() expects a DataFrame in the following format
Columns
Column
Description
name
Stimulus name
start
Start time of stimulus period
end
End time of stimulus period
color
Color to display in the viewer curve plot
Data types:
Column
Data type
name
str
start
numpy.float64
end
numpy.float64
color
Tuple in RGBA format
(int, int, int, int)Each int must be within the 0 - 255 range
Example
name
start
end
color
control
0.0
328.0
(0, 75, 0, 255)
stim_A
328.0
1156.0
(0, 0, 125, 255)
stim_C
1156.0
2987.0
(125, 0, 0, 255)