raredecay.globals_ module¶
Created on Thu Apr 14 14:34:21 2016
@author: Jonas Eschle “Mayou36”
This module contains all (package-)global variables and methods.
Instances¶
- out : object of class
An instance which is initiated once for the whole package and handles all the output and metastructure of the code:
- initialization:
- create and set run-dependant variables
- create folders to save the collected output
- create loggers
- collection of output:
- collect figures and save them later on
- concatenate every string output and format it
- finalization:
- add general information to the output
- save all the figures and outputs
- collect run information like errors occured
It is important to use the same instance (of course) for the same run. Everything else would be very special case.
Note
To ensure that you import the instance and to not make a copy, always import with an alias
- initialization:
OutputHandler
Variables:¶
- randint : int
- Many methods need random integers for their pseudo-random generator. To keep them all the same (or intentionally not), use the randint.
-
raredecay.globals_.
free_cpus
()[source]¶ Return the number of available cores. Currently not sophisticated, but can be extended if wanted
-
raredecay.globals_.
free_cpus
()[source] Return the number of free cpus, 1 if no or one are free