imas-python 1.1.2.dev42__py3-none-any.whl → 1.1.2.dev55__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of imas-python might be problematic. Click here for more details.

Files changed (128) hide show
  1. imas/_version.py +2 -2
  2. imas/assets/IDSDef.zip +0 -0
  3. imas/backends/netcdf/db_entry_nc.py +8 -0
  4. imas/backends/netcdf/ids2nc.py +14 -1
  5. imas/backends/netcdf/nc_validate.py +5 -4
  6. imas/ids_primitive.py +4 -1
  7. imas/test/test_cli.py +8 -2
  8. imas/test/test_dbentry.py +1 -1
  9. imas/test/test_helpers.py +22 -8
  10. imas/test/test_ids_toplevel.py +1 -1
  11. imas/test/test_minimal_types.py +11 -2
  12. imas/test/test_nbc_change.py +1 -1
  13. imas/test/test_nc_autofill.py +43 -2
  14. imas/test/test_static_ids.py +1 -1
  15. imas/test/test_util.py +3 -3
  16. {imas_python-1.1.2.dev42.dist-info → imas_python-1.1.2.dev55.dist-info}/METADATA +2 -2
  17. imas_python-1.1.2.dev55.dist-info/RECORD +109 -0
  18. imas/assets/IDSDef/identifiers/core_instant_changes/core_instant_changes_identifier.xml +0 -15
  19. imas/assets/IDSDef/identifiers/core_sources/core_source_identifier.xml +0 -76
  20. imas/assets/IDSDef/identifiers/core_transport/core_transport_identifier.xml +0 -25
  21. imas/assets/IDSDef/identifiers/edge_sources/edge_source_identifier.xml +0 -31
  22. imas/assets/IDSDef/identifiers/edge_transport/edge_transport_identifier.xml +0 -25
  23. imas/assets/IDSDef/identifiers/em_coupling/em_coupling_quantity_identifier.xml +0 -27
  24. imas/assets/IDSDef/identifiers/equilibrium/equilibrium_profiles_2d_identifier.xml +0 -21
  25. imas/assets/IDSDef/identifiers/magnetics/magnetics_flux_loop_type_identifier.xml +0 -14
  26. imas/assets/IDSDef/identifiers/magnetics/magnetics_probe_type_identifier.xml +0 -16
  27. imas/assets/IDSDef/identifiers/magnetics/magnetics_rogowski_measured_identifier.xml +0 -13
  28. imas/assets/IDSDef/identifiers/mhd_linear/mhd_linear_ballooning_identifier.xml +0 -13
  29. imas/assets/IDSDef/identifiers/mhd_linear/mhd_linear_equations_identifier.xml +0 -15
  30. imas/assets/IDSDef/identifiers/mhd_linear/mhd_linear_model_identifier.xml +0 -14
  31. imas/assets/IDSDef/identifiers/mhd_linear/mhd_linear_perturbation_identifier.xml +0 -24
  32. imas/assets/IDSDef/identifiers/neutron_diagnostic/neutron_event_identifier.xml +0 -18
  33. imas/assets/IDSDef/identifiers/neutron_diagnostic/neutron_mode_identifier.xml +0 -15
  34. imas/assets/IDSDef/identifiers/operational_instrumentation/operational_sensor_type_identifier.xml +0 -15
  35. imas/assets/IDSDef/identifiers/pf_active/pf_active_coil_function_identifier.xml +0 -10
  36. imas/assets/IDSDef/identifiers/plasma_sources/plasma_source_identifier.xml +0 -70
  37. imas/assets/IDSDef/identifiers/plasma_transport/plasma_transport_identifier.xml +0 -38
  38. imas/assets/IDSDef/identifiers/radiation/radiation_identifier.xml +0 -23
  39. imas/assets/IDSDef/identifiers/refractometer/refractometer_formula_identifier.xml +0 -12
  40. imas/assets/IDSDef/identifiers/runaway_electrons/e_field_critical_identifier.xml +0 -12
  41. imas/assets/IDSDef/identifiers/runaway_electrons/momentum_critical_avalanche_identifier.xml +0 -11
  42. imas/assets/IDSDef/identifiers/runaway_electrons/momentum_critical_hot_tail_identifier.xml +0 -11
  43. imas/assets/IDSDef/identifiers/spectrometer_visible/spectrometer_visible_method_identifier.xml +0 -13
  44. imas/assets/IDSDef/identifiers/spectrometer_x_ray_crystal/crystal_mesh_identifier.xml +0 -12
  45. imas/assets/IDSDef/identifiers/spectrometer_x_ray_crystal/spectro_x_instrument_function_identifier.xml +0 -14
  46. imas/assets/IDSDef/identifiers/spi/shatter_cone_identifier.xml +0 -11
  47. imas/assets/IDSDef/identifiers/utilities/coordinate_identifier.xml +0 -51
  48. imas/assets/IDSDef/identifiers/utilities/curved_object_curvature_identifier.xml +0 -16
  49. imas/assets/IDSDef/identifiers/utilities/curved_object_geometry_identifier.xml +0 -14
  50. imas/assets/IDSDef/identifiers/utilities/data_type_identifier.xml +0 -12
  51. imas/assets/IDSDef/identifiers/utilities/distribution_source_identifier.xml +0 -36
  52. imas/assets/IDSDef/identifiers/utilities/emission_grid_identifier.xml +0 -9
  53. imas/assets/IDSDef/identifiers/utilities/ggd_geometry_content_identifier.xml +0 -21
  54. imas/assets/IDSDef/identifiers/utilities/ggd_identifier.xml +0 -29
  55. imas/assets/IDSDef/identifiers/utilities/ggd_space_identifier.xml +0 -18
  56. imas/assets/IDSDef/identifiers/utilities/ggd_subset_identifier.xml +0 -70
  57. imas/assets/IDSDef/identifiers/utilities/materials_identifier.xml +0 -43
  58. imas/assets/IDSDef/identifiers/utilities/midplane_identifier.xml +0 -14
  59. imas/assets/IDSDef/identifiers/utilities/neutrals_identifier.xml +0 -20
  60. imas/assets/IDSDef/identifiers/utilities/occurrence_type_identifier.xml +0 -11
  61. imas/assets/IDSDef/identifiers/utilities/optical_element_identifier.xml +0 -13
  62. imas/assets/IDSDef/identifiers/utilities/optical_element_material_identifier.xml +0 -12
  63. imas/assets/IDSDef/identifiers/utilities/orbit_type_identifier.xml +0 -20
  64. imas/assets/IDSDef/identifiers/utilities/poloidal_plane_coordinates_identifier.xml +0 -119
  65. imas/assets/IDSDef/identifiers/utilities/species_reference_identifier.xml +0 -19
  66. imas/assets/IDSDef/identifiers/utilities/statistics_type_identifier.xml +0 -17
  67. imas/assets/IDSDef/identifiers/utilities/surface_geometry_identifier.xml +0 -16
  68. imas/assets/IDSDef/identifiers/utilities/wave_identifier.xml +0 -15
  69. imas/assets/IDSDef/identifiers/wall/wall_component_identifier.xml +0 -18
  70. imas/assets/IDSDef/identifiers/wall/wall_description_2d_type_identifier.xml +0 -13
  71. imas/assets/IDSDef_correct/identifiers/core_instant_changes/core_instant_changes_identifier.xml +0 -15
  72. imas/assets/IDSDef_correct/identifiers/core_sources/core_source_identifier.xml +0 -76
  73. imas/assets/IDSDef_correct/identifiers/core_transport/core_transport_identifier.xml +0 -25
  74. imas/assets/IDSDef_correct/identifiers/edge_sources/edge_source_identifier.xml +0 -31
  75. imas/assets/IDSDef_correct/identifiers/edge_transport/edge_transport_identifier.xml +0 -25
  76. imas/assets/IDSDef_correct/identifiers/em_coupling/em_coupling_quantity_identifier.xml +0 -27
  77. imas/assets/IDSDef_correct/identifiers/equilibrium/equilibrium_profiles_2d_identifier.xml +0 -21
  78. imas/assets/IDSDef_correct/identifiers/magnetics/magnetics_flux_loop_type_identifier.xml +0 -14
  79. imas/assets/IDSDef_correct/identifiers/magnetics/magnetics_probe_type_identifier.xml +0 -16
  80. imas/assets/IDSDef_correct/identifiers/magnetics/magnetics_rogowski_measured_identifier.xml +0 -13
  81. imas/assets/IDSDef_correct/identifiers/mhd_linear/mhd_linear_ballooning_identifier.xml +0 -13
  82. imas/assets/IDSDef_correct/identifiers/mhd_linear/mhd_linear_equations_identifier.xml +0 -15
  83. imas/assets/IDSDef_correct/identifiers/mhd_linear/mhd_linear_model_identifier.xml +0 -14
  84. imas/assets/IDSDef_correct/identifiers/mhd_linear/mhd_linear_perturbation_identifier.xml +0 -24
  85. imas/assets/IDSDef_correct/identifiers/neutron_diagnostic/neutron_event_identifier.xml +0 -18
  86. imas/assets/IDSDef_correct/identifiers/neutron_diagnostic/neutron_mode_identifier.xml +0 -15
  87. imas/assets/IDSDef_correct/identifiers/operational_instrumentation/operational_sensor_type_identifier.xml +0 -15
  88. imas/assets/IDSDef_correct/identifiers/pf_active/pf_active_coil_function_identifier.xml +0 -10
  89. imas/assets/IDSDef_correct/identifiers/plasma_sources/plasma_source_identifier.xml +0 -70
  90. imas/assets/IDSDef_correct/identifiers/plasma_transport/plasma_transport_identifier.xml +0 -38
  91. imas/assets/IDSDef_correct/identifiers/radiation/radiation_identifier.xml +0 -23
  92. imas/assets/IDSDef_correct/identifiers/refractometer/refractometer_formula_identifier.xml +0 -12
  93. imas/assets/IDSDef_correct/identifiers/runaway_electrons/e_field_critical_identifier.xml +0 -12
  94. imas/assets/IDSDef_correct/identifiers/runaway_electrons/momentum_critical_avalanche_identifier.xml +0 -11
  95. imas/assets/IDSDef_correct/identifiers/runaway_electrons/momentum_critical_hot_tail_identifier.xml +0 -11
  96. imas/assets/IDSDef_correct/identifiers/spectrometer_visible/spectrometer_visible_method_identifier.xml +0 -13
  97. imas/assets/IDSDef_correct/identifiers/spectrometer_x_ray_crystal/crystal_mesh_identifier.xml +0 -12
  98. imas/assets/IDSDef_correct/identifiers/spectrometer_x_ray_crystal/spectro_x_instrument_function_identifier.xml +0 -14
  99. imas/assets/IDSDef_correct/identifiers/spi/shatter_cone_identifier.xml +0 -11
  100. imas/assets/IDSDef_correct/identifiers/utilities/coordinate_identifier.xml +0 -51
  101. imas/assets/IDSDef_correct/identifiers/utilities/curved_object_curvature_identifier.xml +0 -16
  102. imas/assets/IDSDef_correct/identifiers/utilities/curved_object_geometry_identifier.xml +0 -14
  103. imas/assets/IDSDef_correct/identifiers/utilities/data_type_identifier.xml +0 -12
  104. imas/assets/IDSDef_correct/identifiers/utilities/distribution_source_identifier.xml +0 -36
  105. imas/assets/IDSDef_correct/identifiers/utilities/emission_grid_identifier.xml +0 -9
  106. imas/assets/IDSDef_correct/identifiers/utilities/ggd_geometry_content_identifier.xml +0 -21
  107. imas/assets/IDSDef_correct/identifiers/utilities/ggd_identifier.xml +0 -29
  108. imas/assets/IDSDef_correct/identifiers/utilities/ggd_space_identifier.xml +0 -18
  109. imas/assets/IDSDef_correct/identifiers/utilities/ggd_subset_identifier.xml +0 -70
  110. imas/assets/IDSDef_correct/identifiers/utilities/materials_identifier.xml +0 -43
  111. imas/assets/IDSDef_correct/identifiers/utilities/midplane_identifier.xml +0 -14
  112. imas/assets/IDSDef_correct/identifiers/utilities/neutrals_identifier.xml +0 -20
  113. imas/assets/IDSDef_correct/identifiers/utilities/occurrence_type_identifier.xml +0 -11
  114. imas/assets/IDSDef_correct/identifiers/utilities/optical_element_identifier.xml +0 -13
  115. imas/assets/IDSDef_correct/identifiers/utilities/optical_element_material_identifier.xml +0 -12
  116. imas/assets/IDSDef_correct/identifiers/utilities/orbit_type_identifier.xml +0 -20
  117. imas/assets/IDSDef_correct/identifiers/utilities/poloidal_plane_coordinates_identifier.xml +0 -119
  118. imas/assets/IDSDef_correct/identifiers/utilities/species_reference_identifier.xml +0 -19
  119. imas/assets/IDSDef_correct/identifiers/utilities/statistics_type_identifier.xml +0 -17
  120. imas/assets/IDSDef_correct/identifiers/utilities/surface_geometry_identifier.xml +0 -16
  121. imas/assets/IDSDef_correct/identifiers/utilities/wave_identifier.xml +0 -15
  122. imas/assets/IDSDef_correct/identifiers/wall/wall_component_identifier.xml +0 -18
  123. imas/assets/IDSDef_correct/identifiers/wall/wall_description_2d_type_identifier.xml +0 -13
  124. imas_python-1.1.2.dev42.dist-info/RECORD +0 -215
  125. {imas_python-1.1.2.dev42.dist-info → imas_python-1.1.2.dev55.dist-info}/LICENSE.txt +0 -0
  126. {imas_python-1.1.2.dev42.dist-info → imas_python-1.1.2.dev55.dist-info}/WHEEL +0 -0
  127. {imas_python-1.1.2.dev42.dist-info → imas_python-1.1.2.dev55.dist-info}/entry_points.txt +0 -0
  128. {imas_python-1.1.2.dev42.dist-info → imas_python-1.1.2.dev55.dist-info}/top_level.txt +0 -0
