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 for Programming
 Forum for Origin C
 Peak fit on many datasets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DaveLangstaff

UK
Posts

Posted - 05/12/2006 :  11:59:05 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:XP

Hi,

I have just started with Origin, so bear with me if this has already been done, but...

I have a data set representing how an XPS peak evolves during an experiment. At present it is held in a worksheet, with the first column representing time points and successive columns intensity values across a spectral bite of the data. I've worked out how to convert this to a matrix and draw a 3D plot showing how the peak evolves in intensity and position during the experiment.

What I would like to do next is perform a peak fit on each row in turn and record basic peak parameters (amplitude and position) into another worksheet, so I can create plots of how the peak moves and changes in amplitude during the experiment.

Is there an easy way of doing such a task or will I need to learn Labtalk or OriginC, or has anyone else solved a similar problem and care to share the code ?

regards

dave Langstaff

Mike Buess

USA
3037 Posts

Posted - 05/12/2006 :  12:08:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,


Try the MultiFit addon from the File Exchange...
http://www.originlab.com/fileexchange/details.aspx?fid=56

...MultiFit's mfseq function will fit all Y columns (not rows) in a worksheet so you'll need some pre-processing. The following LT script converts rows in your original worksheet to Y columns and adds an X column which is necessary for the mfseq function. The X column is given integer values but you can change them however you like.

%W=%H; // save wks name
wo -d; // duplicate
del col(1); // delete first column
menu -e 36466; // transpose
loop(i,1,%W!wks.maxrows) {
wks.col$(i).label$=%W!cell(i,1)$; // exp times to column labels
};
wks.labels(); // show labels
wo -i 0; // insert column in first position
wks.col1.type=4; // make it an X column
%(%H,1)=data(1,wks.maxrows); // give it integer values

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/12/2006 12:29:40 PM
Go to Top of Page

DaveLangstaff

UK
Posts

Posted - 05/15/2006 :  04:46:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike that worked a treat,

I got the download installed and 'hand mangled' the data to get it to work. I'll have a go at labtalk to try and automate the process.

regards

dave L
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