DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Shift Pressure Data from Global X-axis to Local X-axis

Solved!
Go to solution

I have cylinder pressure data for 3 cylinders in a single channel group that is all relative to the same x-axis in terms of crank angles. Since this x-axis is a global variable, the 3 pressure signals are offset from each other by 360/N degrees where N is the number of cylinders. 

RawPressure.jpg

What I'm trying to do is shift the individual signals to their respective local crank angle (i.e. all the peaks line up and each signal is plotted so 0° crank angle corresponds to that cylinders piston top dead center or roughly the peak pressure).

ShiftedToLocal.jpg

I created the above plot by converting each signal to a waveform using the same x channel, then applying the appropriate "Waveform x-offset" by the required amount (-120 for cylinder 2 and +120 for cylinder 3). The problem with this is that I want to keep all three signals so the x-axis is from -180 to +180. By just doing the offset, cylinder 2 data goes from -300 to +60 and cylinder 3 data goes from -60 to +300. 

 

Is there a way to perform these offsets, but also easily move the data that is less than -180 or greater than +180 to the other end of the channel to keep the data between -180 and +180? I'm looking to do this in an automated script and am trying to keep the computational time relatively short as this will be processing many files (i.e. looking to keep the number of copying blocks of data to a min). If fine with me to keep the channels as numeric channels if that makes the process easier. Is there an easy way to do this, or is it going to just come down to offset data, cut block of data less than -180, then paste that block to the end of the channel?

 

Thanks,

Nick

0 Kudos
Message 1 of 3
(3,161 Views)

Hi Nick,

 

Thank you for your details, if I am understanding correctly, I think that you could do this by subtracting the non-non desired data from the X channel so that you would only have the greater than -180 and less than 180 data. This can be done with the Offset Correction Function .Then you can continue with the method that you used for the waveform x-offset. I hope you could find this information helpful! Let me know if that does not answers your question and I can do my best to help you further.

 

Regards,

Regards,

Sil.VI
0 Kudos
Message 2 of 3
(3,090 Views)
Solution
Accepted by topic author meatballosaurus

Using the Offset Correction Function doesn't work because that is only shifting the y-axis up and down. What I need to do it take N number of rows from the end of the channel and put them at the front or vice versa. 

 

I ended up just using DataBlClpCopy, DataBlClpPaste, and DataBlDel which is working fast enough for what I want to do.

 

Thanks,

Nick

0 Kudos
Message 3 of 3
(3,075 Views)