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

Qiang

UK
16 Posts

Posted - 07/22/2003 :  06:25:25 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I have been asked to extend the capabilities of the FFT funtion in OriginPro. The task involves a worksheet containing several sweeps of data. Each sweep contains several columns of data. The aim is that the user chooses/clicks 2/3 columns in the first sweep for example the first 2 columns out of 5 columns in each sweep and Origin is able to perform FFT to each of the first 2 columns for all the sweeps automatically without the user manually selecting the columns each time for each sweep.

At the moment I do not know whether OriginPro will allow me to do this. For example, is it possible to detect which columns the user clicked on? Also is it possible to incorporate the FFT function into a custom made program? It seems that maybe I could get the program to perform FFT to each sweep automatically but that will require the program to know the points above. Is it possible to obtain the source code of the FFT function that is already inside Origin?

This sounds quite a challenging task. The aim is to then tocollect all the data columns FFT outputs an put them together in another work sheet. I sincerely believe that OriginPro was not created to be pushed this far and the documentation is very limited. I'd be grateful if anyone could let me know either way whether this is feasible.

thanks

Qiang

easwar

USA
1965 Posts

Posted - 07/23/2003 :  1:49:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Qiang,

First of all, the things you mention here can be done in regular Origin as well - OriginPro is not needed.

You can detect selection using script or Origin C. The code pasted below shows how to get selection on worksheet using an Origin C funciton.

As for FFT, look up documentation on the LabTalk FFT object. This object can be programmed in LabTalk script to perform FFT, or it can be programmed directly in Origin C using statements such as:
LabTalk.FFT.Data$="data1_a"

Also, the NAG library offers FFT routines that can be directly called from Origin C functions.

Hope this information helps you. If you need more extensive help on prgramming etc. it may be best for you to get in touch with your local tech support office.

Easwar
OriginLab.


void test()
{
Worksheet wks = Project.ActiveLayer();
if(wks)
{
int c1, c2, r1, r2;
int seltype = wks.GetSelection(c1, c2, r1, r2);
if(WKS_SEL_NONE == seltype)
{
printf("Nothing was selected in the worksheet!\n");
return;
}
printf("Columns/Rows of selection: c1 = %d\tc2 = %d\tr1 = %d\tr2 = %d\n", c1, c2, r1, r2);
}
else
printf("Active page is not a worksheet!\n");
}


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