plopm.utils.initialization module#
Build and normalize configuration for plopm workflows.
The module converts parsed CLI arguments into PlopmConfig, discovers
simulation cases, normalizes per-variable plotting settings, selects summary or
spatial processing, and defines unit conversions used by the readers.
- build_config(cmdargs)[source]#
Build a plopm configuration from parsed CLI arguments.
The function expands case and difference-input paths, parses list-like options, normalizes slice and restart selections, and initializes plotting defaults shared by summary, map, and VTK workflows.
- Parameters:
- cmdargsargparse.Namespace
Command-line arguments returned by the plopm parser.
- Returns:
- PlopmConfig
Parsed and partially normalized runtime configuration.
- Parameters:
cmdargs (Namespace)
- Return type:
- init_maps(cfg)[source]#
Normalize settings used by spatial maps.
The function selects default units, colorbar formats, and colormaps; expands per-variable limits and formats; and initializes spatial coordinate scales.
- Parameters:
- cfgPlopmConfig
Configuration updated in place for map generation.
- Parameters:
cfg (PlopmConfig)
- Return type:
None
- is_summary(cfg)[source]#
Determine whether the request uses one-dimensional output.
The decision considers explicit series options, special tabulated properties, summary-vector availability, and requests to list variables.
- Parameters:
- cfgPlopmConfig
Initialized configuration and primary case path.
- Returns:
- bool
Truewhen the request should use the summary plotting workflow.
- Parameters:
cfg (PlopmConfig)
- Return type:
- init_summary(cfg)[source]#
Normalize settings used by one-dimensional plots.
- Parameters:
- cfgPlopmConfig
Configuration updated in place with per-variable styles and labels.
- Parameters:
cfg (PlopmConfig)
- Return type:
None