pencil
The __init__ file is used not only to import the sub-modules, but also to set everything up properly.
Submodules
Attributes
Functions
|
Decide if a path is pointing at a pencil code simulation directory. |
|
Return simulation object from 'path, if already existing, or creates new |
|
Returns all found simulations as object list from all subdirs, not |
Check if optional dependencies are fullfilled for pencil. |
Package Contents
- pencil.pc_print
- pencil.lazy_loader_imported = False
- pencil.lazy_loader_imported = True
- pencil.is_sim_dir(path='.')
Decide if a path is pointing at a pencil code simulation directory.
The heuristics used is to check for the existence of start.in, run.in, src/ cparam.local and src/Makefile.local .
- pencil.submodules = ['io', 'diag', 'visu', 'calc', 'math', 'sim', 'read', 'tool_kit', 'export', 'backpack',...
- pencil.get_sim(path='.', quiet=True)
Return simulation object from ‘path, if already existing, or creates new simulation object from path, if its as simulation.
- Parameters:
path – Base directory where to look for simulation from.
quiet – Switches out the output of the function. Default: False.
- pencil.get_sims(path_root='.', depth=1, unhide_all=False, quiet=True)
Returns all found simulations as object list from all subdirs, not following symbolic links.
- Parameters:
path_root – Base directory where to look for simulation from.
depth – Depth of searching for simulations, default is 1, i.e. only one level deeper directories will be scanned.
unhide_all – Unhides all simulation found if True, if False (default) hidden sim will stay hidden.
quiet – Switches out the output of the function. Default: True.
- pencil.check_dependencies()
Check if optional dependencies are fullfilled for pencil.