The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Average of selected range for normalization

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jenskruse Posted - 01/15/2009 : 08:46:19 AM
Origin Ver. and SR (Select Help-->About Origin):
Operating System: 8Pro SR4

Hi,

Is it somehow possible to select with the data selector tool a range in a spectrum and calculate the average value of this range and using then this value to normalize the whole sectrum? I have a work around with many clics but it is very time consuming .

thanks a lot for our help,

cheers,
Jens
3   L A T E S T    R E P L I E S    (Newest First)
jenskruse Posted - 01/16/2009 : 09:53:52 AM
I works !
Thanks for your help.

jens
greg Posted - 01/15/2009 : 3:03:50 PM
This script will run the Data Selector tool. When you are satisfied with the position of the Data Markers, press Enter to normalize the curve.

dotool 4; // Data Selector mode
def pointproc {
// remember size
get %C -e last;
// set limits by tool
set %C -bs mks1;
set %C -es mks2;
// calculate mean of this range
sum(%C);
// remove Data Markers
mks1 = -1;
// Restore full range
set %C -b 1;
set %C -e last;
// Normalize
%C /= sum.mean;
// shut off Data Selector
dotool 0;
}
cpyang Posted - 01/15/2009 : 12:55:25 PM
The following code should work:


	// save the current marker positions
	int nLeft = MKS1;
	int nRight= MKS2;

	sum(%C);
	
	MKS1=-1;//remove the data markers
	%C/=sum.mean;// normalize whole curve
	MKS1=nLeft;
	MKS2=nRight; // restore the data markers


CP

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000