original_docstring: define phase function as sympy object for later evaluation
docstring: define phase function as sympy object for later evaluation
docstring_tokens: define phase function as sympy object for later evaluation
code: def _set_function(self):
          """define phase function as sympy object for later evaluation"""
          theta_0 = sp.Symbol('theta_0')
          theta_ex = sp.Symbol('theta_ex')
          phi_0 = sp.Symbol('phi_0')
          phi_ex = sp.Symbol('phi_ex')
  
          # self._func = sp.Max(self.scat_angle(theta_i,
          #                                    theta_s,
          #                                    phi_i,
          #                                    phi_s,
          #                                    a=self.a), 0.)**self.i  # eq. A13
  
          # alternative formulation avoiding the use of sp.Max()
          #     (this is done because   sp.lambdify('x',sp.Max(x), "numpy")
          #      generates a function that can not interpret array inputs.)
          x = self.scat_angle(theta_0, theta_ex, phi_0, phi_ex, a=self.a)
          self._func = 1. / sp.pi * (x * (1. + sp.sign(x)) / 2.) ** self.i
code_tokens: def _set_function ( self ) : theta_0 = sp . Symbol ( 'theta_0' ) theta_ex = sp . Symbol ( 'theta_ex' ) phi_0 = sp . Symbol ( 'phi_0' ) phi_ex = sp . Symbol ( 'phi_ex' ) x = self . scat_angle ( theta_0 , theta_ex , phi_0 , phi_ex , a = self . a ) self . _func = 1. / sp . pi * ( x * ( 1. + sp . sign ( x ) ) / 2. ) ** self . i
short_docstring: define phase function as sympy object for later evaluation
short_docstring_tokens: define phase function as sympy object for later evaluation
comment: """define phase function as sympy object for later evaluation"""$SEP$# self._func = sp.Max(self.scat_angle(theta_i,$SEP$#                                    theta_s,$SEP$#                                    phi_i,$SEP$#                                    phi_s,$SEP$#                                    a=self.a), 0.)**self.i  # eq. A13$SEP$# alternative formulation avoiding the use of sp.Max()$SEP$#     (this is done because   sp.lambdify('x',sp.Max(x), "numpy")$SEP$#      generates a function that can not interpret array inputs.)