@@ -39,13 +39,12 @@ def plot_z_fitpar(fig: plt.figure, fit_par: str, img_id: int, channel: int,
39
39
40
40
fit_parameters = calc .read_hdf (channel )
41
41
fit_parameters = calc .include_column_if_nonexistent (fit_parameters , fit_par , channel )
42
- print (fit_parameters )
43
42
fit_parameters = fit_parameters .loc [img_id , :]
44
43
45
44
ax = fig .gca (xlabel = fit_par , ylabel = 'height/m' )
46
45
for line in led_arrays :
47
- plot , = ax .plot (fit_parameters [fit_parameters ['line' ] == line ][fit_par ],
48
- fit_parameters [fit_parameters ['line' ] == line ]['height' ])
46
+ plot , = ax .plot (np . array ( fit_parameters [fit_parameters ['line' ] == line ][fit_par ]) ,
47
+ np . array ( fit_parameters [fit_parameters ['line' ] == line ]['height' ]) )
49
48
plot .set_label (f'LED_Array{ line } , C{ channel } ' )
50
49
ax .legend ()
51
50
plt .title (f'Plot of fit parameter { fit_par } against the height.\n '
@@ -65,7 +64,7 @@ def plot_z_fitpar_from_average(fig, fit_par, img_id, channel, led_arrays, window
65
64
66
65
ax = fig .gca (xlabel = fit_par , ylabel = 'height/m' )
67
66
for line in led_arrays :
68
- plot , = ax .plot (mean [mean ['line' ] == line ][fit_par ], mean [mean ['line' ] == line ]['height' ])
67
+ plot , = ax .plot (np . array ( mean [mean ['line' ] == line ][fit_par ]), np . array ( mean [mean ['line' ] == line ]['height' ]) )
69
68
plot .set_label (f'LED_Array{ line } , C{ channel } ' )
70
69
ax .legend ()
71
70
plt .title (f'Plot of averaged fit parameter { fit_par } over time against the height.\n '
@@ -77,7 +76,7 @@ def plot_t_fitpar(fig, led_id, fit_par, channel, image_id_start, image_id_finish
77
76
plot_info = _calc_t_fitpar_plot_info (led_id , fit_par , channel , image_id_start , image_id_finish )
78
77
79
78
ax = fig .gca (xlabel = 'time[s]' , ylabel = fit_par )
80
- plot , = ax .plot (plot_info ['experiment_time' ], plot_info [fit_par ])
79
+ plot , = ax .plot (np . array ( plot_info ['experiment_time' ]), np . array ( plot_info [fit_par ]) )
81
80
plot .set_label (f'LED{ led_id } , C{ channel } ' )
82
81
ax .legend ()
83
82
plt .title (f'Time plot of Fit Parameter { fit_par } ' )
@@ -92,7 +91,7 @@ def plot_t_fitpar_with_moving_average(fig, led_id, fit_par, channel, image_id_st
92
91
ax = fig .gca (xlabel = 'time[s]' , ylabel = fit_par )
93
92
plot , = ax .plot (plot_info ['experiment_time' ], plot_info [fit_par ], alpha = 0.2 )
94
93
plot .set_label (f'LED{ led_id } , C{ channel } ' )
95
- plot , = ax .plot (plot_info ['experiment_time' ], average , c = plot .get_color ())
94
+ plot , = ax .plot (np . array ( plot_info ['experiment_time' ]) , average , c = plot .get_color ())
96
95
plot .set_label (f'average' )
97
96
ax .legend ()
98
97
plt .title (f'Time plot of Fit Parameter { fit_par } ' )
0 commit comments