Esempio n. 1
0
def reload_all_files(force=False):
    pause_auto_update()

    for file_to_load in signals_files.values():
        if force or file_to_load.file_was_modified_on_disk():
            show_spinner("Updating files from the disk...")
            file_to_load.load()
            hide_spinner()
        refresh_info.text = "Last Update: " + str(datetime.datetime.now()).split(".")[0]

    resume_auto_update_according_to_toggle()
Esempio n. 2
0
def change_x_axis(val):
    global x_axis
    show_spinner("Updating the X axis...")
    x_axis[0] = x_axis_options[val]
    plot.xaxis.axis_label = x_axis_labels[val]

    for file_to_load in signals_files.values():
        file_to_load.update_x_axis_index()
        # this is needed in order to recalculate the mean of all the files
        if isinstance(file_to_load, SignalsFilesGroup):
            file_to_load.load()

    update_axis_range(x_axis[0], plot.x_range)
    hide_spinner()
Esempio n. 3
0
def update_axis_range(name, range_placeholder):
    max_val = -float('inf')
    min_val = float('inf')
    selected_signal = None
    if name in x_axis_options:
        selected_signal = name
    for signals_file in signals_files.values():
        curr_min_val, curr_max_val = signals_file.get_range_of_selected_signals_on_axis(name, selected_signal)
        max_val = max(max_val, curr_max_val)
        min_val = min(min_val, curr_min_val)
    if min_val != float('inf'):
        if min_val == max_val:
            range = 5
        else:
            range = max_val - min_val
        range_placeholder.start = min_val - 0.1 * range
        range_placeholder.end = max_val + 0.1 * range
Esempio n. 4
0
def get_all_selected_signals():
    signals = []
    for signals_file in signals_files.values():
        signals += signals_file.get_selected_signals()
    return signals