Skip to content
Snippets Groups Projects
Commit 5d1f843e authored by Jameson Rollins's avatar Jameson Rollins
Browse files

Merge branch 'refine_fix' into 'master'

Improve zoomed refine plots

See merge request jameson.rollins/locklost!99
parents 332bac10 a384b90a
No related branches found
No related tags found
No related merge requests found
...@@ -44,12 +44,7 @@ def plot_indicators(event, params, refined_gps=None, threshold=None): ...@@ -44,12 +44,7 @@ def plot_indicators(event, params, refined_gps=None, threshold=None):
# plot indicator # plot indicator
color = 'blue' color = 'blue'
label = params['CHANNEL'] label = params['CHANNEL']
# filter data based on window ax1.plot(t_ind-t0, y_ind, label=label,
condition = np.logical_and(t0+window[0] <= t_ind, t_ind <= t0+window[1])
idx = np.argwhere(condition)
y = y_ind[idx]
t = t_ind[idx]
ax1.plot(t-t0, y, label=label,
color=color, alpha=0.8, linewidth=2) color=color, alpha=0.8, linewidth=2)
ax1.grid(True) ax1.grid(True)
ax1.set_ylabel(params['CHANNEL']) ax1.set_ylabel(params['CHANNEL'])
...@@ -108,16 +103,12 @@ def plot_indicators(event, params, refined_gps=None, threshold=None): ...@@ -108,16 +103,12 @@ def plot_indicators(event, params, refined_gps=None, threshold=None):
verticalalignment='bottom', verticalalignment='bottom',
bbox=dict(boxstyle="round", fc="w", ec="red", alpha=0.95), bbox=dict(boxstyle="round", fc="w", ec="red", alpha=0.95),
) )
ax1.set_xlim(min(atx-1, window[0]), window[1])
# plot guardian # plot guardian
color = 'orange' color = 'orange'
label = config.GRD_STATE_N_CHANNEL label = config.GRD_STATE_N_CHANNEL
# filter data based on window ax2.plot(t_grd-t0, y_grd, label=label,
condition = np.logical_and(t0+window[0] <= t_grd, t_grd <= t0+window[1])
idx = np.argwhere(condition)
y = y_grd[idx]
t = t_grd[idx]
ax2.plot(t-t0, y, label=label,
color=color, linewidth=2) color=color, linewidth=2)
ax2.set_yticks(trans) ax2.set_yticks(trans)
ylim = ax2.get_ylim() ylim = ax2.get_ylim()
...@@ -140,6 +131,7 @@ def plot_indicators(event, params, refined_gps=None, threshold=None): ...@@ -140,6 +131,7 @@ def plot_indicators(event, params, refined_gps=None, threshold=None):
linestyle = '--', linestyle = '--',
linewidth = 2 linewidth = 2
) )
ax2.set_xlim(min(atx-1, window[0]), window[1])
fig.suptitle("Lock loss refinement for {}".format(event.id)) fig.suptitle("Lock loss refinement for {}".format(event.id))
......
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