pygama package¶
Pygama: decoding and processing digitizer data. Check out the online documentation
Subpackages¶
- pygama.evt package
- Subpackages
- Submodules
- pygama.evt.aggregators module
- pygama.evt.build_evt module
- pygama.evt.build_tcm module
- pygama.evt.tcm module
- pygama.evt.utils module
- pygama.flow package
- Submodules
- pygama.flow.data_loader module
DataLoaderDataLoader.browse()DataLoader.build_entry_list()DataLoader.build_hit_entries()DataLoader.get_file_list()DataLoader.get_tiers_for_col()DataLoader.load()DataLoader.load_cal_pars()DataLoader.load_detector()DataLoader.load_dsp_pars()DataLoader.load_evts()DataLoader.load_hits()DataLoader.load_iterator()DataLoader.load_settings()DataLoader.next()DataLoader.reset()DataLoader.set_config()DataLoader.set_cuts()DataLoader.set_datastreams()DataLoader.set_files()DataLoader.set_output()DataLoader.skim_waveforms()
iskeyword()
- pygama.flow.file_db module
- pygama.flow.utils module
- pygama.hit package
- pygama.math package
- Subpackages
- pygama.math.functions package
- Submodules
- pygama.math.functions.crystal_ball module
- pygama.math.functions.error_function module
- pygama.math.functions.exgauss module
- pygama.math.functions.exponential module
- pygama.math.functions.gauss module
- pygama.math.functions.gauss_on_exgauss module
- pygama.math.functions.gauss_on_exponential module
- pygama.math.functions.gauss_on_linear module
- pygama.math.functions.gauss_on_step module
- pygama.math.functions.gauss_on_uniform module
- pygama.math.functions.hpge_peak module
- pygama.math.functions.linear module
- pygama.math.functions.moyal module
- pygama.math.functions.poisson module
- pygama.math.functions.polynomial module
- pygama.math.functions.pygama_continuous module
- pygama.math.functions.step module
- pygama.math.functions.sum_dists module
- pygama.math.functions.triple_gauss_on_double_step module
- pygama.math.functions.uniform module
- pygama.math.functions package
- Submodules
- pygama.math.binned_fitting module
- pygama.math.distributions module
- pygama.math.histogram module
- pygama.math.hpge_peak_fitting module
- pygama.math.least_squares module
- pygama.math.unbinned_fitting module
- pygama.math.units module
- pygama.math.utils module
- Subpackages
- pygama.pargen package
- Submodules
- pygama.pargen.AoE_cal module
CalAoEPol1SigmaFitSigmoidFitaoe_peak_bounds()aoe_peak_fixed()aoe_peak_guess()average_consecutive()bimodal_dt_fit()drifttime_corr_plot()fit_time_means()get_peak_label()interpolate_consecutive()mcdrift()plot_aoe_mean_time()plot_aoe_res_time()plot_classifier()plot_compt_bands_overlayed()plot_cut_fit()plot_dt_dep()plot_mean_fit()plot_sf_vs_energy()plot_sigma_fit()plot_spectra()plot_survival_fraction_curves()unbinned_aoe_fit()
- pygama.pargen.data_cleaning module
- pygama.pargen.dplms_ge_dict module
- pygama.pargen.dsp_optimize module
BayesianOptimizerBayesianOptimizer._extend_prior_with_posterior_data()BayesianOptimizer._get_expected_improvement()BayesianOptimizer._get_lcb()BayesianOptimizer._get_next_probable_point()BayesianOptimizer._get_ucb()BayesianOptimizer.add_dimension()BayesianOptimizer.add_initial_values()BayesianOptimizer.get_best_vals()BayesianOptimizer.get_first_point()BayesianOptimizer.get_n_dimensions()BayesianOptimizer.iterate_values()BayesianOptimizer.plot()BayesianOptimizer.plot_acq()BayesianOptimizer.update()BayesianOptimizer.update_db_dict()
OptimiserDimensionOptimiserDimension._asdict()OptimiserDimension._field_defaultsOptimiserDimension._fieldsOptimiserDimension._make()OptimiserDimension._replace()OptimiserDimension.max_valOptimiserDimension.min_valOptimiserDimension.nameOptimiserDimension.parameterOptimiserDimension.roundOptimiserDimension.unit
ParGridParGridDimensionget_grid_points()run_bayesian_optimisation()run_grid()run_grid_point()run_one_dsp()
- pygama.pargen.energy_cal module
FWHMLinearFWHMQuadraticHPGeCalibrationHPGeCalibration.calibrate_prominent_peak()HPGeCalibration.fit_calibrated_peaks()HPGeCalibration.fit_energy_res_curve()HPGeCalibration.full_calibration()HPGeCalibration.gen_pars_dict()HPGeCalibration.get_energy_res_curve()HPGeCalibration.get_fwhms()HPGeCalibration.hpge_cal_energy_peak_tops()HPGeCalibration.hpge_find_energy_peaks()HPGeCalibration.hpge_fit_energy_peaks()HPGeCalibration.hpge_get_energy_peaks()HPGeCalibration.interpolate_energy_res()HPGeCalibration.plot_cal_fit()HPGeCalibration.plot_cal_fit_with_errors()HPGeCalibration.plot_eres_fit()HPGeCalibration.plot_fits()HPGeCalibration.update_results_dict()
TailPrioraverage_counts_check()get_hpge_energy_bounds()get_hpge_energy_fixed()get_hpge_energy_peak_par_guess()hpge_fit_energy_cal_func()hpge_fit_energy_peak_tops()hpge_fit_energy_scale()poly_match()poly_wrapper()sum_bins()unbinned_staged_energy_fit()
- pygama.pargen.energy_optimisation module
- pygama.pargen.lq_cal module
- pygama.pargen.noise_optimization module
- pygama.pargen.pz_correct module
- pygama.pargen.survival_fractions module
- pygama.pargen.utils module
Submodules¶
pygama.cli module¶
pygama’s command line interface utilities.
- pygama.cli.add_build_hit_parser(subparsers)¶
Configure
hit.build_hit.build_hit()command line interface
- pygama.cli.build_hit_cli(args)¶
Passes command line arguments to
hit.build_hit.build_hit().
- pygama.cli.pygama_cli()¶
pygama’s command line interface.
Defines the command line interface (CLI) of the package, which exposes some of the most used functions to the console. This function is added to the
entry_points.console_scriptslist and defines thepygamaexecutable (seesetuptools’ documentation). To learn more about the CLI, have a look at the help section:$ pygama --help $ pygama build-hit --help # help section for a specific sub-command
pygama.logging module¶
This module implements some helpers for setting up logging.
- pygama.logging.setup(level=20, logger=None)¶
Setup a colorful logging output.
If logger is None, sets up only the
pygamalogger.- Parameters:
Examples
>>> from pygama import logging >>> logging.setup(level=logging.DEBUG)
pygama.utils module¶
- class pygama.utils.NumbaPygamaDefaults¶
Bases:
MutableMappingBare-bones class to store some Numba default options. Defaults values are set from environment variables. Useful for the pygama.math distributions
Examples
Set all default option values for a numba wrapped function at once by expanding the provided dictionary:
>>> from numba import njit >>> from pygama.utils import numba_math_defaults_kwargs as nb_kwargs >>> @njit([], "", **nb_kwargs, nopython=True) # def dist(...): ...
Customize one argument but still set defaults for the others:
>>> from pygama.utils import numba_math_defaults as nb_defaults >>> @njit([], "", **nb_defaults(cache=False) # def dist(...): ...
Override global options at runtime:
>>> from pygama.utils import numba_math_defaults >>> # must set options before explicitly importing pygama.math.distributions! >>> numba_math_defaults.cache = False
- _abc_impl = <_abc._abc_data object>¶
- pygama.utils.getenv_bool(name, default=False)¶
Get environment value as a boolean, returning True for 1, t and true (caps-insensitive), and False for any other value and default if undefined.
- Return type: