double SBConvolve::SBConvolveImpl::xValue(const Position<double>& pos) const { // Perform a direct calculation of the convolution at a particular point by // doing the real-space integral. // Note: This can only really be done one pair at a time, so it is // probably rare that this will be more efficient if N > 2. // For now, we don't bother implementing this for N > 2. if (_plist.size() == 2) { const SBProfile& p1 = _plist.front(); const SBProfile& p2 = _plist.back(); if (p2.isAxisymmetric()) return RealSpaceConvolve(p2,p1,pos,_fluxProduct,this->gsparams); else return RealSpaceConvolve(p1,p2,pos,_fluxProduct,this->gsparams); } else if (_plist.empty()) return 0.; else if (_plist.size() == 1) return _plist.front().xValue(pos); else throw SBError("Real-space integration of more than 2 profiles is not implemented."); }
double SBAutoCorrelate::SBAutoCorrelateImpl::xValue(const Position<double>& pos) const { SBProfile temp = _adaptee.rotate(180. * degrees); return RealSpaceConvolve(_adaptee,temp,pos,getFlux(),this->gsparams); }
double SBAutoConvolve::SBAutoConvolveImpl::xValue(const Position<double>& pos) const { return RealSpaceConvolve(_adaptee,_adaptee,pos,getFlux(),this->gsparams); }
double SBAutoCorrelate::SBAutoCorrelateImpl::xValue(const Position<double>& pos) const { SBProfile temp = _adaptee.transform(-1., 0., 0., -1.); return RealSpaceConvolve(_adaptee,temp,pos,getFlux(),this->gsparams); }