3.10.1.27. opengate.utility¶
3.10.1.27.1. Attributes¶
3.10.1.27.2. Classes¶
Lazy loading allows you to delay the loading of a module until it's actually needed. |
3.10.1.27.3. Functions¶
|
|
|
|
|
Get different variants of a material name, e.g. with/without prepended G4_, only first letter capital. |
|
|
|
|
|
|
|
|
|
Prefix the text with indent spaces |
|
|
|
Consider a list of Classname. For each, it builds a key/value, with: |
|
|
|
|
|
|
|
|
|
|
|
Debug print current Function name |
|
Debug print variable name and its value |
|
|
|
|
Print information about OpenGate and the environment |
|
|
|
Parameters |
3.10.1.27.4. Module Contents¶
- class opengate.utility.LazyModuleLoader(module_name)[source]¶
Lazy loading allows you to delay the loading of a module until it’s actually needed. This can be useful if a module is expensive to load or if it may not be used in every execution of the program. We use it for some modules that was found to delay the startup time, in particular: - radioactivedecay and pandas in phidsources - torch and gaga in gansources (only required for some features)
- opengate.utility.get_material_name_variants(material_name)[source]¶
Get different variants of a material name, e.g. with/without prepended G4_, only first letter capital. Intended to bridge inconsistencies in naming conventions.
- opengate.utility.indent(amount, text, ch=' ')[source]¶
Prefix the text with indent spaces https://stackoverflow.com/questions/8234274/how-to-indent-the-contents-of-a-multi-line-string
- opengate.utility.make_builders(class_names)[source]¶
Consider a list of Classname. For each, it builds a key/value, with: - the type of the class as key - and a lambda function that create an object of this class as value
- opengate.utility.print_opengate_info()[source]¶
Print information about OpenGate and the environment
- opengate.utility.standard_error_c4_correction(n)[source]¶
3.10.1.27. Parameters¶
- ninteger
Number of subsets (of the samples).
3.10.1.27. Returns¶
- c4double
Factor to convert the biased standard error of the mean of subsets of the sample into an unbiased - assuming a normal distribution . Usage: standard_error(unbiased) = standard_deviation_of_mean(=biased) / c4 The reason is that the standard deviation of the mean of subsets of the sample X underestimates the true standard error. For n = 2 this underestimation is about 25%.
Values for c4: n=2: 0.7979; n= 9: 0.9693