legenddataflowscripts.par.geds.hit package

Submodules

legenddataflowscripts.par.geds.hit.aoe module

legenddataflowscripts.par.geds.hit.aoe.get_results_dict(aoe_class)
legenddataflowscripts.par.geds.hit.aoe.par_geds_hit_aoe()
legenddataflowscripts.par.geds.hit.aoe.run_aoe_calibration(data, cal_dicts, results_dicts, object_dicts, plot_dicts, config, debug_mode=False)

legenddataflowscripts.par.geds.hit.ecal module

legenddataflowscripts.par.geds.hit.ecal.baseline_tracking_plots(files, lh5_path, plot_options=None)
legenddataflowscripts.par.geds.hit.ecal.bin_baseline(data, parameter='bl_mean-baseline', dx=1, bl_range=None)
legenddataflowscripts.par.geds.hit.ecal.bin_bl_stability(data, time_slice=180, parameter='bl_mean')
legenddataflowscripts.par.geds.hit.ecal.bin_pulser_stability(data, cal_energy_param, selection_string, pulser_field='is_pulser', time_slice=180)
legenddataflowscripts.par.geds.hit.ecal.bin_spectrum(data, cal_energy_param, selection_string, cut_field='is_valid_cal', pulser_field='is_pulser', erange=(0, 3000), dx=0.5)
legenddataflowscripts.par.geds.hit.ecal.bin_stability(data, cal_energy_param, selection_string, time_slice=180, energy_range=(2585, 2660))
legenddataflowscripts.par.geds.hit.ecal.bin_survival_fraction(data, cal_energy_param, selection_string, cut_field='is_valid_cal', pulser_field='is_pulser', erange=(0, 3000), dx=6)
legenddataflowscripts.par.geds.hit.ecal.get_err(x)
legenddataflowscripts.par.geds.hit.ecal.get_median(x)
legenddataflowscripts.par.geds.hit.ecal.get_results_dict(ecal_class, data, cal_energy_param, selection_string)
legenddataflowscripts.par.geds.hit.ecal.monitor_parameters(files, lh5_path, parameters)
legenddataflowscripts.par.geds.hit.ecal.par_geds_hit_ecal()
legenddataflowscripts.par.geds.hit.ecal.plot_2614_timemap(data, cal_energy_param, selection_string, figsize=(8, 6), fontsize=12, erange=(2580, 2630), dx=1, time_dx=180)
legenddataflowscripts.par.geds.hit.ecal.plot_baseline_timemap(data, figsize=(8, 6), fontsize=12, parameter='bl_mean', dx=1, n_spread=5, time_dx=180)
legenddataflowscripts.par.geds.hit.ecal.plot_pulser_timemap(data, cal_energy_param, selection_string, pulser_field='is_pulser', figsize=(8, 6), fontsize=12, dx=0.2, time_dx=180, n_spread=3)

legenddataflowscripts.par.geds.hit.lq module

legenddataflowscripts.par.geds.hit.lq.get_results_dict(lq_class)
legenddataflowscripts.par.geds.hit.lq.lq_calibration(data, cal_dicts, energy_param, cal_energy_param, dt_param, eres_func, cdf=<pygama.math.functions.gauss.GaussianGen object>, selection_string='', plot_options=None, debug_mode=False)

Loads in data from the provided files and runs the LQ calibration on said files

Parameters:
  • data (pd.DataFrame) – A dataframe containing the data used for calibrating LQ

  • cal_dicts (dict) – A dict of hit-level operations to apply to the data

  • energy_param (string) – The energy parameter of choice. Used for normalizing the raw lq values

  • cal_energy_param (string) – The calibrated energy parameter of choice

  • dt_param (string) – The drift-time parameter of choice

  • eres_func (callable) – The energy resolution functions

  • cdf (callable) – The CDF used for the binned fitting of LQ distributions

  • cut_field (string) – A string of flags to apply to the data when running the calibration

  • plot_options (dict) – A dict containing the plot functions the user wants to run,and any user options to provide those plot functions

Returns:

  • cal_dicts (dict) – The user provided dict, updated with hit-level operations for LQ

  • results_dict (dict) – A dict containing the results of the LQ calibration

  • plot_dict (dict) – A dict containing all the figures specified by the plot options

  • lq (cal_lq class) – The cal_lq object used for the LQ calibration

legenddataflowscripts.par.geds.hit.lq.par_geds_hit_lq()
legenddataflowscripts.par.geds.hit.lq.run_lq_calibration(data, cal_dicts, results_dicts, object_dicts, plot_dicts, configs, debug_mode=False)

legenddataflowscripts.par.geds.hit.qc module

legenddataflowscripts.par.geds.hit.qc.build_qc(config, cal_files, fft_files, table_name, overwrite=None, pulser_file=None, build_plots=False)
legenddataflowscripts.par.geds.hit.qc.par_geds_hit_qc()