echidna package¶
Subpackages¶
- echidna.calc package
- echidna.core package
- echidna.errors package
- echidna.fit package
- echidna.limit package
- echidna.output package
- echidna.scripts package
- Subpackages
- Submodules
- echidna.scripts.combine_hdf5 module
- echidna.scripts.dump_scaled module
- echidna.scripts.dump_shifted module
- echidna.scripts.dump_smeared module
- echidna.scripts.dump_spectra_ntuple module
- echidna.scripts.dump_spectra_root module
- echidna.scripts.klz_majoron_limits module
- echidna.scripts.multi_ntuple_spectrum module
- echidna.scripts.plot_summary module
- echidna.scripts.rebin module
- echidna.scripts.zero_nu_limit module
- Module contents
- echidna.test package
- echidna.util package
Submodules¶
echidna.utilities module¶
Utilities module to include functions that may be useful throughout echidna.
-
class
echidna.utilities.
DispatchingFormatter
(formatters, default_formatter)[source]¶ Dispatch formatter for logger and it’s sub logger.
- Adapted from: https://stackoverflow.com/questions/1741972/
- how-to-use-different-formatters-with-the-same-logging-handler-in-python.
Parameters: - formatters (dict) – Dictionary of named formatters
- default_formatter (
logging.Formatter
) – Default formatter to use when no named formatter matches.
-
class
echidna.utilities.
Timer
[source]¶ Useful timer class to show time elapsed performing a code block.
Examples
>>> With Timer() as t: ... # block of code to time >>> print ('Code executed in %.03f sec.' % t._interval)
-
echidna.utilities.
get_array_errors
(array, lin_err=0.01, frac_err=None, log=False, log10=False)[source]¶
-
echidna.utilities.
start_logging
(short_name=False, script_name=True)[source]¶ Function to initialise logging output.
Adapted from: https://docs.python.org/2/howto/logging-cookbook.html# logging-to-multiple-destinations
Parameters: - short_name (bool, optional) – If true the log name is always ‘echidna.log’
- script_name (string, optional) – Name of script to add to log filename
Returns: logging.Logger
: Logger to use in script.