Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
bcca1d2
fix DD version to 3.42.0
SBlokhuizen Nov 25, 2025
85d3a54
restore zenodo cache even if pytest would fail
SBlokhuizen Nov 25, 2025
e34f984
Merge pull request #36 from iterorganization/bugfix/fix-coordinate-error
SBlokhuizen Nov 26, 2025
0f6e21c
Merge remote-tracking branch 'origin/develop' into ci/always-cache-ze…
SBlokhuizen Nov 26, 2025
76519c5
Merge pull request #37 from iterorganization/ci/always-cache-zenodo
SBlokhuizen Nov 26, 2025
6b81347
implement coils reader for pf_active
SBlokhuizen Jan 12, 2026
294b6bc
add support for obliques and thick lines
SBlokhuizen Jan 12, 2026
de821af
disable mdsplus/hdf5 integration tests
SBlokhuizen Jan 13, 2026
647e8bb
refactor and add docstrings
SBlokhuizen Jan 12, 2026
7c10bd6
add argument to skip HDF5 and MDSplus integration tests, and skip the…
SBlokhuizen Jan 13, 2026
61bba76
rename reader
SBlokhuizen Jan 13, 2026
6105da3
add tests for the different geometries
SBlokhuizen Jan 13, 2026
883fef0
add docs page for pf reader
SBlokhuizen Jan 14, 2026
5d9f06e
minor refactor
SBlokhuizen Jan 14, 2026
7b92591
linting
SBlokhuizen Jan 14, 2026
6da5ab9
add support for outline and arc_of_circles geometries
SBlokhuizen Jan 14, 2026
bd50c6a
Merge pull request #40 from iterorganization/ci/disable-mdsplus-tests
SBlokhuizen Jan 14, 2026
c951456
Merge remote-tracking branch 'origin/develop' into feature/pf-reader
SBlokhuizen Jan 14, 2026
75e0d33
wip: non axisymmetric reader
SBlokhuizen Jan 14, 2026
bf0c50d
implement feedback
SBlokhuizen Jan 14, 2026
6af9123
vectorize arcs_of_circle geometry conversion
SBlokhuizen Jan 14, 2026
1983e47
remove f-strings from logging
SBlokhuizen Jan 14, 2026
2059e1e
add linting rule G004
SBlokhuizen Jan 14, 2026
79a8ac2
add arc_of_circles geometry
SBlokhuizen Jan 15, 2026
8b07982
add support for circle geometry
SBlokhuizen Jan 15, 2026
ddb5b4c
fix naming issue
SBlokhuizen Jan 15, 2026
0400267
add annulus cross-section
SBlokhuizen Jan 15, 2026
a2548a0
update numpy logic
SBlokhuizen Jan 16, 2026
a13ed5d
add tests
SBlokhuizen Jan 16, 2026
79585b5
add docs
SBlokhuizen Jan 16, 2026
4722e7d
apply G004 rule
SBlokhuizen Jan 16, 2026
32835f0
apply feedback
SBlokhuizen Jan 20, 2026
a2c30dc
handle invalid circular elements
SBlokhuizen Jan 20, 2026
e7c739c
check if all points are co-planar
SBlokhuizen Jan 20, 2026
b0690d8
update logging
SBlokhuizen Jan 20, 2026
f42e86b
update ruff linting rules
SBlokhuizen Jan 20, 2026
af0dad8
add additional ruff rules
SBlokhuizen Jan 23, 2026
49b451b
update generator expression to list comprehesion
SBlokhuizen Jan 23, 2026
cd98244
minor cleanup
SBlokhuizen Jan 23, 2026
b2bc6c0
disable ERA lint rule
SBlokhuizen Jan 23, 2026
a9b6aae
Merge pull request #43 from iterorganization/logging/g004-fstring-fix
SBlokhuizen Jan 23, 2026
8e5e5a6
Merge remote-tracking branch 'origin/develop' into feature/pf-reader
SBlokhuizen Jan 23, 2026
50a8461
linting
SBlokhuizen Jan 23, 2026
4464995
refactor and logging update
SBlokhuizen Jan 23, 2026
5c0e203
update circular element validity checking
SBlokhuizen Jan 26, 2026
bdfdb57
add identifier number if AoS does not contain a label
SBlokhuizen Jan 28, 2026
ad21f11
also add identifier if name/identifier is not filled
SBlokhuizen Jan 28, 2026
8f15eff
simplify time-dependent aos check
SBlokhuizen Jan 29, 2026
7d7ca7a
Merge pull request #44 from iterorganization/bugfix/aos-naming-issue
SBlokhuizen Jan 30, 2026
9b68950
Merge remote-tracking branch 'origin/develop' into feature/coils-non-…
SBlokhuizen Feb 3, 2026
3a97502
ruff
SBlokhuizen Feb 3, 2026
c20ba1b
Merge pull request #42 from iterorganization/feature/coils-non-axisym…
SBlokhuizen Feb 3, 2026
b939103
rename reader to Geometry Reader (Axisymmetric)
SBlokhuizen Jan 29, 2026
a620530
add support for ferritic, ic_antennas, and iron_core IDSs
SBlokhuizen Jan 29, 2026
6fae40d
add faces to output
SBlokhuizen Feb 3, 2026
3a62abd
fix counter issue
SBlokhuizen Feb 3, 2026
b871888
add tests
SBlokhuizen Feb 3, 2026
76c3854
update documentation
SBlokhuizen Feb 3, 2026
de6c57f
add tests for points_to_vtkpoly
SBlokhuizen Feb 3, 2026
86a67d7
Merge pull request #41 from iterorganization/feature/pf-reader
SBlokhuizen Feb 3, 2026
c62f2f4
Add time dependent 0d reader
SBlokhuizen Jan 21, 2026
7b29ab7
add docs
SBlokhuizen Jan 23, 2026
f823379
fix issue with nested time-dependent AoSs
SBlokhuizen Jan 27, 2026
c6c210c
add tests for ids_util
SBlokhuizen Jan 27, 2026
8685ec4
ruff
SBlokhuizen Jan 27, 2026
77f8eb8
update docs
SBlokhuizen Feb 3, 2026
bfa11f3
fix issue with 1D time dependent arrays appearing
SBlokhuizen Feb 3, 2026
a40490c
rename to time trace reader
SBlokhuizen Feb 4, 2026
e0fd269
fix tests
SBlokhuizen Feb 4, 2026
9e021b0
add option to export full time trace with a time marker
SBlokhuizen Feb 4, 2026
eeeef5f
update docs
SBlokhuizen Feb 4, 2026
1658a8e
rephrase docs
SBlokhuizen Feb 4, 2026
70d3a6e
update test
SBlokhuizen Feb 4, 2026
f9eca49
add docstrings
SBlokhuizen Feb 4, 2026
9141037
slight refactor
SBlokhuizen Feb 4, 2026
f463eeb
clean-up scalar time trace reader
SBlokhuizen Feb 5, 2026
c45451f
update numbering time trace reader docpage
SBlokhuizen Feb 6, 2026
4c603c7
Merge pull request #45 from iterorganization/feature/time-dep-0d-reader
SBlokhuizen Feb 6, 2026
5e5a5cb
update logging severity levels
SBlokhuizen Feb 10, 2026
e97a0e0
Update imas_paraview/plugins/base_class.py
SBlokhuizen Feb 10, 2026
9cf53e1
Merge pull request #46 from iterorganization/logging/warnings-to-errors
SBlokhuizen Feb 10, 2026
12642ee
Implement script for converting GGD to VTK
SBlokhuizen Feb 6, 2026
aafe10b
ruff
SBlokhuizen Feb 11, 2026
5aff355
add documentation and cleanup
SBlokhuizen Feb 12, 2026
383d336
add docstrings
SBlokhuizen Feb 16, 2026
282808f
fix issue with imas-python v2.0.0
SBlokhuizen Feb 16, 2026
c8d668f
fix dd version issue
SBlokhuizen Feb 16, 2026
9ee8ddb
feedback yannick
SBlokhuizen Feb 17, 2026
2f84697
minor changes
SBlokhuizen Feb 17, 2026
8a760b6
use tuple unpacking
SBlokhuizen Feb 18, 2026
4930be3
handle coordinates properly in read_geom
SBlokhuizen Feb 18, 2026
b84fd65
allow cylindrical conversion
SBlokhuizen Feb 19, 2026
d7c8f32
make dummy ggd grid asymmetric
SBlokhuizen Feb 19, 2026
608a88a
fix loading invalid coordinate GGD coordinates
SBlokhuizen Feb 19, 2026
9721d6a
allowing loading .vtu files directly
SBlokhuizen Feb 19, 2026
4877077
update docs
SBlokhuizen Feb 19, 2026
214cdb1
update check for invalid coordinate indentifiers
SBlokhuizen Feb 20, 2026
6bdb8e0
Merge pull request #47 from iterorganization/feature/vtk2ggd
SBlokhuizen Feb 20, 2026
d04bd9c
fix issue with empty ggd grid
SBlokhuizen Feb 18, 2026
70e6177
handle edge cases of getting ggd grids more gracefully
SBlokhuizen Feb 24, 2026
e92e40a
fix log
SBlokhuizen Feb 24, 2026
0f8e602
minor change in getting GGD grid
SBlokhuizen Feb 25, 2026
f7b6a93
ruff
SBlokhuizen Feb 25, 2026
4504b9c
Merge pull request #48 from iterorganization/bugfix/empty-grid
SBlokhuizen Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Cache Zenodo datasets
id: cache-datasets
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: data
key: ${{ steps.datasets.outputs.key }}
Expand All @@ -70,7 +70,15 @@ jobs:
echo "Downloading $(basename $url) ..."
wget -P data/ "$url"
done


