Skip to main content
1-Visitor
May 13, 2018
Solved

genfit problem

  • May 13, 2018
  • 1 reply
  • 4441 views

Hello,

Could anyone help me with fitting a Gaussian curve to the signals, please?

In the attached worksheet, the function "plane1(k,x1,y1,d,taw)" detects the ultrasonic pressure filed amplitude on two microphones placed on the right and left side of the emitter. The peak of each signal is used to estimate the time of flight (TOF). For more accurate estimation of TOF, I use genfit to fit a Gaussian curve to the signals.

However, the output of the fitting process (result(Data,taw)) does not look right and it sensitively depends on the scanned time range. In the current example, the signals time range do not exceed more than 0.01 s but the Gaussian fit works only when the time range is scanned up to 0.2 s. Is there something wrong?

 

Any suggestion would be highly appreciated,

Payman

Picture1.png

Best answer by Werner_E

Here is the error in your derivative

 B3.png

1 reply

25-Diamond I
May 13, 2018

Looks like there is a problem with your gradient vector ff

If you simply replace it by the function to fit

B1.png

you get a pretty nice fit

B2.png

Werner_E25-Diamond IAnswer
25-Diamond I
May 13, 2018

Here is the error in your derivative

 B3.png

payman1-VisitorAuthor
1-Visitor
May 17, 2018

Thank you very much, Werner, a great help!

My worksheet is now running much smoother. 

 

I ran the worksheet for a wide range of "taw". For some cases, the regression didn't converge and successful fit achieved by increasing the scanning resolution.  I understand the point that increasing the resolution may lead to a better fit but I still don't understand the role of the scanning range which is, in this case, should be much larger than the signal's duration.

 

Do you think it is a normal behavior for the fitting routine?