Skip to content
Snippets Groups Projects
Commit 35f4b9ac authored by Camilla Compton's avatar Camilla Compton
Browse files

add thresh=lower_t if no threshold crossings found for clearer graphs

parent cfffce49
No related branches found
No related tags found
1 merge request!98Draft: WIP Positive/negative standard deviation refinement
This commit is part of merge request !98. Comments created here will be created in the context of that merge request.
...@@ -69,7 +69,7 @@ def plot_indicators(event, channel, refined_gps, threshold): ...@@ -69,7 +69,7 @@ def plot_indicators(event, channel, refined_gps, threshold):
"threshold", "threshold",
xy=(ax1.get_xlim()[0], threshold), xy=(ax1.get_xlim()[0], threshold),
xycoords='data', xycoords='data',
xytext=(8, -10), xytext=(8, -15),
textcoords='offset points', textcoords='offset points',
horizontalalignment='left', horizontalalignment='left',
verticalalignment='top', verticalalignment='top',
...@@ -154,7 +154,6 @@ def find_transition(channel, segment, std_threshold, minimum=None): ...@@ -154,7 +154,6 @@ def find_transition(channel, segment, std_threshold, minimum=None):
""" """
refined_gps = None refined_gps = None
threshold = None
buf = data.fetch(channel, segment)[0] buf = data.fetch(channel, segment)[0]
# calculate mean and std using first 5 seconds of window # calculate mean and std using first 5 seconds of window
...@@ -191,6 +190,7 @@ def find_transition(channel, segment, std_threshold, minimum=None): ...@@ -191,6 +190,7 @@ def find_transition(channel, segment, std_threshold, minimum=None):
logging.info("threshold: {}".format(threshold)) logging.info("threshold: {}".format(threshold))
logging.info("refined time: {}".format(refined_gps)) logging.info("refined time: {}".format(refined_gps))
else: else:
threshold = lower_threshold # to be shown on graphs
logging.info("no threshold crossings, unable to resolve time") logging.info("no threshold crossings, unable to resolve time")
return threshold, refined_gps return threshold, refined_gps
......
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