- name: Always save Zenodo datasets (even if pytest would fail)
id: cache-datasets-save
if: always() && steps.cache-datasets.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-datasets.outputs.cache-primary-key }}
path: data

- name: Cache paraview
id: cache-paraview
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -111,7 +119,7 @@ jobs:
- name: Run tests
run: |
export PATH="$PWD/paraview/bin:$PATH"
pvpython --venv venv -m pytest --cov=imas_paraview --cov-report=term-missing --cov-report=html
pvpython --venv venv -m pytest --skip-mdsplus --skip-hdf5 --cov=imas_paraview --cov-report=term-missing --cov-report=html

- name: Upload coverage report
uses: actions/upload-artifact@v4
Expand Down
52 changes: 52 additions & 0 deletions docs/source/axisymmetric_geometry_reader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.. _`using the Geometry Reader (Axisymmetric)`:

Geometry Reader (Axisymmetric)
==============================

This page explains how to use the Geometry Reader (Axisymmetric) to visualize the axisymmetric active poloidal
field coils, as well as axisymmetric passive conductor structures.

Supported IDSs
--------------

The following IDS and structures are supported in the Geometry Reader (Axisymmetric):

.. list-table::
:widths: auto
:header-rows: 1

* - IDS
- Structure
* - ``pf_active``
- `coil geometries <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/pf_active.html#pf_active-coil-element-geometry>`__
* - ``pf_passive``
- `loop geometries <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/pf_passive.html#pf_passive-loop-element-geometry>`__
* - ``ferritic``
- `axisymmetric geometries <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/ferritic.html#ferritic-object-axisymmetric>`__
* - ``ic_antennas``
- `strap geometries <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/ic_antennas.html#ic_antennas-antenna-module-strap-geometry>`__
* - ``iron_core``
- `segment geometries <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/iron_core.html#iron_core-segment-geometry>`__

