Changeset 2675


Ignore:
Timestamp:
10/19/12 19:06:59 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4429

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

convSupport for gauss and gjinc is set to ceil of truncation
radius, which was round before.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFitter.cpp

    r2666 r2675  
    3838#include <scimath/Functionals/CompoundFunction.h>
    3939#include <scimath/Functionals/Gaussian1D.h>
    40 #include <scimath/Functionals/Lorentzian1D.h>
     40//#include <scimath/Functionals/Lorentzian1D.h>
     41#include "Lorentzian1D.h"
    4142#include <scimath/Functionals/Sinusoid1D.h>
    4243#include <scimath/Functionals/Polynomial.h>
     
    117118  Gaussian1D<Float>* g = 0;
    118119  for (uInt i=0; i<n;i++) {
    119     g = dynamic_cast<Gaussian1D<Float>* >(funcs_[i]);
    120     if (g) {
    121       const GaussianSpectralElement *gauss =
    122         dynamic_cast<const GaussianSpectralElement *>(listGauss[i]) ;
    123       (*g)[0] = gauss->getAmpl();
    124       (*g)[1] = gauss->getCenter();
    125       (*g)[2] = gauss->getFWHM();     
    126       /*
    127       (*g)[0] = listGauss[i].getAmpl();
    128       (*g)[1] = listGauss[i].getCenter();
    129       (*g)[2] = listGauss[i].getFWHM();
    130       */
    131     }
     120//     g = dynamic_cast<Gaussian1D<Float>* >(funcs_[i]);
     121//     if (g) {
     122//       const GaussianSpectralElement *gauss =
     123//      dynamic_cast<const GaussianSpectralElement *>(listGauss[i]) ;
     124//       (*g)[0] = gauss->getAmpl();
     125//       (*g)[1] = gauss->getCenter();
     126//       (*g)[2] = gauss->getFWHM();     
     127//       /*
     128//       (*g)[0] = listGauss[i].getAmpl();
     129//       (*g)[1] = listGauss[i].getCenter();
     130//       (*g)[2] = listGauss[i].getFWHM();
     131//       */
     132//     }
    132133  }
    133134  estimate_.resize();
  • trunk/src/STGrid.cpp

    r2674 r2675  
    18121812      }
    18131813    }     
    1814     convSupport_ = (Int)(truncate+0.5);
     1814    //convSupport_ = (Int)(truncate+0.5);
     1815    convSupport_ = (Int)(truncate);
     1816    convSupport_ += (((truncate-(Double)convSupport_) > 0.0) ? 1 : 0);
    18151817    Int convSize = convSampling_ * ( 2*convSupport_ + 2 ) ;
    18161818    convFunc.resize( convSize ) ;
     
    18601862      }
    18611863    }     
    1862     convSupport_ = (truncate >= 0.0) ? (Int)(truncate+0.5) : (Int)(2*pixelJW+0.5);
     1864    //convSupport_ = (truncate >= 0.0) ? (Int)(truncate+0.5) : (Int)(2*pixelJW+0.5);
     1865    Double convSupportF = (truncate >= 0.0) ? truncate : (2*pixelJW);
     1866    convSupport_ = (Int)convSupportF;
     1867    convSupport_ += (((convSupportF-(Double)convSupport_) > 0.0) ? 1 : 0);
    18631868    Int convSize = convSampling_ * ( 2*convSupport_ + 2 ) ;
    18641869    convFunc.resize( convSize ) ;
Note: See TracChangeset for help on using the changeset viewer.