Re: [casper] Green FFT fixed

2010-06-22 Thread Jason Manley
These were accumulated (a few hundred FFT output specra). A single FFT output would never look so clean, which makes it hard to see an actual spectrum. Jason On 23 Jun 2010, at 02:01, wrote: Hi Jason: The plots you sent is a accumulated result or it is a single FFT output. Thanks

Re: [casper] Green FFT fixed

2010-06-22 Thread Wan.Cheng
Hi Jason: The plots you sent is a accumulated result or it is a single FFT output. Thanks Wan -Original Message- From: Jason Manley [mailto:jasonman...@gmail.com] Sent: Thursday, 17 June 2010 7:31 PM To: Cheng, Wan (CASS, Marsfield) Cc: casper@lists.berkeley.edu Subject: Re: Green FFT

Re: [casper] Green FFT fixed

2010-06-17 Thread Jason Manley
"for i in [set]" is probably one of the most universally recognized constructs in all of computer science! (Unsubstantiated generalization alert:) Anyone who's been programming for more than a couple of weeks who sees a variable named "i" inside of a loop instantly knows its general purpose and be

Re: [casper] Green FFT fixed

2010-06-17 Thread Jason Manley
Moral: Use str2num or str2mat. I don't know why we need a custom tostring function. Sometimes this function needs to accept strings themselves and just pass these through. The "tostring" function just wraps num2str in certain cases. It's nothing special, but it helps to maintain scripts

Re: [casper] Green FFT fixed

2010-06-17 Thread Wan.Cheng
Hi Jason: Thanks. This will also explain why the latest casper library cannot work with me. But it seems that FFT block can always work when I setup it up at first time. But I cannot modify it because it will be broken. Cheers Wan -Original Message- From: Jason Manley [mailto:jasonma

Re: [casper] Green FFT fixed

2010-06-17 Thread dana whitlow
I agree, too. But years ago when I started programming in C, I wanted to keep i & j available for other purposes without confusing myself, so early on I formed the habit of using k, l, & m as loop variables. I still do so to this day. Dana Andrew Lutomirski wrote: On Thu, Jun 17, 2010 at

Re: [casper] Green FFT fixed

2010-06-17 Thread David MacMahon
That's a great idea, Jonathan! I was going to suggest adding "i = sqrt(-1);" to scripts that need to ensure that i had not been redefined, but I like this convention better. It's too bad that Matlab didn't start out enforcing this from the start and instead allowed an unadorned, uninitia

Re: [casper] Green FFT fixed

2010-06-17 Thread Mark Wagner
One could also use the complex() function to avoid ambiguity. Mark On Thu, Jun 17, 2010 at 11:06 AM, Jonathan Landon < silicondiode2...@yahoo.com> wrote: > Recent versions of Matlab encourage use of a modified variable name for > sqrt(-1) -- i.e., 1i and 1j instead of i and j. Using i,j as loo

Re: [casper] Green FFT fixed

2010-06-17 Thread Jonathan Landon
Recent versions of Matlab encourage use of a modified variable name for sqrt(-1) -- i.e., 1i and 1j instead of i and j.  Using i,j as loop variables is fine as long as complex numbers everywhere else are 1i or 1j.  Users familiar with Matlab have learned never to use i,j as loop variables since

Re: [casper] Green FFT fixed

2010-06-17 Thread Andrew Lutomirski
On Thu, Jun 17, 2010 at 12:47 PM, Peter Williams wrote: > On Thu, 2010-06-17 at 15:54 +0200, Jason Manley wrote: >> ... >> 1st year comp.sci classes taught us to use descriptive variable names. >> That includes iterators. It's sound advice that could have avoided a >> lot of trouble and saved a lo

Re: [casper] Green FFT fixed

2010-06-17 Thread Peter Williams
On Thu, 2010-06-17 at 15:54 +0200, Jason Manley wrote: > ... > 1st year comp.sci classes taught us to use descriptive variable names. > That includes iterators. It's sound advice that could have avoided a > lot of trouble and saved a lot of time. I think we should avoid using > i and j as var

Re: [casper] Green FFT fixed

2010-06-17 Thread melvyn wright
Hi Jason, wow . reminds me of when I used IF in a script on the control computer at hatcreek several decades ago, and all hell broke loose, which required re-booting, because I had unwittingly destroyed the operating system by redefining IF, THEN, ELSE logic. Now IF is a very sensible name for

Re: [casper] Green FFT fixed

2010-06-17 Thread Jason Manley
No, the problem is not with scope. You can build designs with two different FFTs no problem. The issue was that some of the scripts would use i and j as iterators, and then something like a=1+2*i wouldn't return the complex number expected. We've side-stepped the problem by saying "a=1+2i"

Re: [casper] Green FFT fixed

2010-06-17 Thread Glen Langston
> Hello CASPERites > > Many of you will be aware of a long-standing bug in the FFT libraries > which caused degraded performance. We believe that we've fixed it. > Andrew Martens and myself performed some repairs earlier this week and > have checked-in our script changes to the CASPER subversion (n

Re: [casper] Green FFT fixed

2010-06-17 Thread Jason Manley
No, the FFT redraw scripts used i and j internally, which broke things too. So you're affected! You need to recompile your FFT. Jason On 17 Jun 2010, at 11:27, wrote: Hi Jason: I guess if I build my own blocks with 'i' or 'j' as a loop, it would be a problem. But if I If I did not write

Re: [casper] Green FFT fixed

2010-06-17 Thread Wan.Cheng
Hi Jason: I guess if I build my own blocks with 'i' or 'j' as a loop, it would be a problem. But if I If I did not write any matlab scripts and only use the casper library standard green block, I would not be affect. Is this right? And could you clarify in which case user can overwrite the casp

[casper] Green FFT fixed

2010-06-17 Thread Jason Manley
Hello CASPERites Many of you will be aware of a long-standing bug in the FFT libraries which caused degraded performance. We believe that we've fixed it. Andrew Martens and myself performed some repairs earlier this week and have checked-in our script changes to the CASPER subversion (now g