Using the Geometry Reader (Axisymmetric)
----------------------------------------

The Geometry Reader (Axisymmetric) functions similarly to the GGD Reader,
with the same interface and data loading workflow.
This means that the steps for loading an URI, an IDS, and selecting attributes are identical.
Refer to the :ref:`using the GGD Reader` for detailed instructions on:

- :ref:`Loading an URI <loading-an-uri>`: How to provide the file path or select a dataset.
- :ref:`Loading an IDS <loading-an-ids>`: How to load a dataset and display the grid.
- :ref:`Selecting attribute arrays <selecting-ggd-arrays>`: How to choose and visualize attributes.

Setting the Geometry Resolution
-------------------------------

The Geometry Reader (Axisymmetric) allows you to change the resolution parameter that
controls how many points are used to render the ``arcs_of_circle`` and ``annulus`` geometries.


.. figure:: images/annulus_resolution.png

``annulus`` geometry element with a resolution of 5 (left) and a resolution of 50 (right)
58 changes: 58 additions & 0 deletions docs/source/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,61 @@ To convert all time steps that fall between 2.2s and 6.6s:
.. note:: If the specified time step is not found in the IDS, the time step before the
specified time step will be used instead.


Convert VTK to GGD grids using the CLI
--------------------------------------

IMAS-ParaView supports converting VTK files to GGD grids in an IDS using the ``vtk2ggd`` command-line tool.

