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
 Origin Forum
 Integration via base line

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
myrkes Posted - 11/27/2007 : 09:15:36 AM
Origin Version (Select Help-->About Origin): 6.0
Operating System: MS Vista

First of all, hello everyone!

My problem is the following:

I am importing ascii data files from an uv/vis-spektrometer to origin getting a gauss like curve.
Now I want to create a baseline between to minimum impulses (so to call, the left and the right minimum) and then detect the height between the baseline and the highest impuls (highest peak of my curve).
At the moment, Origin runs the baseline following the curce itself. Can I mark two impulses that origin shows me and then lead a baseline through it?
At the moment, I am printing my data and use pencil and ruler, that's not as exact as I would like it.

I hope I could present my problrem clearly (my english could be better) and that anyone can help me with this.

Thank you very much.

Sim

5   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 11/30/2007 : 10:27:03 PM
The code I gave you works on the active dataset which is checked at the bottom of the Data menu. If your graph has multiple datasets just check the one you want to operate on.

Mike Buess
Origin WebRing Member
myrkes Posted - 11/30/2007 : 4:47:08 PM
Hey!

Thank you very much, it's working!

But I have one more question:

If I have more than one graph in my worksheet, is there any way to distinguish between them? Or do I have to use single worksheets for each graph in order to detect the baseline / the height above the baseline using your code?

Nice weekend!

Sim

Mike Buess Posted - 11/27/2007 : 8:03:01 PM
If your baseline is a straight line between two points then you don't really need either tool. The following script uses the data selector markers to mark the baseline endpoints. It's probably easiest to run it from the Custom Routine button as described here...
http://www.originlab.com/www/support/resultstech.aspx?language=english&ID=655

#LabTalk script follows
if( mks1==-1 ) {
ty -b "Select the baseline endpoints first.";
dotool 4; // turn on data selector
break 1; //quit
};
i1=mks1; // save start index
i2=mks2; // save stop index
%W=%H; // save graph name
%F=%C; // save Y dataset name
%A=xof(%C); // corresponding X dataset
win -t data; // create baseline worksheet
%B=%H; // save its name
col(A)[1]=xof(%F)[i1]; // left X
col(A)[2]=xof(%F)[i2]; // right X
col(B)[1]=%F[i1]; // left Y
col(B)[2]=%F[i2]; // right Y
win -a %W; // restore graph
layer -i200 %B_B; // plot baseline
set %B_B -c 2; // color it red
integ -r %B_B %C -b i1 -e i2; // integrate w.r.t. baseline;

# Remaining code sends results to the Results log
type.beginresults();
save=type.redirection(16,3);
type Baseline worksheet: %B;
type Baseline Points: ($(%B_A[1]),$(%B_B[1])) -> ($(%B_A[2]),$(%B_B[2]));
type Peak Statistics:;
type Center\tWidth\tHeight\tArea;
separator 4;
type $(integ.x0)\t$(integ.dx)\t$(integ.y0)\t$(integ.area);
separator 4;
type.redirection=save;
type.endresults();

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/27/2007 9:42:37 PM
myrkes Posted - 11/27/2007 : 5:01:31 PM
Hey Mike,

thanks for your answer.

As I tried to explain above, I already found the baseline-tool. My problem is that the baseline is displayed along the curve, not at the base. Now I want to tell origin to fit the curve through the two minima and only through them.
I added a picture to make it clear.
Are there any settings to be changed? And how?

Greetings

Sim

Mike Buess Posted - 11/27/2007 : 12:29:48 PM
Use the Baseline tool (Tools> Baseline) or the Integration Tool from the File Exchange.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/27/2007 12:42:40 PM

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