Skip to content
Snippets Groups Projects
Commit fbf1283e authored by Lan Dam's avatar Lan Dam
Browse files

move GPS Clock Power to the middle of GPS Lk/Unlk, show sample number of the 2 channel separately

parent 9e2e7ece
No related branches found
No related tags found
1 merge request!126Fix gps lk unlk plotting - coloring, positioning label
......@@ -457,7 +457,7 @@ class LogInfo():
elif "EXTERNAL CLOCK IS UNLOCKED" in line:
epoch = self.simple_read(line)[1]
if epoch:
self.add_chan_info('GPS Lk/Unlk', epoch, 0, idx)
self.add_chan_info('GPS Lk/Unlk', epoch, -1, idx)
elif "EXTERNAL CLOCK IS LOCKED" in line:
epoch = self.simple_read(line)[1]
if epoch:
......
# class with all plotting functions
import numpy as np
from sohstationviewer.controller.util import get_val
from sohstationviewer.controller.plotting_data import get_masspos_value_colors
......@@ -250,9 +252,14 @@ class Plotting:
self.parent.plotting_bot, plot_h)
x_list, y_list = c_data['times'], c_data['data']
total_x = sum([len(x) for x in x_list])
if chan_id == 'GPS Lk/Unlk':
sample_no_list = []
sample_no_list.append(np.where(y_list[0] == -1)[0].size)
sample_no_list.append(np.where(y_list[0] == 1)[0].size)
else:
sample_no_list = [sum([len(x) for x in x_list])]
self.plotting_axes.set_axes_info(
ax, [total_x], chan_db_info=chan_db_info,
ax, sample_no_list, chan_db_info=chan_db_info,
info=info, y_list=y_list, linked_ax=linked_ax)
colors = {}
if chan_db_info['valueColors'] not in [None, 'None', '']:
......
......@@ -236,7 +236,7 @@ class PlottingAxes:
# bottom
ax.text(
1.005, 0.25,
1.005, 0.05,
sample_no_list[0],
horizontalalignment='left',
verticalalignment='center',
......@@ -247,7 +247,7 @@ class PlottingAxes:
)
# top
ax.text(
1.005, 0.75,
1.005, 0.95,
sample_no_list[1],
horizontalalignment='left',
verticalalignment='center',
......@@ -257,6 +257,11 @@ class PlottingAxes:
size=self.parent.font_size
)
if linked_ax is not None:
ax.set_yticks([])
return
if y_list is None:
# draw center line
ax.plot([self.parent.min_x, self.parent.max_x],
......
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