:py:mod:`pyloggrid.LogGrid.DataExplorer` ======================================== .. py:module:: pyloggrid.LogGrid.DataExplorer .. autoapi-nested-parse:: Data processing and visualisation Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pyloggrid.LogGrid.DataExplorer.DataExplorer .. py:class:: DataExplorer(data_path: str) Data processing and visualisation :param data_path: simulation's folder .. py:method:: getgrid(N_pts: int, k_min: float, fields: dict[str, numpy.ndarray] = None, k0: bool = False) -> pyloggrid.LogGrid.Grid.Grid Creates a grid populated with a step's fields. :param N_pts: grid size :param k_min: grid's min k :param fields: grid's fields :param k0: whether grid has k=0 :returns: the populated grid .. py:method:: display(draw_funcs: dict[str, DrawFuncDict], N_points: Optional[int] = None, loadfromsave: bool = False, N_min: int = 1, N_max: Optional[int] = None, n_jobs: int = 1) -> None Compute and display all the requested drawables. :param draw_funcs: functions to draw, as a dict ``{name -> {"get"->fun, "plot"->fun(drawables, ts), "perframe"->bool}}``. If ``perframe``, the getter is per step and has signature ``fun(grid, t, simu_params)``. Otherwise, it is called once with signature ``fun(dataExplorer)`` If ``perframe`` is omitted, default to ``True`` :param N_points: max number of points to evaluate. If ``None``, equal to the max available points :param N_min: The first step evaluated :param N_max: The last step evaluated :param loadfromsave: data is not calculated but directly loaded from already computed drawables in ``drawables.npy``. ``N_min, N_max, N_points`` are not taken into account. :param n_jobs: the number of parrallel threads to use. Use ``-1`` for unlimited (not recommended) .. py:method:: load_step(step: int = None, ts: numpy.ndarray = None, t: float = None, grid: bool = True) -> dict | tuple[dict, pyloggrid.LogGrid.Grid.Grid] Load a saved step, either by step number, or by simulation time. If time is provided, it overrides the step. :param step: step to load :param ts: array of simulation times :param t: time of the step to use. Must be provided with ``ts``. Overrides ``step``. :param grid: if ``True``, create a grid from loaded data and return it :returns: step data ``{fields, t, N_points, k_min, elapsed_time}`` if not ``grid``, else a tuple ``step_data, grid``