Versions Compared

Key

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

 

ASSUMPTIONS

Objectives:

  • GET: To retrieve subset of data elements
  • GET_SIZE: To interrogate the size of subset of data elements,

 

 

 

Assumptions:

  • 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
  • Q: Any implementations in other languages in future? Should we design a common API for all languages?

 

Syntax:

  • To retrieve subset of data elements (GET method), a syntax of the type a syntax of the type ids_get(<path_including_indices>) will likely be used. The possibility of using a more intuitive API
  • ids.path.to.field.get(indices) will be also investigated (the latter is a priori easier to implement, directly as a Python method of the requested node, provided the new LL is restructured according to an object-oriented approach).

...

 

Info
titleSimilar functionality of DEMUX actor
The ualdemux actor extracts single fields from a CPO given as input. Each exported field is defined by an output port added by the user, you can add as many output ports as you want. It is mandatory that the name of the port is the full path of the field to export, for example datainfo/whatref/machine is the path to machine field of a limiter CPO. The actor takes a time as input, which is propagated as output port if we manipulate a non-timed CPO, or a timed CPO in timeSlice mode. The timeSlice mode is a parameter of the actor, you can change its value by double clicking on it: if it is set at true, data are extracted for the slice corresponding at the input time, if it is set at false, data are extracted for each time slice (so a simple scalar data will become a 1D vector). If timeSlice is false, the output time becomes also a vector of times.</p> <p>/!\ Note that at this time, ualdemux actor allows only 1D data export in kepler.</p> <p>The last feature of this actor is the selection of subset to be extracted. You need to specify this selection in the name of the output port as follow: first you have to add a ; (semicolon) after the name of the field, then you have to specify the dimension in which you consider the data (1 is the first dim). After that, you can add as many ;index as you want (a semicolon followed by an index you want to extract). You can also replace the index by an expression index1:index2 (with a colon) to specify a set of indexes between both index1 and index2. For example, position/z;1;5;10;15:18 will export indexes [5,10,15,16,17,18] of the field z.

Returned values:

  •    If the field is a simple structure or a leaf with no more than one array of structure ancestor,
    • an array of the field is returned, 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(:) ? 
  1.   If the field is an array of structure, the returned data is 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
  2.                                   iii.     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) for a field which
    1. Is an array of structure with an array of structure ancestor: e.g. ic_antennas.antenna(indices1).module.get(indices2)
    2. Is a field or a simple structure with more than one array of structure ancestor : e.g. ic_antennas.antenna(indices1).module(indices2).power_launched.get
  • 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.
  • To interrogate the size of subset of data elements, a syntax of the type ids_get_size(<path_including_indices>) will likely be used. The possibility of usage of a more intuitive API ids.path.to.field.get_size(indices) will be also investigated
  1.                                      i.     If the field is an array of structure, the returned data is the size of the array of structure. Example : magnetics/flux_loop(indices)
  2.                                     ii.     If the field is a simple structure or a leaf with no more than one array of structure ancestor, an array of sizes of the field is returned, 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
  3.                                   iii.      It will be investigated if the method can be also easily implemented (i.e. the result is not guaranteed) for a field which
    1. Is an array of structure with an array of structure ancestor
    2. Is a field or a simple structure with more than one array of structure ancestor

 

...

 

 

 

 

 

OPEN POINTS:

  • Syntax - TBD
  • Is it possible to implement ids.path.to.field.get(indices) -> arrays of structures as a part of path....

...