diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-04-13 15:34:05 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-04-13 15:34:05 -0500 |
commit | beec156aec67518c121ec2710a92018c738cfd0f (patch) | |
tree | a5a1c32679983595a9745c5a87462279f21de10c /utils/plot-energy | |
parent | 6c919121c1182ac32da087f0fd3c33c9746445e7 (diff) | |
download | sddm-beec156aec67518c121ec2710a92018c738cfd0f.tar.gz sddm-beec156aec67518c121ec2710a92018c738cfd0f.tar.bz2 sddm-beec156aec67518c121ec2710a92018c738cfd0f.zip |
update plot-energy to fix a bug with muons and michels since we now store more than one fit per particle combo
Diffstat (limited to 'utils/plot-energy')
-rwxr-xr-x | utils/plot-energy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/plot-energy b/utils/plot-energy index 4ec77f8..a057302 100755 --- a/utils/plot-energy +++ b/utils/plot-energy @@ -1047,7 +1047,7 @@ if __name__ == '__main__': atm = atm.sort_values('fmin').groupby(['run','gtid']).nth(0) michel_best_fit = michel.sort_values('fmin').groupby(['run','gtid']).nth(0) muon_best_fit = muons.sort_values('fmin').groupby(['run','gtid']).nth(0) - muons = muons[muons.id == 22] + muons = muons[muons.id == 22].sort_values('fmin').groupby(['run','gtid'],as_index=False).nth(0).reset_index(level=0,drop=True) # require r < 6 meters prompt = prompt[prompt.r_psup < 0.9] @@ -1111,7 +1111,7 @@ if __name__ == '__main__': # For the Michel energy plot, we only look at the single particle electron # fit - michel = michel[michel.id == 20] + michel = michel[michel.id == 20].sort_values('fmin').groupby(['run','gtid'],as_index=False).nth(0).reset_index(level=0,drop=True) stopping_muons = pd.merge(muons,michel,left_on=['run','gtid'],right_on=['run','muon_gtid'],suffixes=('','_michel')) |