imas/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.1.2.dev42'
16
- __version_tuple__ = version_tuple = (1, 1, 2, 'dev42')
15
+ __version__ = version = '1.1.2.dev55'
16
+ __version_tuple__ = version_tuple = (1, 1, 2, 'dev55')
imas/assets/IDSDef.zip CHANGED
Binary file
@@ -33,12 +33,20 @@ class NCDBEntryImpl(DBEntryImpl):
33
33
  "The `netCDF4` python module is not available. Please install this "
34
34
  "module to read/write IMAS netCDF files with imas-python."
35
35
  )
36
+ # To support netcdf v1.4 (which has no mode "x") we map it to "w" with
37
+ # `clobber=True`.
38
+ if mode == "x":
39
+ mode = "w"
40
+ clobber = False
41
+ else:
42
+ clobber = True
36
43
 
37
44
  self._dataset = netCDF4.Dataset(
38
45
  fname,
39
46
  mode,
40
47
  format="NETCDF4",
41
48
  auto_complex=True,
49
+ clobber=clobber,
42
50
  )
43
51
  """NetCDF4 dataset."""
44
52
  self._factory = factory
@@ -7,8 +7,10 @@ from typing import Iterator, Tuple
7
7
 
8
8
  import netCDF4
9
9
  import numpy
