OpenMS / OpenMS

The codebase of the OpenMS project
https://www.openms.de
Other
478 stars 318 forks source link

EGHTraceFitter sigma bug #1049

Closed WMGoBuffs closed 10 months ago

WMGoBuffs commented 10 years ago

I've run into an issue with the EGHTraceFitter in FeatureFinderAlgorithmPicked. I can't get sensible output from fits. As an example, try to replace the #if block at line 760 in FeatureFinderAlgorithmPicked with:

#if 1
          TraceFitter<PeakType>* alt_fitter = new GaussTraceFitter<PeakType>();
          Param alt_p;
          alt_p.setValue("max_iteration", max_iterations);

          alt_fitter->setParameters(alt_p);
          alt_fitter->fit(traces);

      std::cout << "EGH:   " << fitter->getCenter() << " " << fitter->getHeight() <<" "<<static_cast<EGHTraceFitter<PeakType>*>(fitter)->getSigma()<<std::endl;
        std::cout << "GAUSS: " << alt_fitter->getCenter() << " " << alt_fitter->getHeight() <<" "<<static_cast<GaussTraceFitter<PeakType>*>(alt_fitter)->getSigma()<<std::endl;
#endif 

(just adding the sigma output to the normal debug output), then you will find that the EGH sigma is always equal to the EGH height. Here is a tiny piece of my output with a small simulated MS1 run: EGH: 681.202 50682.4 50682.4 GAUSS: 681.202 50682.4 3.76351 EGH: 859.372 76963.1 76963.1 GAUSS: 859.372 76963.1 3.31985 EGH: 747.486 52509.5 52509.5 GAUSS: 747.486 52509.5 2.85905 EGH: 852.869 49904.7 49904.7 GAUSS: 852.869 49904.7 2.90028

I've gone hunting in EGHTraceFitter for an obvious bug, but I haven't found it. I hope someone with a better understanding of the fitter algorithm can spot it.

hendrikweisser commented 10 years ago

Very strange. There is a test case for getSigma in the EGHTraceFitter test, that seems to work properly.

What version of OpenMS are you using?

WMGoBuffs commented 9 years ago

Sorry, I missed the notification when you responded. I just tested the above snippet of code with a current development version (1/14/2015). My test was slightly modified, as TraceFitter is no longer a template, but the results were the same.

timosachsenberg commented 10 months ago

stale issue and not confirmed... will close