Muon g-2 field "trfp" Python module for analyzing trolley/fixed probe correlations.
This module requires:
-
numpy
-
scipy
-
pandas
-
Simon Corrodi's gm2 package (for interfacing with root), found here.
Current as of 24 Sept 2019.
-
Data is read directly from the tier 1 ROOT files using S. Corrodi's gm2 package. This can either be done in real time or ahead of time, saving the data into pandas DataFrames. Import using the
root_to_pandas
function inanalysis_helper.py
. This creates an "Interpolation DataFrame." -
The Interpolation DataFrame is turned into a "Moment DataFrame" using the trolley and fixed probe change of basis matrices. This is in the
calc_moment_df
function inanalysis_helper.py
. At this point, blinds can also be applied from the fileblinds.txt
(seedata_run_analysis.ipynb
for example). -
The trolley moment dataframes are processed to remove the trolley image from the fixed probe stations. This is done using
trolley_footprint_replacement
inhelper_function_candidates.py
. -
The baseline sync values for the trolley and fixed probes are calculated using
trolley_run_station_average
inhelper_function_candidates.py
. -
The fixed probe moment dataframes are transformed into virtual trolley measurement dataframes using the sync values and the Jacobian matrices. This is in
vtm_calc
inanalysis_helper.py
. -
The resulting vtm dataframe can be averaged in any way desired. Simple time-binning and naive azimuthal averaging are demonstrated in
9day_analysis.ipynb
.