10
+ from packaging import version
10
11
 
11
12
  from imas.backends.netcdf.nc_metadata import NCMetadata
13
+ from imas.exception import InvalidNetCDFEntry
12
14
  from imas.ids_base import IDSBase
13
15
  from imas.ids_data_type import IDSDataType
14
16
  from imas.ids_defs import IDS_TIME_MODE_HOMOGENEOUS
@@ -185,9 +187,20 @@ class IDS2NC:
185
187
 
186
188
  else:
187
189
  dtype = dtypes[metadata.data_type]
190
+ if (
191
+ version.parse(netCDF4.__version__) < version.parse("1.7.0")
192
+ and dtype is dtypes[IDSDataType.CPX]
193
+ ):
194
+ raise InvalidNetCDFEntry(
195
+ f"Found complex data in {var_name}, NetCDF 1.7.0 or"
196
+ f" later is required for complex data types"
197
+ )
188
198
  kwargs = {}
189
199
  if dtype is not str: # Enable compression:
190
- kwargs.update(compression="zlib", complevel=1)
200
+ if version.parse(netCDF4.__version__) > version.parse("1.4.1"):
201
+ kwargs.update(compression="zlib", complevel=1)
202
+ else:
203
+ kwargs.update(zlib=True, complevel=1)
191
204
  if dtype is not dtypes[IDSDataType.CPX]: # Set fillvalue
192
205
  kwargs.update(fill_value=default_fillvals[metadata.data_type])
193
206
  # Create variable
@@ -23,23 +23,24 @@ def validate_netcdf_file(filename: str) -> None:
23
23
  # additional variables are smuggled inside:
24
24
  groups = [dataset] + [dataset[group] for group in dataset.groups]
25
25
  for group in groups:
26
+ group_name = group.path.split("/")[-1]
26
27
  if group.variables or group.dimensions:
27
28
  raise InvalidNetCDFEntry(
28
29
  "NetCDF file should not have variables or dimensions in the "
29
- f"{group.name} group."
30
+ f"{group_name} group."
30
31
  )
31
32
  if group is dataset:
32
33
  continue
33
- if group.name not in ids_names:
34
+ if group_name not in ids_names:
34
35
  raise InvalidNetCDFEntry(
35
- f"Invalid group name {group.name}: there is no IDS with this name."
36
+ f"Invalid group name {group_name}: there is no IDS with this name."
36
37
  )
37
38
  for subgroup in group.groups:
38
39
  try:
39
40
  int(subgroup)
40
41
  except ValueError:
41
42
  raise InvalidNetCDFEntry(
42
- f"Invalid group name {group.name}/{subgroup}: "
43
+ f"Invalid group name {group_name}/{subgroup}: "
43
44
  f"{subgroup} is not a valid occurrence number."
44
45
  )
45
46
 
imas/ids_primitive.py CHANGED
@@ -481,7 +481,10 @@ class IDSNumericArray(IDSPrimitive, np.lib.mixins.NDArrayOperatorsMixin):
481
481
  value = np.asanyarray(value)
482
482
  if value.dtype != dtype:
483
483
  logger.info(_CONVERT_MSG, value.dtype, self)
484
- value = np.array(value, dtype=dtype, copy=False)
484
+ value = np.asarray(
485
+ value,
486
+ dtype=dtype,
487
+ )
485
488
  if value.ndim != self.metadata.ndim:
486
489
  raise ValueError(f"Trying to assign a {value.ndim}D value to {self!r}.")
487
490
  return value
imas/test/test_cli.py CHANGED
@@ -4,6 +4,7 @@ import pytest
4
4
  from click.testing import CliRunner
5
5
  from packaging.version import Version
6
6
 
7
+ from imas.backends.imas_core.imas_interface import has_imas
7
8
  from imas.backends.imas_core.imas_interface import ll_interface
8
9
  from imas.command.cli import print_version
9
10
  from imas.command.db_analysis import analyze_db, process_db_analysis
@@ -19,8 +20,13 @@ def test_imas_version():
19
20
 
20
21
 
21
22
  @pytest.mark.cli
22
- @pytest.mark.skipif(ll_interface._al_version < Version("5.0"), reason="Needs AL >= 5")
23
- def test_db_analysis(tmp_path):
23
+ @pytest.mark.skipif(
24
+ not has_imas or ll_interface._al_version < Version("5.0"),
25
+ reason="Needs AL >= 5 AND Requires IMAS Core.",
26
+ )
27
+ def test_db_analysis(
28
+ tmp_path,
29
+ ):
24
30
  # This only tests the happy flow, error handling is not tested
25
31
  db_path = tmp_path / "test_db_analysis"
26
32
  with DBEntry(f"imas:hdf5?path={db_path}", "w") as entry:
imas/test/test_dbentry.py CHANGED
@@ -82,7 +82,7 @@ def test_dbentry_constructor():
82
82
  assert get_entry_attrs(entry) == (1, 2, 3, 4, None, 6)
83
83
 
84
84
 
85
- def test_ignore_unknown_dd_version(monkeypatch, worker_id, tmp_path):
85
+ def test_ignore_unknown_dd_version(monkeypatch, worker_id, tmp_path, requires_imas):
86
86
  entry = open_dbentry(imas.ids_defs.MEMORY_BACKEND, "w", worker_id, tmp_path)
87
87
  ids = entry.factory.core_profiles()
88
88
  ids.ids_properties.homogeneous_time = 0
imas/test/test_helpers.py CHANGED
@@ -93,7 +93,9 @@ def fill_with_random_data(structure, max_children=3):
93
93
  child.value = random_data(child.metadata.data_type, child.metadata.ndim)
94
94
 
95
95
 
96
- def maybe_set_random_value(primitive: IDSPrimitive, leave_empty: float) -> None:
96
+ def maybe_set_random_value(
97
+ primitive: IDSPrimitive, leave_empty: float, skip_complex: bool
98
+ ) -> None:
97
99
  """Set the value of an IDS primitive with a certain chance.
98
100
 
99
101
  If the IDSPrimitive has coordinates, then the size of the coordinates is taken into
@@ -153,7 +155,7 @@ def maybe_set_random_value(primitive: IDSPrimitive, leave_empty: float) -> None:
153
155
  # Scale chance of not setting a coordinate by our number of dimensions,
154
156
  # such that overall there is roughly a 50% chance that any coordinate
155
157
  # remains empty
156
- maybe_set_random_value(coordinate_element, 0.5**ndim)
158
+ maybe_set_random_value(coordinate_element, 0.5**ndim, skip_complex)
157
159
  size = coordinate_element.shape[0 if coordinate.references else dim]
158
160
 
159
161
  if coordinate.size: # coordinateX = <path> OR 1...1
@@ -176,13 +178,18 @@ def maybe_set_random_value(primitive: IDSPrimitive, leave_empty: float) -> None:
176
178
  elif primitive.metadata.data_type is IDSDataType.FLT:
177
179
  primitive.value = np.random.random_sample(size=shape)
178
180
  elif primitive.metadata.data_type is IDSDataType.CPX:
181
+ if skip_complex:
182
+ # If we are skipping complex numbers then leave the value empty.
183
+ return
179
184
  val = np.random.random_sample(shape) + 1j * np.random.random_sample(shape)
180
185
  primitive.value = val
181
186
  else:
182
187
  raise ValueError(f"Invalid IDS data type: {primitive.metadata.data_type}")
183
188
 
184
189
 
185
- def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
190
+ def fill_consistent(
191
+ structure: IDSStructure, leave_empty: float = 0.2, skip_complex: bool = False
192
+ ):
186
193
  """Fill a structure with random data, such that coordinate sizes are consistent.
