03-11-2008 12:32 PM
03-12-2008 10:04 AM
Hi Wayne,
As far as I know, the only way to limit the regression is to filter the data channel so that the undesired values are set to NoValues or deleted. You could use a Calculator expression to do this quite easily-- let me know if you need assistance with that. The result of the Calculator execution could be a new filtered channel or the same channel with edited values.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-12-2008 10:21 AM
I think I have an idea as to what to do. I still need to retain the integrity of the original data, therefore I will be creating new channels.
In a script you could do a loop looking for a value that is within the range then copy that data set to the new channel. Are there any builtin commands that would make this process quicker or more streamlined? All I know to do is to look at each value with CHD and make the decision from there.
Thanks,
Wayne
03-13-2008 10:38 AM
Hi Wayne,
For this use case I'm going to recommend the old FormulaCalc() function and syntax instead of the newer ChnCalculate():
R1 = -0.5 ' lower Y threshold
R2 = 1.5 ' upper Y threshold
L1 = CNo("[2]/Noise_3") ' raw data channel
Call FormulaCalc("Ch('Fit Data'):= Ch(L1) + NoValue*(Ch(L1)<R1) + NoValue*(Ch(L1)>R2)")
Ask if you have additional questions,
Brad Turpin
Product Support Engineer
National Instruments