Views
Sidebar
sidebar
Sidebar
Sidebar(callback_fileupload=None, callback=None, callback_table_chooser=None, callback_intslider=None, callback_block_selector=None, callback_analysis_event=None, callback_exporter_event=None, callback_method_event=None)
A class used to represent the sidebar of the application.
This class is responsible for handling user interactions with the sidebar and updating the sidebar's state accordingly.
Attributes:
Name | Type | Description |
---|---|---|
accordion |
object
|
An instance of the Accordion class. |
layout |
object
|
A panel Column layout containing the accordion component. |
ch |
list
|
A list of selected channels. |
amount_ch |
int
|
The number of selected channels. |
Methods:
Name | Description |
---|---|
update_channel_selector |
Updates the channel selector based on the provided data. |
update_color_picker |
Updates the color picker based on the selected channels. |
The accordion attribute is initialized as an Accordion instance. The layout attribute is initialized as a panel Column layout containing the accordion component. The ch attribute is initialized as an empty list. The amount_ch attribute is initialized as 0.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
callback_fileupload |
function
|
A callback function for file upload events. |
None
|
callback |
function
|
A general callback function. |
None
|
callback_table_chooser |
function
|
A callback function for table chooser events. |
None
|
callback_intslider |
function
|
A callback function for intslider events. |
None
|
callback_block_selector |
function
|
A callback function for block selector events. |
None
|
callback_analysis_event |
function
|
A callback function for analysis events. |
None
|
callback_exporter_event |
function
|
A callback function for exporter events. |
None
|
callback_method_event |
function
|
A callback function for method events. |
None
|
Source code in src/fft_analysator/gui/views/sidebar.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
servable
servable()
Makes the sidebar servable.
Source code in src/fft_analysator/gui/views/sidebar.py
309 310 311 312 313 |
|
update_channel_selector
update_channel_selector(data_callback=None)
Updates the channel selector based on the provided data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_callback |
function
|
A callback function that returns the data to be used for updating the channel selector. |
None
|
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
update_color_picker
update_color_picker()
Updates the color picker based on the selected channels.
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
update_exporter
update_exporter(method_callback=None)
Updates the exporter based on the provided method callback.
If the method callback is "No Analysis Function" or None, the exporter selector and the file exporter are disabled. Otherwise, they are enabled.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
method_callback |
function
|
A callback function to retrieve the method. If not provided or if it is "No Analysis Function", the exporter selector and the file exporter are disabled. |
None
|
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
update_file_list
update_file_list()
Updates the file list based on the file paths in the file input component.
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
162 163 164 165 166 167 168 169 170 171 172 173 |
|
update_general_plotting_widgets
update_general_plotting_widgets(data_callback=None)
Updates the general plotting widgets based on the provided data.
If a data callback function is provided, the widgets are enabled. Otherwise, they are disabled.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_callback |
function
|
A callback function to retrieve the data. If not provided, the widgets are disabled. |
None
|
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
|
update_intslider
update_intslider(data_callback=None)
Updates the integer slider and the navigation buttons based on the provided data.
If the file paths attribute of the file input component is not empty and a data callback function is provided, the integer slider and the navigation buttons are enabled and updated based on the data. Otherwise, they are disabled.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_callback |
function
|
A callback function to retrieve the data. If not provided, the integer slider and the navigation buttons are disabled. |
None
|
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
|
update_nav_index
update_nav_index()
Updates the navigation index based on the current value of the integer slider.
The navigation index is updated to a string of the format 'current value/start-end', where 'current value' is the current value of the integer slider, and 'start' and 'end' are the start and end values of the navigation index box.
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
217 218 219 220 221 222 223 224 225 226 |
|
update_selector
update_selector(data_callback=None)
Updates the selector based on the provided data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_callback |
function
|
A callback function to retrieve the data. If not provided, the selector is cleared. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
Always returns True. |
Source code in src/fft_analysator/gui/views/sidebar.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
update_toggle_group
update_toggle_group()
Updates the toggle group based on its current value.
If 'Stretch' is in the toggle group's value, the stretch attribute of the toggle group is set to True. Otherwise, it is set to False. If 'Grid' is in the toggle group's value, the grid attribute of the toggle group is set to True. Otherwise, it is set to False.
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/sidebar.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
|
Main View
main_view
MainView
MainView()
A class used to represent the main view of the application.
This class is responsible for updating the signal and analysis plots based on the provided data.
Attributes:
Name | Type | Description |
---|---|---|
tabs |
object
|
An instance of the Tabs class. |
layout |
object
|
A panel Column layout containing the tabs component. |
Methods:
Name | Description |
---|---|
update_signal |
Updates the signal plots based on the provided data. |
update_analysis_plot |
Updates the analysis plots based on the provided data. |
The tabs attribute is initialized as a Tabs instance. The layout attribute is initialized as a panel Column layout containing the tabs component.
Source code in src/fft_analysator/gui/views/main_view.py
29 30 31 32 33 34 35 36 37 |
|
servable
servable()
Makes the main view servable.
Source code in src/fft_analysator/gui/views/main_view.py
138 139 140 141 142 |
|
update_analysis_plot
update_analysis_plot(data_callback, signal_process_callback, channels, stretch_value, color_picker_value, analysis_callback, window, overlap, show_grid, x_log, y_log, db)
Updates the analysis plots based on the provided data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_callback |
function
|
A callback function that returns the data to be plotted. |
required |
channels |
list
|
A list of channels to be plotted. |
required |
stretch_value |
int
|
The stretch value for the plot. |
required |
color_picker_value |
str
|
The color for the plot. |
required |
analysis_callback |
function
|
A callback function that returns the analysis data to be plotted. |
required |
window |
str
|
The window type for the plot. |
required |
overlap |
float
|
The overlap value for the plot. |
required |
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/main_view.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
update_signal
update_signal(data_callback, signal_process_callback, channels, stretch_value, color_picker_value, window, overlap, show_grid, x_log, y_log, db)
Updates the signal plots based on the provided data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_callback |
function
|
A callback function that returns the data to be plotted. |
required |
channels |
list
|
A list of channels to be plotted. |
required |
stretch_value |
int
|
The stretch value for the plot. |
required |
color_picker_value |
str
|
The color for the plot. |
required |
window |
str
|
The window type for the plot. |
required |
overlap |
float
|
The overlap value for the plot. |
required |
Returns:
Type | Description |
---|---|
None |
Source code in src/fft_analysator/gui/views/main_view.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|