Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on previous changes in newbranch. Added some functions in a new file to integrate the detector and picker, along with additional functionality to convert results to pandas dataframe tables.
The functionality works as follows: find_runs_with_gaps works similarly to find_nonzero_runs except it allows max_gap number of zeros in between runs of nonzero probability to generate runs to pick over. If there is neither a nonzero p or s probability for more than max_gap windows, it stops grouping windows. I did this to avoid having windows separated by one zero probability being picked separately, because they could potentially contain the same event in the waveform.
yield_pick_windows is a generator function which yields the runs subsets of the array corresponding to runs picked out by the find_runs_with_gaps function.
generate_picks uses this generator to create a dictionary of picktimes for p and s with their assigned confidences from the model.
detects2table and picks2table take in output from the detect and geneate_picks functions, respectively, and convert the results into an easy to read pandas DataFrame object which can be viewed or saved to a .csv file.