Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • GET_SLICE type methods are not in the scope of the task (they are alternative ways to retrieve parts of the data elements) – although may be useful to add (independently of the deliverable) if straightforward to implement.
  • Implementation in Python only, no plans for other languages
  • IMPLEMENTATION IN NEW LL ONLY!!!!!

 

...

USE CASES:

 Frederic please provide some examples.

  1. During the partial GET, only the requested node is returned (and the structure below if the node is not a leaf), not the whole structure above: get (« magnetics.flux_loop(i).flux ») à flux(t) for index (i) of its parent
  2. If the user specifies a set of indices for the parent, then the GET returns a reshaped leaf with an additional dimension (corresponding to the one of its parent). Reshaping is done while keeping time as the last dimension, to keep consistent with the IMAS DD rule (even if the reshaped leaf is not anymore a legal DD entity) :
    1. get (« magnetics.flux_loop(i1:i2).flux ») à flux(i1:i2, t)
    2. get (« equilibrium.time_slice(t1:t2).profiles_1d.q ») à q(:, t1:t2)
    3. In case of nested AoS, it is not allowed to specify set of indices for AoS ancestors. Only given values of AoS ancestors indices are handled : path/to/field/with/ancestorAoS(x:y)/field/AoS(n :m) is not managed by partial GET

 

 

...

 

 

Functionality:

  • A simple structure or a leaf with no more than one array of structure ancestor, 
    • Returned: an array of the field i, containing the desired indices of its parent array of structure (optional argument, valid only if the requested leaf has the same size for all desired indices).
    • Example : magnetics.flux_loop(indices).flux
    • Q: how can we specify this with Bartek’s method ? Does a Python method accept a syntax such as magnetics.flux_loop(:).flux.get or magnetics.flux_loop.flux.get(:) ? 
  • An array of structure
    • Returned: an array of structure containing the desired indices (optional argument, by default all indices are returned).
    • Example : magnetics.flux_loop(indices) à straightforward with Bartek’s method
  • An array of structure with an array of structure ancestor:
    • Example. ic_antennas.antenna(indices1).module.get(indices2)
    •  It will be investigated if the method can be also easily implemented (i.e. the result is not guaranteed and the need is less obvious)
  • A field or a simple structure with more than one array of structure ancestor
    • Example: ic_antennas.antenna(indices1).module(indices2).power_launched.get
    •  It will be investigated if the method can be also easily implemented (i.e. the result is not guaranteed and the need is less obvious)

...