diff --git a/scripts/complete_run.py b/scripts/complete_run.py index 7b56857..f554947 100644 --- a/scripts/complete_run.py +++ b/scripts/complete_run.py @@ -177,12 +177,24 @@ def build_file_dbs(input_files, output_dir): "evt": ut.tier_evt_path(setup).replace(os.getenv("PRODENV"), ""), }, "file_format": { - "raw": pat.get_pattern_tier(setup, "raw").replace(ut.tier_raw_path(setup), ""), - "dsp": pat.get_pattern_tier(setup, "dsp").replace(ut.tier_dsp_path(setup), ""), - "hit": pat.get_pattern_tier(setup, "hit").replace(ut.tier_hit_path(setup), ""), - "pht": pat.get_pattern_tier(setup, "pht").replace(ut.tier_hit_path(setup), ""), - "evt": pat.get_pattern_tier(setup, "evt").replace(ut.tier_evt_path(setup), ""), - "tcm": pat.get_pattern_tier(setup, "tcm").replace(ut.tier_tcm_path(setup), ""), + "raw": pat.get_pattern_tier(setup, "raw", check_in_cycle=False).replace( + ut.tier_raw_path(setup), "" + ), + "dsp": pat.get_pattern_tier(setup, "dsp", check_in_cycle=False).replace( + ut.tier_dsp_path(setup), "" + ), + "hit": pat.get_pattern_tier(setup, "hit", check_in_cycle=False).replace( + ut.tier_hit_path(setup), "" + ), + "pht": pat.get_pattern_tier(setup, "pht", check_in_cycle=False).replace( + ut.tier_hit_path(setup), "" + ), + "evt": pat.get_pattern_tier(setup, "evt", check_in_cycle=False).replace( + ut.tier_evt_path(setup), "" + ), + "tcm": pat.get_pattern_tier(setup, "tcm", check_in_cycle=False).replace( + ut.tier_tcm_path(setup), "" + ), }, "table_format": { "raw": "ch{ch:07d}/raw", @@ -205,12 +217,24 @@ def build_file_dbs(input_files, output_dir): "evt": ut.tier_evt_path(setup), }, "file_format": { - "raw": pat.get_pattern_tier(setup, "raw").replace(ut.tier_raw_path(setup), ""), - "dsp": pat.get_pattern_tier(setup, "dsp").replace(ut.tier_dsp_path(setup), ""), - "hit": pat.get_pattern_tier(setup, "hit").replace(ut.tier_hit_path(setup), ""), - "pht": pat.get_pattern_tier(setup, "pht").replace(ut.tier_hit_path(setup), ""), - "evt": pat.get_pattern_tier(setup, "evt").replace(ut.tier_evt_path(setup), ""), - "tcm": pat.get_pattern_tier(setup, "tcm").replace(ut.tier_tcm_path(setup), ""), + "raw": pat.get_pattern_tier(setup, "raw", check_in_cycle=False).replace( + ut.tier_raw_path(setup), "" + ), + "dsp": pat.get_pattern_tier(setup, "dsp", check_in_cycle=False).replace( + ut.tier_dsp_path(setup), "" + ), + "hit": pat.get_pattern_tier(setup, "hit", check_in_cycle=False).replace( + ut.tier_hit_path(setup), "" + ), + "pht": pat.get_pattern_tier(setup, "pht", check_in_cycle=False).replace( + ut.tier_hit_path(setup), "" + ), + "evt": pat.get_pattern_tier(setup, "evt", check_in_cycle=False).replace( + ut.tier_evt_path(setup), "" + ), + "tcm": pat.get_pattern_tier(setup, "tcm", check_in_cycle=False).replace( + ut.tier_tcm_path(setup), "" + ), }, "table_format": { "raw": "ch{ch:07d}/raw", diff --git a/scripts/pars_hit_ecal.py b/scripts/pars_hit_ecal.py index 97aa63c..18bc47b 100644 --- a/scripts/pars_hit_ecal.py +++ b/scripts/pars_hit_ecal.py @@ -164,7 +164,7 @@ def energy_cal_th( tail_weight=tail_weight, ) full_object_dict[cal_energy_param].calibrate_parameter(data) - results_dict[cal_energy_param] = full_object_dict[energy_param].get_results_dict(data) + results_dict[cal_energy_param] = full_object_dict[cal_energy_param].get_results_dict(data) hit_dict.update(full_object_dict[cal_energy_param].hit_dict) if ~np.isnan(full_object_dict[cal_energy_param].pars).all(): plot_dict[cal_energy_param] = ( diff --git a/scripts/pars_hit_lq.py b/scripts/pars_hit_lq.py index a02bba1..33c740a 100644 --- a/scripts/pars_hit_lq.py +++ b/scripts/pars_hit_lq.py @@ -11,7 +11,7 @@ import pandas as pd from legendmeta import LegendMetadata from legendmeta.catalog import Props -from pygama.math.fitting import gauss_cdf +from pygama.math.peak_fitting import gauss_cdf from pygama.pargen.lq_cal import * # noqa: F403 from pygama.pargen.lq_cal import cal_lq from pygama.pargen.utils import get_tcm_pulser_ids, load_data diff --git a/scripts/pars_pht_lqcal.py b/scripts/pars_pht_lqcal.py index 37c1a6b..0614ff8 100644 --- a/scripts/pars_pht_lqcal.py +++ b/scripts/pars_pht_lqcal.py @@ -11,7 +11,7 @@ import pandas as pd from legendmeta import LegendMetadata from legendmeta.catalog import Props -from pygama.math.fitting import gauss_cdf +from pygama.math.peak_fitting import gauss_cdf from pygama.pargen.lq_cal import * # noqa: F403 from pygama.pargen.lq_cal import cal_lq from pygama.pargen.utils import get_tcm_pulser_ids, load_data diff --git a/scripts/pars_pht_partcal.py b/scripts/pars_pht_partcal.py index 701d984..3c7c6e1 100644 --- a/scripts/pars_pht_partcal.py +++ b/scripts/pars_pht_partcal.py @@ -230,7 +230,7 @@ def run_splitter(files): hit_dicts, ecal_results, plot_dict, ecal_obj = partition_energy_cal_th( data, cal_dict, - election_string=f"{kwarg_dict.pop('final_cut_field')}&(~is_pulser)", + selection_string=f"{kwarg_dict.pop('final_cut_field')}&(~is_pulser)", **kwarg_dict, )