Skip to content

Commit

Permalink
Ensure average_hit_number is sorted from low to high
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Oct 18, 2023
1 parent 3584a00 commit deb3d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libgunshotmatch/consolidate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def match_counter(
)

# Sort consolidated hit list
hits_data = sorted(hits_data, key=lambda k: (len(k), k.match_factor, k.average_hit_number), reverse=True)
hits_data = sorted(hits_data, key=lambda k: (len(k), k.match_factor, -k.average_hit_number), reverse=True)
# consolidated_peak = ConsolidatedPeak(rt_data, area_data, ms_data, peak_number=n, hits=hits_data, ms_comparison=ms_comp_data.loc[n])
consolidated_peak = ConsolidatedPeak(
rt_data,
Expand Down

0 comments on commit deb3d69

Please sign in to comment.