Skip to content

Commit 0634710

Browse files
maarten-icolivhoenen
authored andcommitted
Add documentation
1 parent 55bd0c6 commit 0634710

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/source/multi-dd.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ explicit conversion mechanisms.
146146
Changed definition of open/closed contours, Yes, No
147147
Changed definition of ``space/coordinates_type`` in GGD grids, Yes, No
148148
Migrate obsolescent ``ids_properties/source`` to ``ids_properties/provenance``, Yes, No
149+
Convert the multiple time-bases in the ``pulse_schedule`` IDS [#ps3to4]_, Yes, No
149150

150151
.. [#rename] Quantities which have been renamed between the two DD versions. For
151152
example, the ``ec/beam`` Array of Structures in the ``pulse_schedule`` IDS,
@@ -175,6 +176,15 @@ explicit conversion mechanisms.
175176
.. [#ignore_type_change] These type changes are not supported. Quantities in the
176177
destination IDS will remain empty.
177178
179+
.. [#ps3to4] In Data Dictionary 3.39.0 and older, all dynamic quantities in the
180+
``pulse_schedule`` IDS had their own time array. In DD 4.0.0 this was
181+
restructured to one time array per component (for example `ec/time
182+
<https://imas-data-dictionary.readthedocs.io/en/latest/generated/ids/pulse_schedule.html#pulse_schedule-ec-time>`__).
183+
This migration constructs a common time base per subroup, and interpolates
184+
the dynamic quantities within the group to the new time base. Resampling
185+
uses `previous neighbour` interpolation for integer quantities, and linear
186+
interpolation otherwise. See also:
187+
https://github.com/iterorganization/IMAS-Python/issues/21.
178188
179189
.. _`DD background`:
180190

imas/ids_convert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,7 @@ def _pulse_schedule_3to4_logfilter(logrecord: logging.LogRecord) -> bool:
10041004

10051005

10061006
def _pulse_schedule_resample_callback(timebase, item: IDSBase, target_item: IDSBase):
1007+
"""Callback from _copy_structure to resample dynamic data on the new timebase"""
10071008
if item.metadata.ndim == 1 and item.metadata.coordinates[0].is_time_coordinate:
10081009
# Interpolate 1D dynamic quantities to the common time base
10091010
time = item.coordinates[0]

0 commit comments

Comments
 (0)