DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Levelling line profiles

Solved!
Go to solution

Hi there,

 

I am trying to write a script capable of levelling some (filtered) line scans recorded with a surface profilometer.


I Would like to compute a line of best fit calculated only over two sections of the line scan (In the attached example considering elements 1-4000 and 17500 to 20500). The line of best fit should then be adjusted so that it has got the same number of elements as the original line scan. This would then allow me to subtract the original data from the line of best fit to tilt the data.

 

If you have got any suggestions on how to do this, or have got a valid alternative that should do the job please let me know!

 

 

Thank you.
Andrea

0 Kudos
Message 1 of 2
(2,095 Views)
Solution
Accepted by topic author Andrea12345

Hi Andrea,

 

The Statistics dialog in the ANALYSIS panel has the ability to run calculations over specific row ranges.  Both the "Offset Correction" dialog or the "Linear Scaling" dialog in the ANALYSIS panel would enable you to subtract the same constant from all of your data points.  If you don't want to subtract that constant from the middle area of your raw data, then we probably do need to create a channel with the constant value in those 2 row ranges and NoValues in the middle region, then use the (channel) "Subtract" dialog in the ANALYSIS panel to subtract the offset constant from just those 2 row ranges.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 2 of 2
(2,074 Views)