diff --git a/integrators/_tpsx.py b/integrators/_tpsx.py index 5005a0d2a645730d3867f3514863db05eaf8270d..c3b20f2f43d4b3887d6fb7aa68168bd0fb134c67 100644 --- a/integrators/_tpsx.py +++ b/integrators/_tpsx.py @@ -351,7 +351,7 @@ class TPSX(_integrator._Integrator, \ #------------------------------------------------------------------------------# - def _R_proj(cls, x, y, z): + def _R_proj(self, x, y, z): epsilon = 1.0e-12 x, y, z = self._Q_axisT([x, y, z]) diff --git a/integrators/tps1pf.py b/integrators/tps1pf.py index 91f06348c2529ceba9d85cc08a59cc2a791938e8..3e1703e87fbaca68376b215ec3aecec3bcc71f76 100644 --- a/integrators/tps1pf.py +++ b/integrators/tps1pf.py @@ -38,15 +38,37 @@ class TPS1PF(tps1.TPS1): #------------------------------------------------------------------------------# - @classmethod - def _R_proj(cls, x, y, z): + def _H_proj(self, x, y, z): from scipy import sqrt from . import _tpsx - epsilon = 1.0e-12 tmp = sqrt(x*x + y*y + z*z) - return _tpsx.TPSX._R_proj(x/tmp, y/tmp, z/tmp) + return _tpsx.TPSX._H_proj(self, x/tmp, y/tmp, z/tmp) + + +#------------------------------------------------------------------------------# + + + def _R_proj(self, x, y, z): + from scipy import sqrt + from . import _tpsx + + tmp = sqrt(x*x + y*y + z*z) + + return _tpsx.TPSX._R_proj(self, x/tmp, y/tmp, z/tmp) + + +#------------------------------------------------------------------------------# + + + def _S_proj(self, x, y, z): + from scipy import sqrt + from . import _tpsx + + tmp = sqrt(x*x + y*y + z*z) + + return _tpsx.TPSX._S_proj(self, x/tmp, y/tmp, z/tmp) #------------------------------------------------------------------------------#