def plot_sim_10(): simulated_signal, frequencies = complexSignal(4.6, 5.2, 128, 153, data_points=1000) run_BMWFLC(plot=True, frequencies=frequencies, tremor_data=simulated_signal, mu=0, kappa=0.01, g=200, h=0.0001, f_min=3, f_max=20, dF=0.1, dT=0.01, Tp=2, alpha=0.67, beta=50, l=0.2, peaks_to_track=2, plot_update_rate=6000, save_to_file=False, rec_nr=0, sim_nr=10, y_min=4, y_max=6, show=True, error_ymax=1.25, error_ymax_zoom=0.006)
def plot_rec_1(): simulated_signal, frequencies = complexSignal(4.6, 5.2, 128, 153, data_points=1000) run_BMWFLC(plot=True, frequencies=frequencies, tremor_data=readFromFileChFig1()[0], mu=0, kappa=0.01, g=200, h=0.0001, f_min=3, f_max=20, dF=0.1, dT=0.01, Tp=2, alpha=0.67, beta=50, l=0.2, peaks_to_track=2, error_ymax=1.25, error_ymax_zoom=0.11, plot_update_rate=1000, save_to_file=False, sim_nr=99, rec_nr=1, y_min=3, y_max=7, show=True)
def plot_sim_1_example(): simulated_signal, frequencies = complexSignal(4, 5, 4, 2, data_points=1000, noisy=False) run_BMWFLC(plot=True, frequencies=frequencies, tremor_data=simulated_signal, mu=0, kappa=0.01, g=200, h=0.0001, f_min=3, f_max=7, dF=0.1, dT=0.01, Tp=2, alpha=0.67, beta=50, l=0.2, peaks_to_track=2, plot_update_rate=6000, save_to_file=False, rec_nr=0, sim_nr=1, y_min=4, y_max=6, show=True)
else: plt.draw() plt.pause(0.00001) print(f"Time elapsed: {time_elapsed:.2f} Seconds") print() if plot: plt.clf() plt.plot(signalTime, tremor_data) plt.plot(signalTime, estimated_signal) # plt.plot(signalTime, noiseSignal) plt.show() plt.clf() plt.ylim([f_min, f_max]) x, y = zip(*estimated_frequency) plt.plot(signalTime, x, ".") plt.plot(signalTime, y, ".") plt.plot(signalTime, dominant_frequencies, "--") plt.show() while True: # Magnitude spectrum signal, frequencies = complexSignal(f1=4.2, f2=5, a1=4, a2=3, noisy=False) run_BMWFLC(f_min=3, f_max=7, plot=True, beta=100, tremor_data=signal, frequencies=frequencies, use_stem=True) sys.exit()