Yassine Posted July 5, 2021 Share Posted July 5, 2021 Hi experts, Could someone advise please: I have a signal with missing data and tried to fill the missed data gap. it's a straight forward line as you see in the attachment. I use the $signal.setMaxInterpolation(4weeks) formula, but the produced signal is looking similar to the original one with no interpolation. did I missed something with the interpolation. Thanks in advance Yassine Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted July 5, 2021 Share Posted July 5, 2021 Hi Yassine, it might be that there are invalid values in this timeframe. You can try to change your formula to $as32.validValues(). This will remove invalid values from the signal and interpolation should work again. If the gap is greater than the max interpolation setting you can use $as32.validValues().setMaxInterpolation(4weeks) which first removes invalid values and then changes the max interpolation of the signal. Regards, Thorsten 1 Link to comment Share on other sites More sharing options...
Yassine Posted July 5, 2021 Author Share Posted July 5, 2021 Thanks Thorsten. now it's ok. Link to comment Share on other sites More sharing options...
Super Seeqer Shamus Cunningham Posted July 13, 2021 Super Seeqer Share Posted July 13, 2021 One additional option here is to hold the last valid value until a new one appears. The formula below allows you to mix in step interpolation characteristics for gaps into a linearly interpolated signal. $gaps = $signal.isNotValid().removeLongerThan(30d).move(-1ns,0) $holdSignal = $signal.aggregate(startValue(),$gaps,durationkey()) $signal.validValues().splice($holdSignal,$gaps) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now