Skip to content
Snippets Groups Projects

Draft: WIP Positive/negative standard deviation refinement

Open Camilla Compton requested to merge camilla.compton/locklost:pos_neg_std into master
1 file
+ 14
6
Compare changes
  • Side-by-side
  • Inline
+ 14
6
@@ -65,14 +65,20 @@ def plot_indicators(event, channel, refined_gps, threshold):
linestyle='--',
linewidth=2,
)
if y_ind[0] < threshold:
xyoffset = (8, 10)
valign = 'bottom'
else:
xyoffset = (8, -10)
valign = 'top'
ax1.annotate(
"threshold",
xy=(ax1.get_xlim()[-1], threshold),
xy=(ax1.get_xlim()[0], threshold),
xycoords='data',
xytext=(-8, -10),
xytext=xyoffset,
textcoords='offset points',
horizontalalignment='right',
verticalalignment='top',
horizontalalignment='left',
verticalalignment=valign,
bbox=dict(
boxstyle="round", fc="w", ec="green", alpha=0.95),
)
@@ -193,8 +199,10 @@ def find_transition(channel, segment, std_threshold, minimum=None):
else:
logging.info("no threshold crossings, unable to resolve time")
# add a threshold for graphs if no crossing found
threshold = lower_threshold if threshold is None else threshold
# add a threshold to be diplayed on graphs if refinement failed
if threshold is None:
threshold = lower_threshold
return threshold, refined_gps
Loading