diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-04-13 15:54:22 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-04-13 15:54:22 -0500 |
commit | 6f61c532e51b8c91519e5e8d38779e358cf1bc76 (patch) | |
tree | 4254245b3151773ecf6f7483324e8a0409110ee0 /utils/plot-fit-results | |
parent | 33e9b624ef7eed425dd8c240dbba458791d9cdd7 (diff) | |
download | sddm-6f61c532e51b8c91519e5e8d38779e358cf1bc76.tar.gz sddm-6f61c532e51b8c91519e5e8d38779e358cf1bc76.tar.bz2 sddm-6f61c532e51b8c91519e5e8d38779e358cf1bc76.zip |
update plot-fit-results script to be able to handle files with multi-particle fits
Diffstat (limited to 'utils/plot-fit-results')
-rwxr-xr-x | utils/plot-fit-results | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/plot-fit-results b/utils/plot-fit-results index 8bdb7ed..18139ff 100755 --- a/utils/plot-fit-results +++ b/utils/plot-fit-results @@ -308,6 +308,13 @@ if __name__ == '__main__': # merge data and fits on run and gtid data = data.merge(fits,left_on=['filename','run','gtid'],right_on=['fit_filename','fit_run','fit_gtid']) + # For this script, we only want the single particle fit results + data = data[(data.fit_id2 == 0) & (data.fit_id3 == 0)] + + # Select only the best fit for a given run, gtid, and particle + # combo + data = data.sort_values('fit_fmin').groupby(['filename','run','gtid','fit_id1','fit_id2','fit_id3'],as_index=False).nth(0).reset_index(level=0,drop=True) + # calculate true kinetic energy mass = [SNOMAN_MASS[id] for id in data['mcgn_id'].values] data['T'] = data['mcgn_energy'].values - mass |