DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Macro Examples - PSD and data processing

 
Post new topic   Reply to topic    DPlot Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
analysispros



Joined: 02 Dec 2006
Posts: 1

PostPosted: Thu Dec 07, 2006 11:52 pm    Post subject: Macro Examples - PSD and data processing Reply with quote

Hi there,

Is anyone aware where can I find more DPlot Macro examples?
I am specifically looking for data processing Macros like generating PSD's from time history data and manipulating the time history.
Excel can't handle over 64000 rows and I can not do manipulations there.
There are couple of Macro examples that come with Dplot but it is not enough to teach someone the Macro language from scratch.

Thanks,

Roni Plachta
Back to top
View user's profile Send private message Send e-mail
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2286
Location: Vicksburg, Mississippi

PostPosted: Fri Dec 08, 2006 2:28 pm    Post subject: Reply with quote

There is no macro repository on the site, but if you have specific questions about how to do something I'll be happy to answer them.

To generate the PSD:

FFTMethod(1)
FFT()
EditOperateY("Y^2")

FFTMethod(1) says "Don't pad the input record with 0's out to the next power of 2". As an aside, I may get rid of this option in a future release. For large records with large prime factors, the FFT calculation time can be long, but "long" is getting shorter all the time and there's no mathematical justification for padding with 0's.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jsc



Joined: 02 Dec 2005
Posts: 221

PostPosted: Thu Jan 04, 2007 5:47 pm    Post subject: Reply with quote

David,

DON'T get rid of pad w/zero's option - still very slow (microwave slow) on a large data set (400k points). Just tried it -seemed like 10 times slower, ie, 50 seconds vs. 5 seconds on my 1.73gHz laptop. Not everyone is using 3+ gHz machines to crunch data!

jsc
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2286
Location: Vicksburg, Mississippi

PostPosted: Thu Jan 04, 2007 6:00 pm    Post subject: Reply with quote

Noted Very Happy

As long as you more or less understand what you're doing I suppose there's no harm in it. I should probably add a few examples showing how that option can give less-than-perfect results at some frequencies in certain cases.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jsc



Joined: 02 Dec 2005
Posts: 221

PostPosted: Thu Jan 04, 2007 6:05 pm    Post subject: Reply with quote

Well, I definitely fall into the category of not knowing what I am doing! (Well, sometimes!!)

So examples would be appreciated!
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2286
Location: Vicksburg, Mississippi

PostPosted: Thu Jan 04, 2007 6:24 pm    Post subject: Reply with quote

I'm no expert at FFTs either, but you can experiment with simple stuff like sine waves to see the difference. Just off the top of my head I tried this:

Y=sin(100*pi*X) with 0<X<4 and dX=0.0001

In a perfect world the FFT would show a single spike at 50Hz and 0's everywhere else. And that's very close to what you get if you check "Run the FFT as is". If you pad with 0's (which adds 25535 0's to your 40001 input points) you get the same spike at (close to) 50Hz and smaller nonsense values on either side of 50Hz. This admittedly isn't a bad problem in this case, but I'm reasonably sure I can come up with worse examples once I put my thinking cap on.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> General discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group