.. tip:: Detailed usage of the CLI tool can be found by running ``vtk2ggd --help``

Usage
^^^^^

The ``vtk2ggd`` command requires two arguments: the path to VTK files and the output URI where the IDS will be stored.

**Single file conversion:**

.. code-block:: bash

vtk2ggd example.vtpc imas:hdf5?path=output_db --ids_name edge_profiles

This converts a single ``.vtpc`` file to an IDS, at the given URI.

**File series conversion:**

.. code-block:: bash

vtk2ggd output_dir/ imas:hdf5?path=output_db

This converts all ``.vtpc`` files in the specified directory to a single IDS with multiple time steps. The files
should be named following the pattern ``{ids_name}_0.vtpc``, ``{ids_name}_1.vtpc``, etc. The IDS name will be
automatically inferred from the file names.


VTK File Format Requirements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The ``vtk2ggd`` converter has specific requirements for the VTK input files it can process:

* The converter can convert the following VTK files in the XML format:

- A single ``.vtu`` file containing a vtkUnstructuredGrid.
- A single ``.vtpc`` file containing a vtkPartitionedDataSetCollection with a single time step
- A directory containing a file series of ``.vtpc`` files (e.g., ``edge_profiles_0.vtpc``,
``edge_profiles_1.vtpc``, etc.), one for each time step.

* When providing ``.vtpc`` files, each ``vtkPartitionedDataSet`` should contain **exactly one partition** containing a ``vtkUnstructuredGrid``, otherwise the
partition is skipped. Each ``vtkUnstructuredGrid`` will be converted into a separate grid subset in the GGD.

Limitations of VTK grid conversion
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The converter can only output IDSs with:

* a `linear <https://imas-data-dictionary.readthedocs.io/en/latest/generated/identifier/ggd_identifier.html>`_ GGD grid.
* a single `space of a GGD grid <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/edge_profiles.html#edge_profiles-grid_ggd-space>`_.
* `standard space geometries <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/edge_profiles.html#edge_profiles-grid_ggd-space-geometry_type>`_, not Fourier spaces.
* X, Y, Z coordinates (`coordinate_identifier.x/y/z <https://imas-data-dictionary.readthedocs.io/en/latest/generated/identifier/coordinate_identifier.html>`_), or R, Phi, Z coordinates (when the ``--cylindrical_coordinates`` flag is enabled).
* the GGD grid structure itself, not any physical quantities (temperature, density, etc.) defined on the grids in the `ggd <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/edge_profiles.html#edge_profiles-ggd>`_ AoS.
* a homogeneous time mode.
57 changes: 57 additions & 0 deletions docs/source/coils_non_axi_reader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.. _`using the Non-Axisymmetric Coils Reader`:

Non-Axisymmetric Coils Reader
=============================

This page explains how to use the Non-Axisymmetric Coils Reader to visualize the
Non-axisymmetric active coil systems.

Supported IDSs
--------------

The following IDS and structures are supported in the Non-Axisymmetric Coils Reader:

.. list-table::
:widths: auto
:header-rows: 1

* - IDS
- Structure
* - ``coils_non_axisymmetric``
- `conductor <https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/coils_non_axisymmetric.html#coils_non_axisymmetric-coil-conductor>`__

Using the Non-Axisymmetric Coils Reader
---------------------------------------

The Non-Axisymmetric Coils Reader functions similarly to the GGD Reader, with the same interface and data loading workflow.
This means that the steps for loading an URI, an IDS, and selecting attributes are identical.
Refer to the :ref:`using the GGD Reader` for detailed instructions on:

- :ref:`Loading an URI <loading-an-uri>`: How to provide the file path or select a dataset.
- :ref:`Loading an IDS <loading-an-ids>`: How to load a dataset and display the grid.
- :ref:`Selecting attribute arrays <selecting-ggd-arrays>`: How to choose and visualize attributes.

Setting the Geometry Resolution
-------------------------------

The Non-Axisymmetric Coils Reader allows you to change two resolution parameters that
control how coil geometry is discretized for visualization.

Resolution
^^^^^^^^^^

Defines the number of interpolation points used to represent curved conductor elements (arc_of_circle and full circle).
Increasing this value produces smoother coil elements at the cost of higher geometric complexity.


