I have a set of timeseries objects t1,t2,t3,t4,t5…..etc. Now I would like to create a derived timeseries objects based on the existing timeseries objects. For instance
T1 = (t1/1000) *141.5
T2 = (t2/100 - t3)
T3 = (t3/100 - 14)
T4 = t4 * t2/100
T5 = t5/100
How do I perform these steps using cognite SDK. Is there a way to perform these operations?
Please advise.
Retrieving dataframe from data-points and then create new timeseries objects (T1,T2….) will be challenging and hence wanted if there is an optimal way to handle this in a better way. Is this possible using synthetic time-series?
IS there some examples and code snippets that can be shared so that I can grasp them better?
expressions (str | sympy.Expr | Sequence[str | sympy.Expr]) – Functions to be calculated. Supports both strings and sympy expressions. Strings can have either the API ts{} syntax, or contain variable names to be replaced using the variables parameter.
start (int | str | datetime) – Inclusive start.
end (int | str | datetime) – Exclusive end
limit (int | None) – Number of datapoints per expression to retrieve.
variables (dict[str, str | TimeSeries] | None) – An optional map of symbol replacements.
aggregate (str | None) – use this aggregate when replacing entries from variables, does not affect time series given in the ts{} syntax.
granularity (str | None) – use this granularity with the aggregate.
start and end are required parameters. So what you’re mentioning above is not possible. Please make sure you read the documentation carefully, that’ll help you get a better understanding of how to go about this.
Thanks @HaydenH . But I have to do this derived timeseries objects within a cognite function. I already have a function which creates the base timeseries and then adds the datapoints to the corresponding timeseries objects. I wanted to add the new timeseries as synthetic timeseries objects but don’t want to give any other parameters such as start, end, granularity etc.
I am basically creating the base objects t1,t,2,3,t4,t5 and in the same sequence, I would like to add the subsequent objects T1,T2,T3 etc. as per the equations I gave above.
expressions (str | sympy.Expr | Sequence[str | sympy.Expr]) – Functions to be calculated. Supports both strings and sympy expressions. Strings can have either the API ts{} syntax, or contain variable names to be replaced using the variables parameter.
start (int | str | datetime) – Inclusive start.
end (int | str | datetime) – Exclusive end
limit (int | None) – Number of datapoints per expression to retrieve.
variables (dict[str, str | TimeSeries] | None) – An optional map of symbol replacements.
aggregate (str | None) – use this aggregate when replacing entries from variables, does not affect time series given in the ts{} syntax.
granularity (str | None) – use this granularity with the aggregate.
start and end are required parameters. So what you’re mentioning above is not possible. Please make sure you read the documentation carefully, that’ll help you get a better understanding of how to go about this.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.