Home › Forums › Development › Functions for multi-dimensional data
- This topic has 3 replies, 2 voices, and was last updated 1 year, 6 months ago by drahnoel.
-
AuthorPosts
-
16. February 2023 at 9:51 #7069
When performing parameter sweeps, the data gets multidimensional. For post-processing/visualization it seems that formulas for handling this are missing, forcing people to use octave code.
I propose two features, which are independent of each other:
- Proper indexing: eg.: variable[index,1:5,5:,:5]
A number or integer variable eliminates the dependency. A range is applied to the data and to the dependent variable. Therefore, we have also a need for:- get_dependent(variable, “name”)
Get the dependent of data with given name. Is usually equivalent to using name directly, unless a range was applied.
- get_dependent(variable, “name”)
- apply_on_dependent(variable, dependent_name, function)
Return data with the dependent_name dependency eliminated. It is eliminated by calling function on each 1-D data with dependent_name as only dependency. (function could be a string to be evaluated.)
This would enable all kind of usefull operations. Ideas for function:- min, max, average, median, quantile
Very interesting eg for Monte Carlo or parameter sweeps. - Just indexing: eg: data[3]
For example: Simulation is Harmonic Balance + Parameter Sweep. Using this, we can do apply_on_dependant(variable, “frequency”, “data[3]”) to get the 2nd harmonic over the parameter sweep. - interpolate(data, value, kind=”linear”)
Idea is to remove the dependency with dependent_name by interpolating the data accross the dependent variable.
- min, max, average, median, quantile
28. February 2023 at 22:42 #7105Hi, drahnoel,
> A range is applied to the data and to the dependent variable…..
you probably mean _in_dependent variable, right?>get_dependent(variable, “name”)
>Get the dependent of data with given name. Is usually equivalent to using name directly, unless a range was applied.I don’t understand this. Could you elaborate please?
Cheers
Carsten28. February 2023 at 23:31 #7114Yes you are right, I will edit.
Let’s say we have variable “signal” depending on variable “frequency”.
With the proposed syntax, you could do something like:
(signal/frequency)[2:3]
or
signal[2:3]/frequency[2:3]
What I propose is:
s = signal[2:3]
s/get_dependencies(s, “frequency”)
Now, that I think about it, this does not seem too usefull, as long as the dependencies are always bound to variables.
28. February 2023 at 23:32 #7115I cannot edit anymore
- Proper indexing: eg.: variable[index,1:5,5:,:5]
-
AuthorPosts
- You must be logged in to reply to this topic.