Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

[Phys-L] Poisson curve-fitting code



On 10/15/21 3:42 PM, Paul Nord asked:
Would you be willing to share your code?

Here:
https://www.av8n.com/cgit/poissfit/

No guarantees. It works for me on the Unbuntu distribution.
You will have to install the 'libnlopt-cxx-dev' package.

Funny story: When I was a freshman in college, I wrote a
bidirectional interactive computer-to-computer communication
program. This was many years before kermit.

I wrote it between dinner and midnight one day. It was the
first assembly-language program I had ever written, and
approximately the second program of any kind. It was intended
for my own use only, but other folks started using it.

Four years later, people still using it. A lot of people.
For years on end they kept bugging me:
−− Please add such-and-such additional features.
++ Why don't you do it yourself?
−− Nobody can figure out how it works. I looked at the code.
Comments start with a semicolon, and there's not a single
semicolon in the whole file.
++ Why don't you rewrite it from scratch?
−− That would be too much work. It works well enough as it is.

I took a lesson from this. Even if you are in a hurry, even
if you think the code will not be used more than once, it pays
to write clean, maintainable, extensible, well-documented code.
That slows things down by a factor of 2, but if there's any
chance that the code will be re-used, it's worth it.

The Poisson code does not live up to this standard. Some key
features (such as singular value decomposition) are missing,
and some of the features that do exist need to be rewritten.

HOWEVER .... I realize there is time value in letting people
play with it as-is. So here you go. Let me know if you have
questions. There's no guarantee I will have good answers, but
there's no harm in asking.