.. figure:: images/coils_non_axi_res.png

Arc of circle element (top) and a full circle element (bottom) with a resolution of 5 (left) and 50 (right)

Cross-sectional Resolution
^^^^^^^^^^^^^^^^^^^^^^^^^^

Defines the number of interpolation points used to approximate the conductor cross-section when a
circular cross-sectional geometry is present. Increasing this value produces a smoother,
more circular cross-section.

Binary file added docs/source/images/annulus_resolution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/coils_non_axi_res.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions docs/source/scalar_time_trace.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. _`using the Scalar Time Trace Reader`:

Scalar Time Trace Reader
========================

This page explains how to use the Scalar Time Trace Reader to visualize time-dependent scalar
data in IDSs.


Supported IDSs
--------------

All IDSs are supported in the Scalar Time Trace Reader. Upon loading an IDS,
the reader will automatically scan the IDS for quantities which are:

- Time-dependent
- Either floating point or integer
- Either a 0D quantity inside a time dependent Array of Structure, or a 1D quantity with time as its coordinate.

Using the Scalar Time Trace Reader
----------------------------------

The Scalar Time Trace Reader functions similarly to the GGD Reader,
with the same interface and data loading workflow.
This means that the steps for loading an URI, an IDS, and selecting attributes are identical.
Refer to the :ref:`using the GGD Reader` for detailed instructions on:

- :ref:`Loading an URI <loading-an-uri>`: How to provide the file path or select a dataset.
- :ref:`Loading an IDS <loading-an-ids>`: How to load a dataset and display the grid.
- :ref:`Selecting attribute arrays <selecting-ggd-arrays>`: How to choose and visualize attributes.


Visualizing a time trace
------------------------

The Scalar Time Trace Reader outputs vtkTable data, containing the time traces of the
selected quantities. These quantities can be visualized in a 1D line chart plot, with
time on the horizontal axis.
After loading the the selected quantities using the steps above, you can visualize the data using
the 'Line Chart View' in ParaView.
See `Paraview's documentation <https://docs.paraview.org/en/latest/UsersGuide/displayingData.html#line-chart-view>`_
to learn more about how to use this view.

Within the 'Line Chart View' options, disable the ``Use Index For X Axis`` option,
and in the drop-down menu, select ``Time [s]`` to display time on the horizontal axis in the line chart.

.. tip:: The Line Chart View can be opened side-by-side with other ParaView views.
This means that this reader allows you to visualize how scalar quantities (e.g., the plasma current)
evolve over time, while simultaneously displaying time-dependent 3D geometries loaded from other readers.

This reader supports two ways of visualizing data:

#. Partial Time Trace Up to Selected Time (Default)

When the ``Show Full Time Trace`` option is disabled in the plugin properties,
the reader outputs only the time trace up to the currently selected time.
This allows you to inspect the evolution of the selected quantities.

.. figure:: images/full_time_trace_disabled.png

Plasma current over time with ``Show Full Time Trace`` disabled (default), where
the selected time step is 70s.

#. Full Time Trace with Highlighted Current Time

When the ``Show Full Time Trace`` option is enabled, the reader outputs the complete
time trace for the selected quantities. In addition, a ``Time Marker`` column is outputted,
which marks the currently selected time step. This allows you to see the entire
time series from start to finish.

.. figure:: images/full_time_trace_enabled.png

Plasma current over time with ``Show Full Time Trace`` enabled, where
the selected time step is 70s.
5 changes: 4 additions & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ non-GGD Readers
---------------

.. toctree::
:maxdepth: 2
:maxdepth: 1

1d_profiles_reader
profiles_2d_reader
beam_reader
axisymmetric_geometry_reader
los_reader
coils_non_axi_reader
position_reader
scalar_time_trace
wall_limiter_reader

Filters
Expand Down
6 changes: 4 additions & 2 deletions imas_paraview/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
required_imas_python_version = "2.0.0"
if version.parse(imas_version) < version.parse(required_imas_python_version):
logger.warning(
f"IMAS-Python version {imas_version} is lower than the recommended version "
f"{required_imas_python_version}. Some features might not work as expected."
"IMAS-Python version %s is lower than the recommended version %s. "
"Some features might not work as expected.",
imas_version,
required_imas_python_version,
)
Loading
Loading