[Fityk-users] Fit outside search scope

46 views
Skip to first unread message

jo...@qgenuity.com

unread,
Aug 5, 2006, 10:13:50 AM8/5/06
to fityk...@lists.sourceforge.net
Hi,

I've just gotten fityk 0.75 and have been trying to fit simple datasets.
Unfortunately, every dataset that I've tried (except the samples that come
with the software) as returned the error "peak outside of search scope"
when I try to "auto add" a function.

I've looked through the manual and online, but there is no mention of what
this error means.

As an example, I've created a sample dataset in CSV format that causes
this error to appear when I attempt to add the "Linear" function.

I'd love to figure out whats going on and get it fixed.

Thanks to anyone who can help.
- Jonathan

testfile.csv

Marcin Wojdyr

unread,
Aug 5, 2006, 10:54:18 PM8/5/06
to fityk...@lists.sourceforge.net
On Sat, 5 Aug 2006, jo...@qgenuity.com wrote:

> I've just gotten fityk 0.75 and have been trying to fit simple datasets.
> Unfortunately, every dataset that I've tried (except the samples that come
> with the software) as returned the error "peak outside of search scope"
> when I try to "auto add" a function.

"auto add" is looking for peaks (BTW the algorithm for detecting peaks
is naive, it looks for the heighest point, but don't know how it can
be improved), and the error means it can't find a peak.
Functions like polynomials should be handled in a different way,
but now everything is treated like a peak.

You can add a linear function using "add-peak mode". It is also
designed for adding bell-shaped functions, but will work with Linear.

Cheers,

Marcin

--
Marcin Wojdyr | http://www.unipress.waw.pl/~wojdyr/

Marcin Wojdyr

unread,
Sep 8, 2006, 9:32:19 AM9/8/06
to fityk...@lists.sourceforge.net

I've added special handling of linear and similar functions.
Now all functions are either "peaks" or "linear". The difference
is only in guessing initial parameters of function.

I think at least one more kind of functions should be handled: "steps".
I know that functions like erf or sigmoid are also popular,
but don't have any experience with it.
Is anyone here using step-like functions for fitting?

now I've read that "sigmoid" can mean any "curve having an "S" shape"
http://en.wikipedia.org/wiki/Sigmoid_function
so perhaps "sigmoid" is a better name for this kind of functions than
"step"?

Marcin

David Hovis

unread,
Sep 8, 2006, 10:47:19 AM9/8/06
to fityk...@lists.sourceforge.net

On Sep 8, 2006, at 9:32 AM, Marcin Wojdyr wrote:

I've added special handling of linear and similar functions.

Now all functions are either "peaks" or "linear". The difference

is only in guessing initial parameters of function.


I think at least one more kind of functions should be handled: "steps".

I know that functions like erf or sigmoid are also popular,

but don't have any experience with it.

Is anyone here using step-like functions for fitting?


now I've read that "sigmoid" can mean any "curve having an "S" shape"

http://en.wikipedia.org/wiki/Sigmoid_function

so perhaps "sigmoid" is a better name for this kind of functions than 

"step"?


Certainly a true "step" profile would never work.  A step function has a discontinuity in the derivative at the step, and that can screw up the L-M fitting algorithm.  

That said, I've come across sigmoid-type functions in the fluorescence work that I've done.  They've usually represented some sort of background that I have to cope with.  I've dealt with them in the past by using 3 or 4 wide Lorentz peaks that are spaced to go off the edge of the dataset.   Which works OK, but a true "sigmoid" function would be easier to cope with.  

The erf function is useful in Materials Science when one is dealing with diffusion profiles.  Unfortunately, there is not a closed-form solution for erf, so it would be difficult to work with in fitting.   I don't know if there is an easy way to compute erf, however.  It might not be that bad.  Certainly the sigmoid function that you linked to would be easier to implement.

--David

Marcin Wojdyr

unread,
Sep 8, 2006, 11:15:23 AM9/8/06
to fityk...@lists.sourceforge.net
On Fri, 8 Sep 2006, David Hovis wrote:

> The erf function is useful in Materials Science when one is dealing with
> diffusion profiles. Unfortunately, there is not a closed-form solution for
> erf, so it would be difficult to work with in fitting. I don't know if
> there is an easy way to compute erf, however. It might not be that bad.
> Certainly the sigmoid function that you linked to would be easier to
> implement.

I've added recently (a few days ago) erf to other basic functions (like
exp, sin, cos, atan) which can be used in user defined function.
The sigmoid function is also possible to be added as UDF.

What I'm looking for are use cases, experimental datasets that are to be
fitted with erf, sigmoid or similar functions. I'd like to play with it
to make fityk more friendly for Erf and Sigmoid people.

Reply all
Reply to author
Forward
0 new messages