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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Integration via base line
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

myrkes

Germany
Posts

Posted - 11/27/2007 :  09:15:36 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 11/27/2007 :  12:29:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

myrkes

Germany
Posts

Posted - 11/27/2007 :  5:01:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/27/2007 :  8:03:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

myrkes

Germany
Posts

Posted - 11/30/2007 :  4:47:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/30/2007 :  10:27:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000