Albrecht - If you're fitting an exponential decay or growth over time, you could try my PDL::Fit::ExpRate <p3rl.org/PDL::Fit::ExpRate>. It works pretty well as long as the x-data are (roughly) less than 1000 (that may depend on the decay rate; I don't quite recall where it started to mess up). If your x-data get large, I suggest rescaling them by a constant factor so that the min and max to be "close" to zero, and then adjusting the decay rate in light of the rescaling factor. I should probably tighten the code to do that rescaling automatically, but only rarely ran into it in my own use so never felt the gumption to fix it.
I wrote this to fit noisy exponential decays with asymptotic values that we were unable to determine ahead of time. Furthermore, it provides a PDL::PP API so that you can use the fitting functions in other PDL::PP-based modules. :-) David On Tue, Oct 29, 2013 at 7:22 AM, Albrecht I. Schmid < [email protected]> wrote: > Hi, > > I'm using the module for simple exponential fitting, threading over > several thousands (or more) datasets. How do I take advantage of more > than one CPU core? Or is it not possible at the moment? > > Whenever I set > set_autopthread_targ () > to anything greater then 1, I get a segmentation fault while running lev > mar. > > My function is quite simple, > $img has multiple dimensions, the fitting is performed over the first. > > my $res=levmar($p, $img > FUNC=>'function > x=p0*exp(-t/p1); > ', > ); > > Any help appreciated. > > > Ingo > > -- > Dipl.-Ing. Dr. Albrecht Ingo Schmid > Medizinische Universität Wien > Zentrum f. Medizinische Physik und Biomedizinische Technik > Exzellenzzentrum Hochfeld-MR > Lazarettgasse 14 > 1090 Wien > Tel.: +43 1 40400 6461 > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > > -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
