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
 FWHM
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a_user

USA
0 Posts

Posted - 08/18/1998 :  2:14:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I want to extract the FWHM of a set of very dissymetric peaks of which I know
no analytical expression. Is there an elegant possibity to get the 2 X values
corresponding to y=C where C is a constant? I think about drawing an
horizontal
line at the chosen C and find the 2 intersections. Is that possible? How?

Thanks,

Paul

PS: my Origin version is 4.1

a_user

USA
0 Posts

Posted - 08/18/1998 :  4:31:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

FWHM - Finding X and Y values in a Graph

I assume by FWHM you mean Full Width at Half Maxima. In this case the task is therefore to find a Y value which represents the Half Maxima, and then find the two X values of your data at this Y value to determine the Full Width.


While it is easy to read the X and Y values off a Graph in Origin,
Use the Data Reader Tool on a Graph and X and Y values will be shown in the Data Reader window.
and it is easy to get an interpolated Y value from an arbitrary X value of a plotted dataset,
With a plot of a dataset active (say we've plotted Data1_B as a Line or Line+Symbol plot and have a Line Connect setting of Straight or Spline), open the Script window and type:

'Data1_B(13.5)=' and press the Enter Key and Origin will give the Y value of Data1_B at X=13.5 even if 13.5 is not on the X dataset. This is done by an interpolation based on the line connect method.


it is a bit harder to get an X value at a particular Y value of a given dataset.


The simplest and most direct approach is to use the Data Reader to find your peak minima and maxima, calculate the Half Maxima and then use the Data Reader to find your two X values at the Half Maxima and calculate Full Width. If your data is too sparse to give you accurate values you can also use the Screen Reader which doesn't have to 'lock on' to real datapoints or do an Analysis:Inter/Extrapolate to generate denser data.

A more elegant solution is to use LabTalk and program the Data Reader or Screen Reader to accept user input and make the calculations for you.

Here is an example that gets as far as calculating the Half Maxima by prompting the user for the left and right baselines and the peak:


count=0;
create PTS 3;
def calcFWHM {
dotool 0;
type -q;
HM=((PTS[1]+PTS[2])/2+PTS[3])/2;
// routine to calculate Full Width at Half Maxima would go here
}
dotool 3 "Select Left baseline" "Select Right baseline" "Select Peak" " ";
dotool -r %C;
def pointproc {
count+=1;
PTS[count]=y;
if(count>=3) {
calcFWHM;
} else {
dotool -next;
}
}

The incomplete script that should calculate the Full Width can make use of the following LabTalk functions:


  • xvalue(RowIndex,DataSet) returns the xvalue of Dataset at row RowIndex
  • Dataset(XValue) returns an interpolated Y value for the plotted Dataset at the X position XValue

The completed script would have to take into consideration factors such as:


  • Whether the data is sorted or not
  • How noisy the data is

The script would not be simple and would require some experience with LabTalk programming.
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