Fix for get_matching_df for latest Pandas version
in stages/track_building/utils.py, get_matching_df as written does not work for latest Pandas version (2.2.2). This can be fixed by replacing the definitions of candidate_lengths, and particle_lengths with:
candidate_lengths = (
reconstruction_df.track_id.value_counts(sort=False)
.reset_index()
.rename(columns={"count": "n_reco_hits"})
)
particle_lengths = (
reconstruction_df.drop_duplicates(subset=["hit_id"])
.particle_id.value_counts(sort=False)
.reset_index()
.rename(columns={"count": "n_true_hits"})
)
Edited by Levi Condren