DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

interpolate values , "The selected channels are different lengths"

 

 

Hello,

 

I'm running a script to convert all unwanted zero values to NoValue  this works fine I then use ChnNovHandle to interpolate the missing values, but sometimes I get the following error message.  I think it has to do with the Time channel having 1 extra value,  is there a way correct this in the script,  also I would like to save the interpolated channel into a separate group  eg interpolated/HP Power zr ,  buts its not clear how I can define this?

 

 

Thanks

Nick

 

nickom_1-1700144976739.png

 

 

nickom_2-1700145346513.png

 

 

0 Kudos
Message 1 of 2
(550 Views)

Hello Nick,

the channels must have the same length for this operation. You can shorten the channel length like this, for example:

 

Data.Root.ChannelGroups(1).Channels("myTime").Properties("length").Value = Data.Root.ChannelGroups(1).Channels("myTime").Properties("length").Value-1

 

The ChnNovHandle() method writes the result to the active channel group.
You can activate the desired group in this way:

 

Call Data.Root.ChannelGroups("interpolated").Activate()

Greetings

DIAdemo 

0 Kudos
Message 2 of 2
(506 Views)