Jump to content

Filling missing data


Recommended Posts

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

 

Capture2.JPG

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

  • Super Seeqer

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)

screenshot-explore.seeq.com-2021.07.12-17_41_37.png

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...