DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ChnOffset "mean of values"

Hi together,

 

I dont get it how to put this command right....

 

What do i put as ChnOffsetValue when i use the mode "mean value Offset"??

Command: ChnOffset

Subtracts an offset from the channel values or adds an offset to the channel values.

ReturnValue = ChnOffset(Y, R, ChnOffsetValue, ChnOffsetMode)

Input Parameters

Y Specifies the data channel that contains the y-values.
R Specifies the result channel.
ChnOffsetValue Specifies the number of values that DIAdem averages or the free offset that DIAdem adds to the individual channel values.
ChnOffsetMode Specifies the type of offset correction DIAdem uses.
Enumeration variable
Enumeration variable with the following selection terms
Script Term Interface Term, Explanation
"free offset"
Adding free offset
"first value offset"
Subtracting first channel value
"min. value offset"
Subtracting minimum channel value
"last value offset"
Subtracting last channel value
"max. value offset"
Subtracting maximum channel value
"mean value offset"

Subtracting average of the first n values

0 Kudos
Message 1 of 3
(2,801 Views)

Hey,

 

The choice is yours and really depends on the post-processing you want to apply !

 

When in "mean value offset" mode, that function will take the first n values of your channel, n being the ChnOffsetValue. Then it will calculate the average of those n values and substract the result from all the channel values.

 

Example :

If you have a channel which is [1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; 10] and set the ChnOffsetValue at n = 3, then the average of the first 3 values is (1 + 2 + 3) / 3 = 2. You substract 2 from all your channel values giving you the following result : [-1 ; 0 ; 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8] 

 

Feel free to ask if not clear 🙂

CLAMaxime -- Kudos are a great way to say thank you
Message 2 of 3
(2,792 Views)

Please try to use the DIAlog to figure out what you want to do.

Afterwards press

ctrl+shift+c

inside the dialog.

Now you can paste code into script using ctrl+v which contains the settings of the dialog.

0 Kudos
Message 3 of 3
(2,758 Views)