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
 The wrap of a fonction
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sseb22

France
Posts

Posted - 03/12/2004 :  10:28:00 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello

I have data coming from a interferometer. Thus, the graph plotted is oscillating at a quite high frequency and has multiple peaks.
I would now like to plot the wrap (the "envelop" as we say in France), that is the line connecting the tops of the peaks in order to get some kind of Gaussian curve from which I'll be able to obtain its characteristics.

Thank you
Seb


PS : I am using Origin 6.1

sseb22

France
Posts

Posted - 03/12/2004 :  10:41:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Actually, what I'd like to do is to fit a Gaussian curve on the graph but only using the coordinates of the peaks and not the entire data
Go to Top of Page

sseb22

France
Posts

Posted - 03/12/2004 :  11:00:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
i just tried it manually and it is exactly what i need
i just have hundreds of these graphs :/
Go to Top of Page

easwar

USA
1965 Posts

Posted - 03/12/2004 :  11:04:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Seb,

Try this free download from our file exchange server:
http://www.originlab.com/FileExchange/details.aspx?C=5&cid=4&fid=39

It uses Origin C code which you could modify to meet your needs to automate this for multiple graphs etc.

Easwar
OriginLab.



Go to Top of Page

sseb22

France
Posts

Posted - 03/12/2004 :  11:14:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
according to the examples, it should be perfect ! :D

but will it work on Origin 6.1 ?
Go to Top of Page

easwar

USA
1965 Posts

Posted - 03/12/2004 :  2:42:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Seb,

My apologies for not mentioning this before - that file from the File Exchange area works only in version 7.0 or higher since it uses Origin C code.

The algorithm used in finding the envelope points is as follows. You could try implementing this using LabTalk script which will then work in version 6.1:

1> divide the data into n bins, where n is a parameter passed to the function
2> in each bin, pick the top m points where m is also a parameter passed to the function
3> take all the points thus chosen, to give you the envelope points
4> you can then create a dataset that either just interpolates these points, or does spline fitting to them etc to create a smooth envelope curve

By varying parameters n and m, user can tune the function to return the optimum envelope curve for many different datasets.

Hope this helps.

Easwar
OriginLab.

Go to Top of Page

sseb22

France
Posts

Posted - 03/15/2004 :  03:24:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
yes it does

i'll try and see how Labtalk works or do my own program

thanx
Seb
Go to Top of Page

sseb22

France
Posts

Posted - 03/17/2004 :  11:48:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
i did a program in C

am I allowed to display it here in order to get some help ?
Go to Top of Page

sseb22

France
Posts

Posted - 03/18/2004 :  05:19:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
that was it !!


my first program used the same algorithm as yours but only with the 3rd argument = 1
as you could see, it doesn't work

however, when 2 is entered, it works quite well

but i don't seem to make it work with the 3rd argument = 3.
Go to Top of Page

sseb22

France
Posts

Posted - 03/18/2004 :  07:42:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
sorry, my mistake

works also with 3
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