187
194
 
188
195
  Sets homogeneous_time to heterogeneous (always).
@@ -196,6 +203,9 @@ def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
196
203
  exclusive_coordinates: list of IDSPrimitives that have exclusive alternative
197
204
  coordinates. These are initially not filled, and only at the very end of
198
205
  filling an IDSToplevel, a choice is made between the exclusive coordinates.
206
+ skip_complex: Whether to skip over populating complex numbers. This is
207
+ useful for maintaining compatibility with older versions of netCDF4
208
+ (<1.7.0) where complex numbers are not supported.
199
209
  """
200
210
  if isinstance(structure, IDSToplevel):
201
211
  unsupported_ids_name = (
@@ -218,7 +228,9 @@ def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
218
228
 
219
229
  for child in structure:
220
230
  if isinstance(child, IDSStructure):
221
- exclusive_coordinates.extend(fill_consistent(child, leave_empty))
231
+ exclusive_coordinates.extend(
232
+ fill_consistent(child, leave_empty, skip_complex)
233
+ )
222
234
 
223
235
  elif isinstance(child, IDSStructArray):
224
236
  if child.metadata.coordinates[0].references:
@@ -230,7 +242,7 @@ def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
230
242
  if isinstance(coor, IDSPrimitive):
231
243
  # maybe fill with random data:
232
244
  try:
233
- maybe_set_random_value(coor, leave_empty)
245
+ maybe_set_random_value(coor, leave_empty, skip_complex)
234
246
  except (RuntimeError, ValueError):
235
247
  pass
236
248
  child.resize(len(coor))
@@ -244,7 +256,9 @@ def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
244
256
  else:
245
257
  child.resize(child.metadata.coordinates[0].size or 1)
246
258
  for ele in child:
247
- exclusive_coordinates.extend(fill_consistent(ele, leave_empty))
259
+ exclusive_coordinates.extend(
260
+ fill_consistent(ele, leave_empty, skip_complex)
261
+ )
248
262
 
249
263
  else: # IDSPrimitive
250
264
  coordinates = child.metadata.coordinates
@@ -256,7 +270,7 @@ def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
256
270
  exclusive_coordinates.append(child)
257
271
  else:
258
272
  try:
259
- maybe_set_random_value(child, leave_empty)
273
+ maybe_set_random_value(child, leave_empty, skip_complex)
260
274
  except (RuntimeError, ValueError):
261
275
  pass
262
276
 
@@ -278,7 +292,7 @@ def fill_consistent(structure: IDSStructure, leave_empty: float = 0.2):
278
292
  coor = filled_refs.pop()
279
293
  unset_coordinate(coor)
280
294
 
281
- maybe_set_random_value(element, leave_empty)
295
+ maybe_set_random_value(element, leave_empty, skip_complex)
282
296
  else:
283
297
  return exclusive_coordinates
284
298
 
@@ -46,7 +46,7 @@ def test_pretty_print(ids):
46
46
  assert pprint.pformat(ids) == "<IDSToplevel (IDS:gyrokinetics)>"
47
47
 
48
48
 
49
- def test_serialize_nondefault_dd_version():
49
+ def test_serialize_nondefault_dd_version(requires_imas):
50
50
  ids = IDSFactory("3.31.0").core_profiles()
51
51
  fill_with_random_data(ids)
52
52
  data = ids.serialize()
@@ -1,5 +1,6 @@
1
1
  # A minimal testcase loading an IDS file and checking that the structure built is ok
2
2
  from numbers import Complex, Integral, Number, Real
3
+ from packaging import version
3
4
 
4
5
  import numpy as np
5
6
  import pytest
@@ -61,7 +62,11 @@ def test_assign_str_1d(minimal, caplog):
61
62
 
62
63
 
63
64
  # Prevent the expected numpy ComplexWarnings from cluttering pytest output
64
- @pytest.mark.filterwarnings("ignore::numpy.ComplexWarning")
65
+ @pytest.mark.filterwarnings(
66
+ "ignore::numpy.ComplexWarning"
67
+ if version.parse(np.__version__) < version.parse("1.25")
68
+ else "ignore::numpy.exceptions.ComplexWarning"
69
+ )
65
70
  @pytest.mark.parametrize("typ, max_dim", [("flt", 6), ("cpx", 6), ("int", 3)])
66
71
  def test_assign_numeric_types(minimal, caplog, typ, max_dim):
67
72
  caplog.set_level("INFO", "imas")
@@ -87,7 +92,11 @@ def test_assign_numeric_types(minimal, caplog, typ, max_dim):
87
92
  len(caplog.records) == 1
88
93
  elif dim == other_ndim >= 1 and other_typ == "cpx":
89
94
  # np allows casting of complex to float or int, but warns:
90
- with pytest.warns(np.ComplexWarning):
95
+ with pytest.warns(
96
+ np.ComplexWarning
97
+ if version.parse(np.__version__) < version.parse("1.25")
98
+ else np.exceptions.ComplexWarning
99
+ ):
91
100
  caplog.clear()
92
101
  minimal[name].value = value
93
102
  assert len(caplog.records) == 1
@@ -54,7 +54,7 @@ def test_nbc_structure_to_aos(caplog):
54
54
  assert caplog.record_tuples[0][:2] == ("imas.ids_convert", logging.WARNING)
55
55
 
56
56
 
57
- def test_nbc_0d_to_1d(caplog):
57
+ def test_nbc_0d_to_1d(caplog, requires_imas):
58
58
  # channel/filter_spectrometer/radiance_calibration in spectrometer visible changed
59
59
  # from FLT_0D to FLT_1D in DD 3.39.0
60
60
  ids = IDSFactory("3.32.0").spectrometer_visible()
@@ -1,11 +1,52 @@
1
1
  from imas.db_entry import DBEntry
2
+ from imas.exception import InvalidNetCDFEntry
2
3
  from imas.test.test_helpers import compare_children, fill_consistent
4
+ import re
5
+ import pytest
6
+ import netCDF4
7
+ from packaging import version
3
8
 
4
9
 
5
- def test_nc_latest_dd_autofill_put_get(ids_name, tmp_path):
10
+ def test_nc_latest_dd_autofill_put_get_skip_complex(ids_name, tmp_path):
6
11
  with DBEntry(f"{tmp_path}/test-{ids_name}.nc", "x") as entry:
7
12
  ids = entry.factory.new(ids_name)
8
- fill_consistent(ids, 0.5)
13
+ fill_consistent(ids, leave_empty=0.5, skip_complex=True)
14
+
15
+ entry.put(ids)
16
+ ids2 = entry.get(ids_name)
17
+
18
+ compare_children(ids, ids2)
19
+
20
+
21
+ @pytest.mark.skipif(
22
+ version.parse(netCDF4.__version__) >= version.parse("1.7.0"),
23
+ reason="NetCDF4 versions < 1.7.0 do not support complex numbers",
24
+ )
25
+ def test_nc_latest_dd_autofill_put_get_with_complex_older_netCDF4(ids_name, tmp_path):
26
+ with DBEntry(f"{tmp_path}/test-{ids_name}.nc", "x") as entry:
27
+ ids = entry.factory.new(ids_name)
28
+ fill_consistent(ids, leave_empty=0.5, skip_complex=False)
29
+ try:
30
+ entry.put(ids)
31
+ ids2 = entry.get(ids_name)
32
+ compare_children(ids, ids2)
33
+ except InvalidNetCDFEntry as e:
34
+ # This is expected, as these versions of NetCDF4 do not support
35
+ # complex numbers.
36
+ if not re.search(
37
+ r".*NetCDF 1.7.0 or later is required for complex data types", str(e)
38
+ ):
39
+ raise InvalidNetCDFEntry(e) from e
40
+
41
+
42
+ @pytest.mark.skipif(
43
+ version.parse(netCDF4.__version__) < version.parse("1.7.0"),
44
+ reason="NetCDF4 versions >= 1.7.0 support complex numbers",
45
+ )
46
+ def test_nc_latest_dd_autofill_put_get_with_complex_newer_netCDF4(ids_name, tmp_path):
47
+ with DBEntry(f"{tmp_path}/test-{ids_name}.nc", "x") as entry:
48
+ ids = entry.factory.new(ids_name)
49
+ fill_consistent(ids, leave_empty=0.5, skip_complex=False)
9
50
 
10
51
  entry.put(ids)
11
52
  ids2 = entry.get(ids_name)
@@ -21,7 +21,7 @@ def test_ids_valid_type():
21
21
  assert ids_types in ({IDSType.NONE}, {IDSType.CONSTANT, IDSType.DYNAMIC})
22
22
 
23
23
 
24
- def test_constant_ids(caplog):
24
+ def test_constant_ids(caplog, requires_imas):
25
25
  ids = imas.IDSFactory().new("amns_data")
26
26
  if ids.metadata.type is IDSType.NONE:
27
27
  pytest.skip("IDS definition has no constant IDSs")
imas/test/test_util.py CHANGED
@@ -54,7 +54,7 @@ def test_inspect():
54
54
  inspect(cp.profiles_1d[1].grid.rho_tor_norm) # IDSPrimitive
55
55
 
56
56
 
57
- def test_inspect_lazy():
57
+ def test_inspect_lazy(requires_imas):
58
58
  with get_training_db_entry() as entry:
59
59
  cp = entry.get("core_profiles", lazy=True)
60
60
  inspect(cp)
@@ -141,7 +141,7 @@ def test_idsdiffgen():
141
141
  assert diff[0] == ("profiles_1d/time", -1, 0)
142
142
 
143
143
 
144
- def test_idsdiff():
144
+ def test_idsdiff(requires_imas):
145
145
  # Test the diff rendering for two sample IDSs
146
146
  with get_training_db_entry() as entry:
147
147
  imas.util.idsdiff(entry.get("core_profiles"), entry.get("equilibrium"))
@@ -179,7 +179,7 @@ def test_get_toplevel():
179
179
  assert get_toplevel(cp) is cp
180
180
 
181
181
 
182
- def test_is_lazy_loaded():
182
+ def test_is_lazy_loaded(requires_imas):
183
183
  with get_training_db_entry() as entry:
184
184
  assert is_lazy_loaded(entry.get("core_profiles")) is False
185
185
  assert is_lazy_loaded(entry.get("core_profiles", lazy=True)) is True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: imas-python
3
- Version: 1.1.2.dev42
3
+ Version: 1.1.2.dev55
4
4
  Summary: Pythonic wrappers for the IMAS Access Layer
5
5
  Author: ITER Organization
6
6
  Author-email: Karel Lucas van de Plassche <karelvandeplassche@gmail.com>, Daan van Vugt <dvanvugt@ignitioncomputing.com>, Maarten Sebregts <msebregts@ignitioncomputing.com>, imas-support@iter.org
@@ -222,7 +222,7 @@ Requires-Dist: sphinx-autosummary-accessors>=0.1.2; extra == "docs"
222
222
  Requires-Dist: sphinx-immaterial<0.12,>=0.11.0; extra == "docs"
223
223
  Requires-Dist: sphinx-click; extra == "docs"
224
224
  Provides-Extra: netcdf
225
- Requires-Dist: netCDF4>=1.7.0; extra == "netcdf"
225
+ Requires-Dist: netCDF4>=1.4.1; extra == "netcdf"
226
226
  Provides-Extra: h5py
227
227
  Requires-Dist: h5py; extra == "h5py"
228
228
  Provides-Extra: test
@@ -0,0 +1,109 @@
1
+ imas/__init__.py,sha256=9OHpTf8gCl7BJVU7U2bf9kWatBNNAhFZdgoFPcHeNQU,878
2
+ imas/__main__.py,sha256=2qXoC0HzV4xkPQAvdubHC4rnK3G6f_2PT9TkkCHYXk8,418
3
+ imas/_util.py,sha256=FXX13glhmgSiw-0LtjH0xv3YlM3Pa9X4jl9yz9Uv7Vs,9484
4
+ imas/_version.py,sha256=tuWr0XXT4IvYbzu1_D_gDAzw-v8PnK2RKX2lweVaseE,426
5
+ imas/db_entry.py,sha256=OnAgz0c97gbEizrDcuO909VFUzOzeU1OIwWe50PCCxw,31755
6
+ imas/dd_helpers.py,sha256=IFRmOWw0VyLuR9Xpe9VeVy1ANq5XpFF4m1rj9RtETKI,6275
7
+ imas/dd_zip.py,sha256=6gQ91rlVsDaU1U6XXaEnaGyvI3ZgQ659GOgIYJLZH6M,10322
8
+ imas/exception.py,sha256=iqsxl6M1gEjJO8YP9UBYt5OQk7faGx0EIs1XJ4YJ71U,3750
9
+ imas/ids_base.py,sha256=zDckve7poXO9vbKPsi_17FjKMTKd6QADork7H7wIS7o,5439
10
+ imas/ids_convert.py,sha256=OixW99Gpm77n0wj2RwlasFP_jzAN_wozrlCn_BtkbvM,38548
11
+ imas/ids_coordinates.py,sha256=aLrA5XWK5eI6fEeJjLIRtexL5IcNVrq1Uuh_7lPNsSs,16955
12
+ imas/ids_data_type.py,sha256=2Kz2FumzgBPH7lEg29qxOxwK9kroUOkLCULZ4tK2kSk,3302
13
+ imas/ids_defs.py,sha256=nlVsS5Nw8P838gazBMXUxhzirONKKRq-r60--_Nd9nk,5417
14
+ imas/ids_factory.py,sha256=t55O1PB2Nj1vQ1EroC-7dQyB1Va_iSTCCUFINjUKnos,3774
15
+ imas/ids_identifiers.py,sha256=YwDjNu7M2kYrEJY5dcOCG0w5OKsWhqzQqCjQzX71HBI,4164
16
+ imas/ids_metadata.py,sha256=kpyNKXB9-aQpjdj1df10qKZIJ7-HC5BuDOhGyhX9YMI,12258
17
+ imas/ids_path.py,sha256=rqucboH8wO4-njy8d6lUffnfHA6L2b81wh8AJ6Y_gbU,10446
18
+ imas/ids_primitive.py,sha256=3ALc0RvqF1y6_nCgMiszEtTlxwufdqT2YmpAybh8PUs,16835
19
+ imas/ids_struct_array.py,sha256=BFBa1wSZFAlZguExCTA56D8RfnaLv-nbxDIz9fMhcGE,8292
20
+ imas/ids_structure.py,sha256=0DRudIturYE2Aw_Jb22zBZCd_zyA0-lg8YOEI7Y_iso,13107
21
+ imas/ids_toplevel.py,sha256=YHWZewK8JYf34pYzF_oooMILZAHgnuWCFtr0_JFjmzI,14915
22
+ imas/setup_logging.py,sha256=McfIYupRQDxtL-lasTjH5F8BxBvncuZhcpzSDEwKtJQ,1872
23
+ imas/training.py,sha256=JGYjpCubUJDb_Rg0QaaDhNkBHc4Qc376U9fRq24NVXc,1576
24
+ imas/util.py,sha256=dG282-l7m2U_VhjZ0VnQ-BpsWrzgKSxUZ1AZf-_wDOY,17822
25
+ imas/assets/IDSDef.zip,sha256=ji71sLv6f0vIzlR2ho-uXwAwNRax9ba_XCAi_YZC3oQ,27383258
26
+ imas/assets/IDSDef2MDSpreTree.xsl,sha256=V9eDmDnxe6oYhDP81gmdYip8cF2yST9dGxmZBaATLdA,7296
27
+ imas/assets/IDS_fake_toplevel.xml,sha256=TJhukQuDHHVTW2U7fK_-KmTQiYOFZMY-ECZXBHQE2mk,18683
28
+ imas/assets/IDS_minimal.xml,sha256=5B6c0J-WPzSChHWwpLPRkNawx9m6v8BM5nC0OQFnWcQ,1740
29
+ imas/assets/IDS_minimal_2.xml,sha256=IPv3ozVmzo8fIQAtxWq4n487FF4OWKrgs2V1FIK-DpA,1739
30
+ imas/assets/IDS_minimal_struct_array.xml,sha256=RekSaQllcIRqE2dOEcEwOHSrC-k43u4qxW3Y5pzYV5E,1943
31
+ imas/assets/IDS_minimal_types.xml,sha256=rPPFpGMGder_WS_IwE_7xk0uVSqowHATfosy4PE0NqA,6864
32
+ imas/assets/ITER_134173_106_core_profiles.ids,sha256=KMECYN66bq08H8zZSk21HB5nBr2Iou4uPzfaAoaAvhQ,753508
33
+ imas/assets/ITER_134173_106_equilibrium.ids,sha256=uYpVwTAyGVcWCrBUdSR3427qDY5zx1WXeX4Hd-o_2Jo,3796340
34
+ imas/assets/README.md,sha256=-bempMZGQbciI4u042p25lFnYRIbPOZlCvCKTQ2TgSA,177
35
+ imas/assets/core_profiles.ids,sha256=KMECYN66bq08H8zZSk21HB5nBr2Iou4uPzfaAoaAvhQ,753508
36
+ imas/assets/equilibrium.ids,sha256=uYpVwTAyGVcWCrBUdSR3427qDY5zx1WXeX4Hd-o_2Jo,3796340
37
+ imas/backends/__init__.py,sha256=SK1JCpWntWkzdvSZ-U9aPwaeJlVnNfJmzo2dwgmQaww,469
38
+ imas/backends/db_entry_impl.py,sha256=28cbAMWSqKDQiEBqwjEFYDEbIRonwthl6ma3urJxlOs,3995
39
+ imas/backends/imas_core/__init__.py,sha256=Zi-Z_qCvZdFotE_rJwQjz_Xdsi5h201z9hVYAlmn8Mw,190
40
+ imas/backends/imas_core/al_context.py,sha256=D5PUg6o487kR9diRK9ZclkCpzbn-Brzhkf-SKOZSBLI,14174
41
+ imas/backends/imas_core/db_entry_al.py,sha256=7HeXVm2HCNh8f3Ob81GQIRyeWZ-qu6kORWI5OOtyOjQ,14893
42
+ imas/backends/imas_core/db_entry_helpers.py,sha256=HwWTyY-IF5gEGBuL6BsPnHFL3EZtaLIxr-ctC-3u_A0,8047
43
+ imas/backends/imas_core/imas_interface.py,sha256=c4OHvhw-aCO4O9sDSmYdcZcgeeBwu0-BcozYpVhsCuQ,7978
44
+ imas/backends/imas_core/mdsplus_model.py,sha256=_l8z4vKI-o_27VOK778NOAGp6QWAV61dEnwNkuy8z5s,14795
45
+ imas/backends/imas_core/uda_support.py,sha256=lxHzby6Fkkpn5j6yWpQrlqlwng-gA9O_hVK03Wf_Ij8,1770
46
+ imas/backends/netcdf/__init__.py,sha256=pyETe19IpVVezOS7mNzF_Zbt_eGoK8IWnQfG8P7V4CA,191
47
+ imas/backends/netcdf/db_entry_nc.py,sha256=KCVQmKM7o5Sicf0hv08ksm_qAUHajIloJZD7vnD-uq0,7078
48
+ imas/backends/netcdf/ids2nc.py,sha256=43--1ZGrysLrzUvHP6AlZuYBRIJXyQ5bNLISYH188f0,13385
49
+ imas/backends/netcdf/nc2ids.py,sha256=rAEzJCqcZfFTy_co75TmpoXN42O4LIuv0yjxnjBm-bo,11879
50
+ imas/backends/netcdf/nc_metadata.py,sha256=pTOff1Zzk7uT1BGUV1cnDLVNo4WeTT-7JETR_9LvVIs,16175
51
+ imas/backends/netcdf/nc_validate.py,sha256=4ixuTWeIEEwUFuCFdvPxZBXN-_boupzZCfeDQ0eD1io,2307
52
+ imas/command/cli.py,sha256=lzVV_PMXBd88J7DmDwaiWiiqMj_2rs5V8dc6kkbUDGw,8401
53
+ imas/command/db_analysis.py,sha256=8ETLMzEgS8z17MEeB10NR28wiQO3TdjEGQHlmbkTjBw,10454
54
+ imas/command/helpers.py,sha256=Hf9Y0Owm9woJklQ6UzwHHum96YgI7R_SKRlksUqnCIs,1499
55
+ imas/command/timer.py,sha256=wvjHJBgkY1VRaRvCFuDDORzZOUV-Q7IxiTxlGzjXBz4,2328
56
+ imas/test/test_all_dd_versions.py,sha256=8T9q9S7Vhwa96y6KUDv7HoeuOPlc6RovEhPZEseDoDs,790
57
+ imas/test/test_cli.py,sha256=ZSQdO5t4n0wa2ohJNsRQEVftJOxyDIHsj_IUZxKuszA,1677
58
+ imas/test/test_dbentry.py,sha256=fq49bh7fa2O7ocLiXiDSB5EEVII6Cx3zeoiU5uzjyo8,4025
59
+ imas/test/test_dd_helpers.py,sha256=HBzPuIlEv0FM5qz_w9-BpX0R_T2cnC0b5cGt8sw_kpQ,1679
60
+ imas/test/test_dd_zip.py,sha256=SgKPufIvk3tK_Q4JpHKq57g0lKthEj1IgcdZ2c-IzwI,820
61
+ imas/test/test_deepcopy.py,sha256=vYTwpEqRpi-G-xVSRWVIwLL_jBY7f6v31QPOU0e_FKs,606
62
+ imas/test/test_exception.py,sha256=bL_JlWsdtT-emKkSHx1yFbDKLqWOx8piCFBNHJ4osig,408
63
+ imas/test/test_get_sample.py,sha256=BMoVJS4PgtV3S-AUnH6MJO2F8og1TZQk3KzOxGVa0as,16031
64
+ imas/test/test_hash.py,sha256=eMg3IF5IAfcOIbai1HF2PT2mikDyIlnbORQJ553brMk,6122
65
+ imas/test/test_helpers.py,sha256=ynhwAW5lotJfbscub_S2cppHWyruxDiT304ELyjjFIA,14647
66
+ imas/test/test_identifiers.py,sha256=UXjgZJBRYQVnHejpdug6umNcnutdgQkAnWuTNduxgig,3895
67
+ imas/test/test_ids2nc.py,sha256=zLp0F6GW04gU6HYp63bWivFS3Let_dwMohYy6Rgbis0,6040
68
+ imas/test/test_ids_ascii_data.py,sha256=qfXoSAl0TJawDMVZCbbbbjb89uVaGnK6pkAQ8fbHm3s,1116
69
+ imas/test/test_ids_convert.py,sha256=ERbfzcFDGltv9wKvw9C5SzBItdD2m_RPOnvX0TYNwE4,16099
70
+ imas/test/test_ids_coordinates.py,sha256=d6o5wxNE-V_JFZ0Qq6Vz3UGC2KuhuVwVah06REnnbcI,6002
71
+ imas/test/test_ids_data_type.py,sha256=VGQnJ-aeHzStJJQsnv3B2jr4rs33vRKKkOJxG-Szk-Y,1443
72
+ imas/test/test_ids_factory.py,sha256=5izNPvMmpt64wgOxh2ResvzsRgE2ZVtaNZlYuU_27YY,1062
73
+ imas/test/test_ids_metadata.py,sha256=hq8ua850GQXhQXpcF_9nNGX_UwJke1QCcR8Hr188gX4,1997
74
+ imas/test/test_ids_mixin.py,sha256=Gi0ssjJRpeyNxx-x7D7nPaAGcwAOR_7Td55HTVNUvQc,722
75
+ imas/test/test_ids_path.py,sha256=z9OS8SY4ytzJF70aEs8m6Y9pdfP_Y2p1q5gLIa55mVI,6126
76
+ imas/test/test_ids_primitive.py,sha256=4ab9GCvtYB5Jyh2kCNMZRhvvFH-vy1QTpcWAHhgAlp8,4272
77
+ imas/test/test_ids_struct_array.py,sha256=oK09V2GzqAEaJW1taFxRMzrxF_B79boBLjdm8JQY_lM,2863
78
+ imas/test/test_ids_structure.py,sha256=PpqStc0RQKk9olJOdkxIBao6WXb9k6WNCrnJX-Se1eo,2240
79
+ imas/test/test_ids_toplevel.py,sha256=x53HlA4__xLoS5v2QY_8_vcmh-65xdfYNQMjOMQoKPk,1457
80
+ imas/test/test_ids_validate.py,sha256=0tRwmId61JFLlFmz-17DRKxntQtsKn_kRZULznt4d-g,11903
81
+ imas/test/test_latest_dd_autofill.py,sha256=3SZD9J4jm_NQznJYT7ypnrmJCRAMV2iM8IJZnymrfJQ,2052
82
+ imas/test/test_latest_dd_manual.py,sha256=XINCYCw3ZtbRch6Ug_gSPRyYXIg0dAorM7Y270kSYvI,1428
83
+ imas/test/test_latest_dd_resample.py,sha256=ziPV-vReTiMr3is7l9-UHqVEyeHqinJ7PbXfK_0KO70,2859
84
+ imas/test/test_lazy_loading.py,sha256=f7UQ-kSx2sukCoDBQyIs4GbMTghNL8rFu8tz_atJOxs,6699
85
+ imas/test/test_list_occurrences.py,sha256=Fdzf2ap8vODkg1xdpUPZ2_k1RxlBvcE0pih0FcX-W48,2986
86
+ imas/test/test_minimal.py,sha256=NWfzH_zWOGzNmQ8lVTr-FyLTdadrnI82L6eRZJ26eWQ,1419
87
+ imas/test/test_minimal_conversion.py,sha256=4wufUlbLZzAgh57VJVSgpjqd2ybrcaxcmgsmL7aJV4M,1678
88
+ imas/test/test_minimal_io.py,sha256=vy1cC68BxZATarAuchhB57cyN9cSpVWAbtxpmVkrcHo,904
89
+ imas/test/test_minimal_struct_array_io.py,sha256=AHNLH6Ic6XDQT97GXZrYQ3-_ApnYhYduc6PFZmnOXhI,2245
90
+ imas/test/test_minimal_types.py,sha256=l8jp1ZNj_Hzio3g98gqzfuJRtKzz0oYd8WLOYO8NGM4,15040
91
+ imas/test/test_minimal_types_io.py,sha256=wWhtzTo7Yoxu9Tx5h5s0V_pIfxSWwX4wuz5LXTS13TA,2330
92
+ imas/test/test_minimal_types_io_automatic.py,sha256=eSk14249rCx67sOIoWqhWf85HkzcLnhP27LmfINM5fY,2476
93
+ imas/test/test_nbc_change.py,sha256=ul_LTT0AqcolcEfiEgRYaHh7DO5PKbHCx7z3q2VE_vk,15998
94
+ imas/test/test_nc_autofill.py,sha256=PeZzoZK6R_BE7HYwq7dUsHylWlxYdvvmnqV5Cm68M9A,1935
95
+ imas/test/test_nc_entry.py,sha256=GWEGFppU_YwPnOnelFuOIXCPJpYfD9Or6Vl8uEsMkkk,1032
96
+ imas/test/test_nc_metadata.py,sha256=P-DYd_4e4j-RfhgyenXU-BBcgzaGKD2_isGduIuM-eQ,6180
97
+ imas/test/test_nc_validation.py,sha256=ul2lMWOw5ne2O-YheAYZkvAlR9DfjmFLEefC7jk98ok,7269
98
+ imas/test/test_snippets.py,sha256=Gxe7rU9nVuvnAzPr9eGyqCtpNqKUoBbqU9uOjz3HwH8,979
99
+ imas/test/test_static_ids.py,sha256=p6sDOzUz30FT_-s4RettoRmpfpqNOa26ThfdF8F4QNI,1302
100
+ imas/test/test_str_1d.py,sha256=d6GrmV4OYG9f4ludjZBmuqyKOM9XIExTqMh8aQ1UJcQ,3453
101
+ imas/test/test_time_slicing.py,sha256=FwbdggRJ75Suc268-89daCSaVXhzl8pZZm3Od13EiR4,6959
102
+ imas/test/test_uda_support.py,sha256=AmakuexebZfJ2-vk_DHfNRPwHmNM2RnwzXqT0eWwWJ0,338
103
+ imas/test/test_util.py,sha256=Dbl07LhaBZiabm7yh9cfkSS4VkEFsBNoo3fmhQPAC1g,6814
104
+ imas_python-1.1.2.dev55.dist-info/LICENSE.txt,sha256=RzxtV7MG0zbF6dDvQsaZ1OKsHZ7CRyeILenjUIol5rs,7651
105
+ imas_python-1.1.2.dev55.dist-info/METADATA,sha256=FqkDww7madWt7ba2xUqU8QJr5I5TWtrNqv1swTiZNq8,13630
106
+ imas_python-1.1.2.dev55.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
107
+ imas_python-1.1.2.dev55.dist-info/entry_points.txt,sha256=e8oXj2SLwyFEiBeJRaAXRc9EYQ8eHWWn7NWdjixjeDM,99
108
+ imas_python-1.1.2.dev55.dist-info/top_level.txt,sha256=_WFOlA1rmpYm0T73sNo5Ntvs7S3x4cR7UE8Oy5I5eJA,5
109
+ imas_python-1.1.2.dev55.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- <?xml version="1.0"?>
2
- <constants name="core_instant_changes_identifier" identifier="yes" create_mapping_function="yes">
3
- <header>
4
- Translation table for types of instant changes to the plasma state.
5
- </header>
6
-
7
- <idsInstance xpath="/core_instant_changes/change/identifier"/>
8
-
9
- <int name="unspecified" description="Unspecified instant changes" >0</int>
10
- <int name="total" description="Total instant changes; combines all types of events" >1</int>
11
- <int name="pellet" description="Instant changes from a pellet" >2</int>
12
- <int name="sawtooth" description="Instant changes from a sawtooth" >3</int>
13
- <int name="elm" description="Instant changes from an edge localised mode" >4</int>
14
-
15
- </constants>
@@ -1,76 +0,0 @@
1
- <?xml version="1.0"?>
2
- <constants name="core_source" identifier="yes" create_mapping_function="yes">
3
- <header>
4
- Translation table for sources of particles, momentum and heat.
5
- </header>
6
- <!-- Some lines and indices are common with the edge_sources/source/identifier -->
7
-
8
- <ddInstance xpath="/core_sources/source/identifier"/>
9
-
10
- <int name="unspecified" description="Unspecified source type" >0</int>
11
- <int name="total" description="Total source; combines all sources" >1</int>
12
- <int name="nbi" description="Source from Neutral Beam Injection" >2</int>
13
- <int name="ec" description="Sources from electron cyclotron heating and current drive" >3</int>
14
- <int name="lh" description="Sources from lower hybrid heating and current drive" >4</int>
15
- <int name="ic" description="Sources from heating at the ion cyclotron range of frequencies" >5</int>
16
- <int name="fusion" description="Sources from fusion reactions, e.g. alpha particle heating" >6</int>
17
- <int name="ohmic" description="Source from ohmic heating" >7</int>
18
- <int name="bremsstrahlung" description="Source from bremsstrahlung; radiation losses are negative sources" >8</int>
19
- <int name="synchrotron_radiation" description="Source from synchrotron radiation; radiation losses are negative sources" >9</int>
20
- <int name="line_radiation" description="Source from line radiation; radiation losses are negative sources" >10</int>
21
- <int name="collisional_equipartition" description="Collisional equipartition" >11</int>
22
- <int name="cold_neutrals" description="Source of cold neutrals" >12</int>
23
- <int name="bootstrap_current" description="Bootstrap current" >13</int>
24
- <int name="pellet" description="Sources from injection" >14</int>
25
-
26
- <int name="auxiliary" description="Source from auxiliary systems, e.g. heating and current drive systems" >100</int>
27
- <int name="ic_nbi" description="A combination of the ic and nbi sources" >101</int>
28
- <int name="ic_fusion" description="A combination of the ic and fusion sources" >102</int>
29
- <int name="ic_nbi_fusion" description="A combination of the ic and fusion sources" >103</int>
30
- <int name="ec_lh" description="A combination of the ec and lh sources" >104</int>
31
- <int name="ec_ic" description="A combination of the ec and ic sources" >105</int>
32
- <int name="lh_ic" description="A combination of the lh and ic sources" >106</int>
33
- <int name="ec_lh_ic" description="A combination of the ec, lh and ic sources" >107</int>
34
- <int name="gas_puff" description="Gas puff" >108</int>
35
- <int name="killer_gas_puff" description="Killer gas puff" >109</int>
36
-
37
- <int name="radiation" description="Total radiation source; radiation losses are negative sources" >200</int>
38
- <int name="cyclotron_radiation" description="Source from cyclotron radiation; radiation losses are negative sources" >201</int>
39
- <int name="cyclotron_synchrotron_radiation" description="Source from combined cyclotron and synchrotron radiation; radiation losses are negative sources" >202</int>
40
- <int name="impurity_radiation" description="Line radiation and Bremsstrahlung source; radiation losses are negative sources." >203</int>
41
-
42
- <int name="particles_to_wall" description="Particle pumping by the wall; negative source for plasma and positive source for the wall" >303</int>
43
- <int name="particles_to_pump" description="Particle pumping by external pump; negative source for plasma and positive source for the pump" >304</int>
44
- <int name="charge_exchange" description="Source from charge exchange. Charge exchange losses are negative sources" >305</int>
45
-
46
- <int name="transport" description="Source term related to transport processes" >400</int>
47
- <int name="neoclassical" description="Source term related to neoclassical processes" >401</int>
48
- <int name="equipartition" description="Equipartition due to collisions and turbulence" >402</int>
49
- <int name="turbulent_equipartition" description="Turbulent equipartition" >403</int>
50
-
51
- <int name="runaways" description="Source from run-away processes; includes both electron and ion run-away" >501</int>
52
-
53
- <int name="ionisation" description="Source from ionisation processes (not accounting for charge exchange)" >601</int>
54
- <int name="recombination" description="Source from recombination processes (not accounting for charge exchange)" >602</int>
55
- <int name="excitation" description="Source from excitation processes" >603</int>
56
-
57
- <int name="database" description="Source from database entry" >801</int>
58
- <int name="gaussian" description="Artificial source with a gaussian profile" >802</int>
59
-
60
- <int name="custom_1" description="Custom source terms 1; content to be decided by data provided" >901</int>
61
- <int name="custom_2" description="Custom source terms 2; content to be decided by data provided" >902</int>
62
- <int name="custom_3" description="Custom source terms 3; content to be decided by data provided" >903</int>
63
- <int name="custom_4" description="Custom source terms 4; content to be decided by data provided" >904</int>
64
- <int name="custom_5" description="Custom source terms 5; content to be decided by data provided" >905</int>
65
- <int name="custom_6" description="Custom source terms 6; content to be decided by data provided" >906</int>
66
- <int name="custom_7" description="Custom source terms 7; content to be decided by data provided" >907</int>
67
- <int name="custom_8" description="Custom source terms 8; content to be decided by data provided" >908</int>
68
- <int name="custom_9" description="Custom source terms 9; content to be decided by data provided" >909</int>
69
-
70
- <!-- Not sure what these sources represents?
71
- <int name="background" description="Background source" >28</int>
72
- <int name="impurity" description="Impurity source" >29</int>
73
- <int name="cold_neutral_cooling" description="Cold neutrals from the edge that enters the plasma" >24</int>
74
- -->
75
-
76
- </constants>