Jump to content

Move signal 90 minutes but put sample at specific time


Go to solution Solved by Thorsten Vogt,

Recommended Posts

I have a signal for the production LAST hour. I want to create "Hourly production" from this. 

Since the samples in the raw data (below image) is not always right on the whole hour I want to use the value from this signal on the half hours and shift that value 90 minutes back to the previous whole hour.

So I want the value of the step signal below from 14:30 to be placed at exactly 13:00 in my new signal. And 15:30 -> 14:00 and so on.

How would i go about that?

image.thumb.png.6d5aa756d1ac800b0377181165bd101b.png

  • Thanks 1
Link to comment
Share on other sites

  • Solution

Hi Johannes,

maybe one quick way you could try:

First you can move the signal by a longer period than the 90 minutes to make sure the value of the signal is present at the timestamp of the whole hour. Here I used

$signal.move(-100min)


image.thumb.png.42717b4692413c0ba4e79061dedd598d.png

Next you can resample the moved signal:

$movedSignal.resample(1h)

image.thumb.png.0dde241814fe7824567fafc1ca236ef5.png

Regards,

Thorsten

  • Thanks 2
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...