Closed nsankar closed 3 years ago
Hi @nsankar,
Yes, you can use time stamp values for X (data sites). X-values must increase or decrease strictly monotonically. You can use ndarray for temperature and pressure data as Y-values at the same X-values. In this case you have a multivariate data. And yes, you can use the same X-values for Xi. In this case you just evaluate the spline for the same X-values without interpolation.
For example:
x = [5, 10, 15, 20, 25, 30] # time stamps
y = [
[0.5, 1.2, 0.7, 1.3, 0.4, 0.1], # temperature
[5.5, 7.1, 1.8, 2.2, 4.3, 1.5], # pressure
]
ys = csaps(x, y, x, smooth=0.8)
@espdev Great! Thank you for the inputs.
@nsankar You are welcome :)
Hi, Thanks for developing this interesting data smoothing library.
I would like to know what does 'Data site' mean, for instance, in a time series data can I use the time stamp attributes for X (as Data site) ? like we sample a chemical temperature and pressure data every 5 seconds. So would X be , X = [5,10,15,20,25,30] in such a case ? and then y could be a ndarray of (temperature and pressure) ?
In the above case, Is it correct to specify Xi - (optional) as Xi = [5,10,15,20.25,30] if we expect to get the smoothed data for the same time range as X ? Kindly clarify. Thanks in advance.