Skip to content
Snippets Groups Projects
Commit ca22624e authored by tomrink's avatar tomrink
Browse files

minor

parent 7dccba2d
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,17 @@ def bin_data_by(a, b, bin_ranges):
return binned_data
def bin_data_by_edges(a, b, edges):
nbins = len(edges) - 1
binned_data = []
for i in range(nbins):
idxs = (b >= edges[i]) & (b < edges[i+1])
binned_data.append(a[idxs])
return binned_data
def get_bin_ranges(lop, hip, bin_size=100):
bin_ranges = []
delp = hip - lop
......
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