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.

    • 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.

    • debug (bool): debug mode will show the .ini file.

      Defaults to False.

    • iniPath (Path): Custom path to the .ini input file. Defaults to projectPath/inputs/{runName}.ini.

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

class idefix2python.Pipeline(Context, spaceTimeHeatmaps=[], movies1D=[], movies2D=[], partQuantities=[], zoom=0, streamLines=None)[source]
run()[source]

Pray.

Quantity Types

class idefix2python.MapMovie2D(key, symbol, plot_coords=[0, 0], cmap='berlin', norm='linear', streamlines=None, **kwargs)[source]

Bases: Data

2D spatial field \(f(x, z, t)\) rendered as a heatmap (pcolormesh) animation.

class idefix2python.LineMovie1D(*args, **kwargs)[source]

Bases: Field1D

For \(f(x, t)\) fields, renders as a line plot \(f(x, t)\) that updates every frame.

class idefix2python.SpaceTimeHeatmap(key, symbol, plot_coords=[0, 0], vmin=None, vmax=None, cmap='berlin', norm='linear', trace_over=[], **kwargs)[source]

Bases: Field1D

For \(f(x, t)\) fields, renders a space-time heatmap.

Keyword Arguments:
  • cmap – Colormap for the heatmap.

  • trace_over – List of PartQuantity objects to overlay as trajectories.

class idefix2python.PartQuantity(*args, **kwargs)[source]

Bases: Data

Tracks Lagrangian particle properties over time.