Ali Posted January 27, 2020 Share Posted January 27, 2020 Hello, I'm trying to use the signal() formula to create a signal that increases by 2 F temp. per day for one year. For some reason, when I build the $newsignal = signal(Interpolation.Linear, 365d, sample(now(),100), sample(now()+365d, 100+2*365)) $signal.ForecastSplice($newsignal) , it only interpolates and shows values for the next 60-70 days. Is there a reason why I can build a longer trend and splice it with an existing signal ? Thanks Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted January 27, 2020 Share Posted January 27, 2020 Hi Ali, as a workaound try this one: $signal.splice($newsignal, condition(1y, capsule(now(), now()+1y))) Regards, Thorsten Link to comment Share on other sites More sharing options...
Administrators Teddy Posted January 27, 2020 Administrators Share Posted January 27, 2020 Hello Ali, If I understand your question correctly you want to splice a signal that increase 2°F per to the end of some temperature signal such that the newly spliced signal starts at the last known value of your temperature signal. 1. The following syntax in the formula tool will create a signal that increases 2°F per day starting at now. (timeSince(toTime(now()), 1d)*2).setUnits('F') 2. Then to splice them I suggest following syntax. $signal.forecastConstant(365d) + $IncreasingTemp The final result: Hope this helps, Teddy Link to comment Share on other sites More sharing options...
Ali Posted January 29, 2020 Author Share Posted January 29, 2020 Thank you Thorsten & Teddy. Teddy, I used both of the formulas you mentioned but for some reason I only getting the future time signal. I used: (timesince(toTime(now()),1d)*2).setUnits('F') for green line And $Temp.forecastConstant(365d)+$f10 for orange line {$f10 is the green line} Thanks Link to comment Share on other sites More sharing options...
Seeq Team Morgan Bowling Posted January 31, 2020 Seeq Team Share Posted January 31, 2020 Hi Ali There is one last step to combine them into one signal. That is using our Forecast Splice Function as seen below. You can do this in a separate formula as seen above or combined or by updating your original formula as seen below. Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted January 31, 2020 Share Posted January 31, 2020 Hi Morgan, I think the initial problem is that forecastSplice() seems to combine the value from the original signal and the forecast only for the next 90 (?) days and then stops combining them. Regards, Thorsten Link to comment Share on other sites More sharing options...
Administrators Teddy Posted February 3, 2020 Administrators Share Posted February 3, 2020 Ali, To combine them into one signal you can use the following syntax in the forecast formula from step 2. $signal.forecastConstant(365d) + 0.toSignal().splice($IncreasingTemp,$IncreasingTemp.isValid()) Screen shot for details: Note: This will result in a completely uncertain(dashed) signal. This is because of it's dependence on now() in the first formula. Hope this helps, Teddy 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