allan_variance_ros icon indicating copy to clipboard operation
allan_variance_ros copied to clipboard

analysis.py code question, unused variable

Open PabloRauhCorro opened this issue 1 year ago • 0 comments

In analysis.py, from lines 97-107, you calculate white_noise_break_point and use it as an index to limit the interval where the white noise fit is calculated on. You also calculate random_rate_breakpoint (shouldn't this be at a period of 10^3 = 300 instead of 10^1=10?), but it remains an unused variable, you do not use it for the random rate fit. Is that intended, and if so, why?

Code:

white_noise_break_point = np.where(period == 10)[0][0] random_rate_break_point = np.where(period == 10)[0][0]

accel_wn_intercept_x, xfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,0], -0.5, 1.0) accel_wn_intercept_y, yfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,1], -0.5, 1.0) accel_wn_intercept_z, zfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,2], -0.5, 1.0)

accel_rr_intercept_x, xfit_rr = get_intercept(period, acceleration[:,0], 0.5, 3.0) accel_rr_intercept_y, yfit_rr = get_intercept(period, acceleration[:,1], 0.5, 3.0) accel_rr_intercept_z, zfit_rr = get_intercept(period, acceleration[:,2], 0.5, 3.0)

PabloRauhCorro avatar Dec 10 '23 20:12 PabloRauhCorro