Skip to content
Snippets Groups Projects
Commit ff465035 authored by Aaron Viets's avatar Aaron Viets
Browse files

calibration latency plot update

parent 5269a0cd
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,6 @@ if t_start % common_dt: ...@@ -78,7 +78,6 @@ if t_start % common_dt:
if t_end % common_dt: if t_end % common_dt:
t_end = t_end - t_end % common_dt t_end = t_end - t_end % common_dt
t_end = t_end - 1800
# Make a time vector # Make a time vector
dur = t_end - t_start dur = t_end - t_start
gps_time = numpy.arange(0, dur + common_dt / 2, common_dt) gps_time = numpy.arange(0, dur + common_dt / 2, common_dt)
...@@ -108,13 +107,13 @@ for i in range(0, len(intimes)): ...@@ -108,13 +107,13 @@ for i in range(0, len(intimes)):
latency[i].append(outtimes[i][outtimes_start_index + j * out_step][1] - intimes[i][intimes_start_index + j * in_step][1]) latency[i].append(outtimes[i][outtimes_start_index + j * out_step][1] - intimes[i][intimes_start_index + j * in_step][1])
# Make the plot # Make the plot
colors = ['indigo', 'darkmagenta', 'orchid', 'cyan', 'g', 'm', 'y', 'r'] colors = ['blue', 'limegreen', 'orchid', 'cyan', 'g', 'm', 'y', 'r']
markersize = 150.0 / numpy.sqrt(len(intimes[0])) markersize = 150.0 / numpy.sqrt(len(intimes[0]))
markersize = min(markersize, 8.0) markersize = min(markersize, 8.0)
markersize = max(markersize, 1.0) markersize = max(markersize, 1.0)
plt.figure(figsize = (10, 6)) plt.figure(figsize = (10, 6))
if len(labels[0]): if len(labels[0]):
plt.plot(gps_time, latency[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %s}$' % labels[0].replace(':', '{:}').replace('-', '\mbox{-}').replace('_', '\_').replace(' ', '\ ')) plt.plot(gps_time, latency[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %s \ }[\mu = %0.2f \, {\rm s}, \sigma = %0.2f \, {\rm s}]$' % (labels[0].replace(':', '{:}').replace('-', '\mbox{-}').replace('_', '\_').replace(' ', '\ '), numpy.mean(latency[0]), numpy.std(latency[0])))
leg = plt.legend(fancybox = True, loc = 'upper right', markerscale = 8.0 / markersize, numpoints = 3) leg = plt.legend(fancybox = True, loc = 'upper right', markerscale = 8.0 / markersize, numpoints = 3)
leg.get_frame().set_alpha(0.8) leg.get_frame().set_alpha(0.8)
else: else:
...@@ -123,12 +122,12 @@ if len(options.plot_title): ...@@ -123,12 +122,12 @@ if len(options.plot_title):
plt.title(options.plot_title) plt.title(options.plot_title)
plt.ylabel(r'${\rm Latency \ [s]}$') plt.ylabel(r'${\rm Latency \ [s]}$')
plt.xlabel(r'${\rm Time \ in \ %s \ since \ %s \ UTC}$' % (t_unit, time.strftime("%b %d %Y %H:%M:%S".replace(':', '{:}').replace('-', '\mbox{-}').replace(' ', '\ '), time.gmtime(t_start + 315964782)))) plt.xlabel(r'${\rm Time \ in \ %s \ since \ %s \ UTC}$' % (t_unit, time.strftime("%b %d %Y %H:%M:%S".replace(':', '{:}').replace('-', '\mbox{-}').replace(' ', '\ '), time.gmtime(t_start + 315964782))))
plt.ylim(0, 18) plt.ylim(0, 5)
plt.grid(True, which = "both", linestyle = ':', linewidth = 0.3, color = 'black') plt.grid(True, which = "both", linestyle = ':', linewidth = 0.3, color = 'black')
for i in range(1, len(intimes)): for i in range(1, len(intimes)):
if len(labels) > 1: if len(labels) > 1:
plt.plot(gps_time, latency[i], colors[i % len(colors)], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %s}$' % labels[i].replace(':', '{:}').replace('-', '\mbox{-}').replace('_', '\_').replace(' ', '\ ')) plt.plot(gps_time, latency[i], colors[i % len(colors)], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %s \ }[\mu = %0.2f \, {\rm s}, \sigma = %0.2f \, {\rm s}]$' % (labels[i].replace(':', '{:}').replace('-', '\mbox{-}').replace('_', '\_').replace(' ', '\ '), numpy.mean(latency[i]), numpy.std(latency[i])))
leg = plt.legend(fancybox = True, loc = 'upper right', markerscale = 8.0 / markersize, numpoints = 3) leg = plt.legend(fancybox = True, loc = 'upper right', markerscale = 8.0 / markersize, numpoints = 3)
leg.get_frame().set_alpha(0.8) leg.get_frame().set_alpha(0.8)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment