DSPRelated.com
Forums

kalman filter - python implementation

Started by grzegorz g. June 8, 2010
On 6/9/2010 9:20 AM, Michael wrote:
> Do you really expect help now? > > --- > frmsrcurl: http://compgroups.net/comp.dsp/kalman-filter-python-implementation
Why should he not? There was a time in this country when men wearing beards were pelted by kids in the street. I don't read Python, but from all I hear, it's suitable for this kind of work. Why the verbal brickbats? I note that they're not from anyone I've learned to respect. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On 06/08/2010 10:13 PM, pnachtwey wrote:
> On Jun 8, 8:44 pm, Tim Wescott<t...@seemywebsite.now> wrote: >> I don't do Python. > Python with numpy and scipy is a good alternative to Scilab. > At least there is a real debugger.
I was thinking as I wrote that that maybe I _should_ do Python. But for the moment I don't. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Jerry,

I did not insult the poster or the fact the he is using Python as his programming language of choice - "brickbats" is harsh to say the least.  I am, however, keenly aware of the tone of his last message.

It is okay to be frustrated with a problem you are trying to solve, but extending it into a public forum where you ask individuals for their time and their experiences to help is another.


Michael.
--
Finding Nemo, Sharkbait - "He's probably American!"

---
frmsrcurl: http://compgroups.net/comp.dsp/kalman-filter-python-implementation
On 6/8/2010 9:05 PM, Erik de Castro Lopo wrote:
> Nasser M. Abbasi wrote: > >> On 6/8/2010 6:55 PM, HardySpicer wrote: >> >>> On Jun 9, 7:41 am, "grzegorz g." >>> >>> Why the Hell Python? Why not use Javascript while you're at it! >> >> fyi, Python is used a lot in mathematics software these days. > > But its not used much for DSP code. For DSP its usually C, C++ > or matlab/octave. > >> Sage uses >> Python, Numpy is in Python, as well as SciPy, and many more. Many >> people write scientific software in Python. > > Many people drink too much alcohol and then drive motor vehicles. > That still doesn't make it a good idea. > > Erik
There's no reason not to. It's handy in that it really allows you to bang out algorithms quickly rather than getting caught up in implementational details. Then if the ultimate target is some overpowered Core Duo, you might as well leave it Python (the speed hit's not as bad as you think), or if it's not then you rewrite it in C, C++, Ada, Forth, assembly, VHDL, etc depending on your target, but at least you know that if it doesn't work the error's in the porting, not the algorithm. -- Rob Gaddi, Highland Technology Email address is currently out of order
>ok, I see that you (DSP guys) use a matlab/octave and it's more popular
(in
>this area). However: >1. nobody said why python is so shity in DSP >2. I don't really care - either you can help me or discuss about your >disapprovement for python somewhere else. > >ctrl+c,ctrl+v was a bad idea, so I upload it: > >http://www.2shared.com/file/f_G2QtG6/kalman.html >
Write the exact equations you used for each step, and number the steps. Don't algebraicly change them in any way (i.e., write the equations exactly as implemented). State the precision used. Describe the problem (inputs/outputs/model) of the filter. And if you decide to upload stuff, maybe consider putting it someplace not littered with popups, etc. It doesn't sound like many people wish to look at your code; this is reasonable regardless of the language. If *you* know Python sufficiently well, you should have no trouble taking what you've learned here back into your language of choice.
On 06/09/2010 09:35 AM, Rob Gaddi wrote:
> On 6/8/2010 9:05 PM, Erik de Castro Lopo wrote: >> Nasser M. Abbasi wrote: >> >>> On 6/8/2010 6:55 PM, HardySpicer wrote: >>> >>>> On Jun 9, 7:41 am, "grzegorz g." >>>> >>>> Why the Hell Python? Why not use Javascript while you're at it! >>> >>> fyi, Python is used a lot in mathematics software these days. >> >> But its not used much for DSP code. For DSP its usually C, C++ >> or matlab/octave. >> >>> Sage uses >>> Python, Numpy is in Python, as well as SciPy, and many more. Many >>> people write scientific software in Python. >> >> Many people drink too much alcohol and then drive motor vehicles. >> That still doesn't make it a good idea. >> >> Erik > > There's no reason not to. It's handy in that it really allows you to > bang out algorithms quickly rather than getting caught up in > implementational details. Then if the ultimate target is some > overpowered Core Duo, you might as well leave it Python (the speed hit's > not as bad as you think), or if it's not then you rewrite it in C, C++, > Ada, Forth, assembly, VHDL, etc depending on your target, but at least > you know that if it doesn't work the error's in the porting, not the > algorithm. >
Which is exactly what you'd say about Scilab, Octave, Matlab, etc. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
[cut]
> Can someone help me, cos I have no idea what's wrong ?
Mmm... a bit too much code there :) Why not you try to the same computation using... err... octave?... and check numbers step-by-step to understand where the error is? I do python, so I could help... do you want to share directly .py files?
On Jun 9, 3:18&#4294967295;pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
> On 6/8/2010 6:55 PM, HardySpicer wrote: > > > On Jun 9, 7:41 am, "grzegorz g." > > > Why the Hell Python? Why not use Javascript while you're at it! > > fyi, Python is used a lot in mathematics software these days. Sage uses > Python, Numpy is in Python, as well as SciPy, and many more. &#4294967295;Many > people write scientific software in Python. > > --Nasser
What the hell is Sage and Numpty? Ever heard of Matlab? Far easier.
>Jerry, > >I did not insult the poster or the fact the he is using Python as his
programming language of choice - "brickbats" is harsh to say the least. I am, however, keenly aware of the tone of his last message.
> >It is okay to be frustrated with a problem you are trying to solve, but
extending it into a public forum where you ask individuals for their time and their experiences to help is another.
> > >Michael.
Michael, I also didn't insult anybody and I didn't extend a frustration. I only reacted on offtop (often agressive, without any arguments)
>[cut] >> Can someone help me, cos I have no idea what's wrong ? > > >Mmm... a bit too much code there :) >Why not you try to the same computation using... err... octave?... and >check numbers step-by-step to understand where the error is? > > >I do python, so I could help... do you want to share directly .py >files? >
I apreciate it very much, py file is here (no popups): http://home.elka.pw.edu.pl/~ggwardys/ thx ! :)
On 06/09/2010 12:07 PM, HardySpicer wrote:
> On Jun 9, 3:18 pm, "Nasser M. Abbasi"<n...@12000.org> wrote: >> On 6/8/2010 6:55 PM, HardySpicer wrote: >> >>> On Jun 9, 7:41 am, "grzegorz g." >> >>> Why the Hell Python? Why not use Javascript while you're at it! >> >> fyi, Python is used a lot in mathematics software these days. Sage uses >> Python, Numpy is in Python, as well as SciPy, and many more. Many >> people write scientific software in Python. >> >> --Nasser > > What the hell is Sage and Numpty? Ever heard of Matlab? Far easier.
Until you go to distribute it, and find out that you have to pay enough to buy a really nice car for each copy of Matlab that you give away. Matlab is _expensive_. While it delivers considerable value, there are free alternatives that do as well or better than Matlab. From a standpoint of how much you gain vs. how much you pay, Matlab is _horrible_. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com