API Reference¶
RunContext¶
- class idefix2python.RunContext(runName, projectPath='.', **kwargs)[source]¶
The first thing to initiate.
Handles data location and directory creation. Detects simulation geometry, dimensions, and available fields.
- Parameters:
runName (str) – The unique name of the run.
projectPath (str | Path, optional) – The root directory of the project. Defaults to the current directory (“.”).
**kwargs –
Additional optional parameters:
configPath (str | Path): Path to a specific configuration file.
dataFolder (str): Folder path containing the data.
partFolder (str): Folder path containing the particles data.
frameFolder (str): Folder name where the rendered frames will be stored.
active_directions (list): List of active coordinate directions.
- show_ini (bool): show_ini mode will show the .ini file content at the top of the frame.
Defaults to False.
iniPath (Path): Custom path to the .ini input file. The .ini content is accessible as a dict through context.inidata. Defaults to projectPath/inputs/{runName}.ini.
pdf_mode (bool): pdf mode for clean plots. No movie will be produced, with light mode and no time indicator on timelines. If -f is not specified, last frame will be showed.
Note
The expected location for the .vtk files is projectPath/outputs/runName/vtks. By default, the rendered frame will be located in projectPath/frames/runName.
Pipeline¶
Quantity Types¶
- class idefix2python.MapMovie2D(key, symbol='', plot_coords=None, norm='linear', streamlines=None, uids=None, **kwargs)[source]¶
Bases:
Data2D spatial field \(f(x, z, t)\) rendered as a heatmap (pcolormesh) animation.
- class idefix2python.LineMovie1D(key, symbol='', plot_coords=None, bounds=None, uids=None, **kwargs)[source]¶
Bases:
Field1DFor \(f(x, t)\) fields, renders as a line plot \(f(x, t)\) that updates every frame.
- class idefix2python.SpaceTimeHeatmap(key, symbol='', plot_coords=None, bounds=None, norm='linear', uids=None, **kwargs)[source]¶
Bases:
Field1DFor \(f(x, t)\) fields, renders a space-time heatmap.
- Keyword Arguments:
cmap – Colormap for the heatmap.
uids – List of particles’ uids which trajectories will be displayed.
- class idefix2python.PartQuantity(key, symbol='', plot_coords=None, bounds=None, xqty=None, uids='all', **kwargs)[source]¶
Bases:
DataParticular case of OneComponentOneVariable when the variable is time and that there is one value per particle (so not really one component but rather Npart components…) Tracks Lagrangian particle properties over time.
- Keyword:
uids (optional) the ids of the particles wanted. Defaults to “all” (all particles)