DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

CHNCFCFILTCALC gives wierd result

Solved!
Go to solution

I am up against a wierd issue when using CHNCFCFILTCALC, in that when I try passing a certain channel to it for filtering I get a a value in the newly created channel description that references a channel 1 higher than the max number of channels.

 

In the data provided I have reduced my complete data set to the minimum and the script provided is just a small portion of my code but it is sufficient to show the issue.

 

Add the Test_mim.tdm to the portal and open the script to produce the issue. If you run it as is you will get a new channel added to the portal called "Distance 3Hz" which will have in its description property "CFC_Free (Input: [1]/Time (1), [1]/ Distance (4))".

Now change the script to use the following by commenting/uncommenting appropriately:

 

oChns.oY1Chn = Cno("Ratio")
oChns.oCurrChnName = "Ratio 3Hz"

Run the script again and now you get a new channel again but this time the description property is "CFC_Free (Input: [1]/Time (1), [1]/ (7))"

 

Can anyone explain why this happens?

I should channel 3 referenced and not 7, as 7 does not exist and I do not get a channel description for the same reason.

 

I am running this on Diadem 2011 (11.3.0f4563 TDM) under Windows 7 x64.

 

(The tdx has to be added as a zip as it is not a valid file to post according to the posting error I get)

 

Thanks.

 

Download All
0 Kudos
Message 1 of 3
(6,354 Views)

Sorry about the script with the missing sub-routine, please try this new one with the missing routine.

 

Also just tried this out on Diadem 2012 SP1 (12.0.1f5283 TDM Service Pack 1) and it does the same thing.

 

Thanks.

0 Kudos
Message 2 of 3
(6,351 Views)
Solution
Accepted by topic author ADobson

I thought I would post an update on this issue in case anyone comes across it in the future.

The issue is that even though there is a channel length matching that of the time series, I failed to realize that

the "NoValues" flag was set on this channel and that is the cause of the failure in the call to CHNCFCFILTCALC.

 

There is an issue with this function in Diadem and until it is fixed the work-around is to ensure that "NoValues" is

not yes before proceeding and calling CHNCFCFILTCALC.

0 Kudos
Message 3 of 3
(6,007 Views)