original_docstring: 
          Definition of the legendre-expansion of the BRDF
  
          .. note::
              The output represents the legendre-expansion as needed to
              compute the fn-coefficients for the chosen geometry!
              (http://rt1.readthedocs.io/en/latest/theory.html#equation-fn_coef_definition)
  
              The incidence-angle argument of the legexpansion() is different
              to the documentation due to the direct definition of the argument
              as the zenith-angle (t_0) instead of the incidence-angle
              defined in a spherical coordinate system (t_i).
              They are related via: t_i = pi - t_0
  
  
          Parameters
          ----------
          t_0 : array_like(float)
                array of incident zenith-angles in radians
  
          p_0 : array_like(float)
                array of incident azimuth-angles in radians
  
          t_ex : array_like(float)
                 array of exit zenith-angles in radians
  
          p_ex : array_like(float)
                 array of exit azimuth-angles in radians
  
          geometry : str
              4 character string specifying which components of the angles should
              be fixed or variable. This is done to significantly speed up the
              evaluation-process of the fn-coefficient generation
  
              The 4 characters represent in order the properties of:
              t_0, t_ex, p_0, p_ex
  
              - 'f' indicates that the angle is treated 'fixed'
                (i.e. as a numerical constant)
              - 'v' indicates that the angle is treated 'variable'
                (i.e. as a sympy-variable)
              - Passing  geometry = 'mono'  indicates a monstatic geometry
                (i.e.:  t_ex = t_0, p_ex = p_0 + pi)
                If monostatic geometry is used, the input-values of t_ex and p_ex
                have no effect on the calculations!
  
              For detailed information on the specification of the
              geometry-parameter, please have a look at the
              "Evaluation Geometries" section of the documentation
              (http://rt1.readthedocs.io/en/latest/model_specification.html#evaluation-geometries)
  
          Returns
          -------
          sympy - expression
              The legendre - expansion of the BRDF for the chosen geometry
  
          
docstring: Definition of the legendre-expansion of the BRDF
  note::
  The output represents the legendre-expansion as needed to
  compute the fn-coefficients for the chosen geometry!
  
  The incidence-angle argument of the legexpansion() is different
  to the documentation due to the direct definition of the argument
  as the zenith-angle (t_0) instead of the incidence-angle
  defined in a spherical coordinate system (t_i).
  They are related via: t_i = pi - t_0
  
  Parameters
  
  t_0 : array_like(float)
  array of incident zenith-angles in radians
  
  p_0 : array_like(float)
  array of incident azimuth-angles in radians
  
  t_ex : array_like(float)
  array of exit zenith-angles in radians
  
  p_ex : array_like(float)
  array of exit azimuth-angles in radians
  
  geometry : str
  4 character string specifying which components of the angles should
  be fixed or variable. This is done to significantly speed up the
  evaluation-process of the fn-coefficient generation
  
  
  
  
  
  For detailed information on the specification of the
  geometry-parameter, please have a look at the
  "Evaluation Geometries" section of the documentation
  
  Returns
  
  expression
  The legendre - expansion of the BRDF for the chosen geometry
docstring_tokens: Definition of the legendre - expansion of the BRDF note :: The output represents the legendre - expansion as needed to compute the fn - coefficients for the chosen geometry! The incidence - angle argument of the legexpansion () is different to the documentation due to the direct definition of the argument as the zenith - angle ( t_0 ) instead of the incidence - angle defined in a spherical coordinate system ( t_i ) . They are related via : t_i = pi - t_0 Parameters t_0 : array_like ( float ) array of incident zenith - angles in radians p_0 : array_like ( float ) array of incident azimuth - angles in radians t_ex : array_like ( float ) array of exit zenith - angles in radians p_ex : array_like ( float ) array of exit azimuth - angles in radians geometry : str 4 character string specifying which components of the angles should be fixed or variable . This is done to significantly speed up the evaluation - process of the fn - coefficient generation For detailed information on the specification of the geometry - parameter please have a look at the " Evaluation Geometries " section of the documentation Returns expression The legendre - expansion of the BRDF for the chosen geometry
code: def legexpansion(self, t_0, t_ex, p_0, p_ex, geometry):
          """
          Definition of the legendre-expansion of the BRDF
  
          .. note::
              The output represents the legendre-expansion as needed to
              compute the fn-coefficients for the chosen geometry!
              (http://rt1.readthedocs.io/en/latest/theory.html#equation-fn_coef_definition)
  
              The incidence-angle argument of the legexpansion() is different
              to the documentation due to the direct definition of the argument
              as the zenith-angle (t_0) instead of the incidence-angle
              defined in a spherical coordinate system (t_i).
              They are related via: t_i = pi - t_0
  
  
          Parameters
          ----------
          t_0 : array_like(float)
                array of incident zenith-angles in radians
  
          p_0 : array_like(float)
                array of incident azimuth-angles in radians
  
          t_ex : array_like(float)
                 array of exit zenith-angles in radians
  
          p_ex : array_like(float)
                 array of exit azimuth-angles in radians
  
          geometry : str
              4 character string specifying which components of the angles should
              be fixed or variable. This is done to significantly speed up the
              evaluation-process of the fn-coefficient generation
  
              The 4 characters represent in order the properties of:
              t_0, t_ex, p_0, p_ex
  
              - 'f' indicates that the angle is treated 'fixed'
                (i.e. as a numerical constant)
              - 'v' indicates that the angle is treated 'variable'
                (i.e. as a sympy-variable)
              - Passing  geometry = 'mono'  indicates a monstatic geometry
                (i.e.:  t_ex = t_0, p_ex = p_0 + pi)
                If monostatic geometry is used, the input-values of t_ex and p_ex
                have no effect on the calculations!
  
              For detailed information on the specification of the
              geometry-parameter, please have a look at the
              "Evaluation Geometries" section of the documentation
              (http://rt1.readthedocs.io/en/latest/model_specification.html#evaluation-geometries)
  
          Returns
          -------
          sympy - expression
              The legendre - expansion of the BRDF for the chosen geometry
  
          """
          assert self.ncoefs > 0
  
          theta_s = sp.Symbol('theta_s')
          phi_s = sp.Symbol('phi_s')
  
          NBRDF = self.ncoefs
          n = sp.Symbol('n')
  
          # define sympy variables based on chosen geometry
          if geometry == 'mono':
              assert len(np.unique(p_0)) == 1, 'p_0 must contain only a ' + \
                  'single unique value for monostatic geometry'
  
              theta_0 = sp.Symbol('theta_0')
              theta_ex = theta_0
              phi_0 = np.unique(p_0)[0]
              phi_ex = np.unique(p_0)[0] + sp.pi
          else:
              if geometry[0] == 'v':
                  theta_0 = sp.Symbol('theta_0')
              elif geometry[0] == 'f':
                  assert len(np.unique(t_0)) == 1, 't_0 must contain only a ' + \
                      'single unique value for geometry[0] == f'
  
                  theta_0 = np.unique(t_0)[0]
              else:
                  raise AssertionError('wrong choice of theta_0 geometry')
  
              if geometry[1] == 'v':
                  theta_ex = sp.Symbol('theta_ex')
              elif geometry[1] == 'f':
                  assert len(np.unique(t_ex)) == 1, 't_ex must contain only' + \
                      ' a single unique value for geometry[1] == f'
  
                  theta_ex = np.unique(t_ex)[0]
              else:
                  raise AssertionError('wrong choice of theta_ex geometry')
  
              if geometry[2] == 'v':
                  phi_0 = sp.Symbol('phi_0')
              elif geometry[2] == 'f':
                  assert len(np.unique(p_0)) == 1, 'p_0 must contain only' + \
                      ' a single unique value for geometry[2] == f'
  
                  phi_0 = np.unique(p_0)[0]
              else:
                  raise AssertionError('wrong choice of phi_0 geometry')
  
              if geometry[3] == 'v':
                  phi_ex = sp.Symbol('phi_ex')
              elif geometry[3] == 'f':
                  assert len(np.unique(p_0)) == 1, 'p_ex must contain only' + \
                      ' a single unique value for geometry[3] == f'
  
                  phi_ex = np.unique(p_ex)[0]
              else:
                  raise AssertionError('wrong choice of phi_ex geometry')
  
          return sp.Sum(self.legcoefs *
                        sp.legendre(n, self.scat_angle(theta_s,
                                                       theta_ex,
                                                       phi_s,
                                                       phi_ex, self.a)),
                        (n, 0, NBRDF - 1))
code_tokens: def legexpansion ( self , t_0 , t_ex , p_0 , p_ex , geometry ) : assert self . ncoefs > 0 theta_s = sp . Symbol ( 'theta_s' ) phi_s = sp . Symbol ( 'phi_s' ) NBRDF = self . ncoefs n = sp . Symbol ( 'n' ) if geometry == 'mono' : assert len ( np . unique ( p_0 ) ) == 1 , 'p_0 must contain only a ' + 'single unique value for monostatic geometry' theta_0 = sp . Symbol ( 'theta_0' ) theta_ex = theta_0 phi_0 = np . unique ( p_0 ) [ 0 ] phi_ex = np . unique ( p_0 ) [ 0 ] + sp . pi else : if geometry [ 0 ] == 'v' : theta_0 = sp . Symbol ( 'theta_0' ) elif geometry [ 0 ] == 'f' : assert len ( np . unique ( t_0 ) ) == 1 , 't_0 must contain only a ' + 'single unique value for geometry[0] == f' theta_0 = np . unique ( t_0 ) [ 0 ] else : raise AssertionError ( 'wrong choice of theta_0 geometry' ) if geometry [ 1 ] == 'v' : theta_ex = sp . Symbol ( 'theta_ex' ) elif geometry [ 1 ] == 'f' : assert len ( np . unique ( t_ex ) ) == 1 , 't_ex must contain only' + ' a single unique value for geometry[1] == f' theta_ex = np . unique ( t_ex ) [ 0 ] else : raise AssertionError ( 'wrong choice of theta_ex geometry' ) if geometry [ 2 ] == 'v' : phi_0 = sp . Symbol ( 'phi_0' ) elif geometry [ 2 ] == 'f' : assert len ( np . unique ( p_0 ) ) == 1 , 'p_0 must contain only' + ' a single unique value for geometry[2] == f' phi_0 = np . unique ( p_0 ) [ 0 ] else : raise AssertionError ( 'wrong choice of phi_0 geometry' ) if geometry [ 3 ] == 'v' : phi_ex = sp . Symbol ( 'phi_ex' ) elif geometry [ 3 ] == 'f' : assert len ( np . unique ( p_0 ) ) == 1 , 'p_ex must contain only' + ' a single unique value for geometry[3] == f' phi_ex = np . unique ( p_ex ) [ 0 ] else : raise AssertionError ( 'wrong choice of phi_ex geometry' ) return sp . Sum ( self . legcoefs * sp . legendre ( n , self . scat_angle ( theta_s , theta_ex , phi_s , phi_ex , self . a ) ) , ( n , 0 , NBRDF - 1 ) )
short_docstring: Definition of the legendre-expansion of the BRDF
  .. note::
  The output represents the legendre-expansion as needed to
  compute the fn-coefficients for the chosen geometry!
short_docstring_tokens: Definition of the legendre - expansion of the BRDF .. note :: The output represents the legendre - expansion as needed to compute the fn - coefficients for the chosen geometry!
comment: """
          Definition of the legendre-expansion of the BRDF
  
          .. note::
              The output represents the legendre-expansion as needed to
              compute the fn-coefficients for the chosen geometry!
              (http://rt1.readthedocs.io/en/latest/theory.html#equation-fn_coef_definition)
  
              The incidence-angle argument of the legexpansion() is different
              to the documentation due to the direct definition of the argument
              as the zenith-angle (t_0) instead of the incidence-angle
              defined in a spherical coordinate system (t_i).
              They are related via: t_i = pi - t_0
  
  
          Parameters
          ----------
          t_0 : array_like(float)
                array of incident zenith-angles in radians
  
          p_0 : array_like(float)
                array of incident azimuth-angles in radians
  
          t_ex : array_like(float)
                 array of exit zenith-angles in radians
  
          p_ex : array_like(float)
                 array of exit azimuth-angles in radians
  
          geometry : str
              4 character string specifying which components of the angles should
              be fixed or variable. This is done to significantly speed up the
              evaluation-process of the fn-coefficient generation
  
              The 4 characters represent in order the properties of:
              t_0, t_ex, p_0, p_ex
  
              - 'f' indicates that the angle is treated 'fixed'
                (i.e. as a numerical constant)
              - 'v' indicates that the angle is treated 'variable'
                (i.e. as a sympy-variable)
              - Passing  geometry = 'mono'  indicates a monstatic geometry
                (i.e.:  t_ex = t_0, p_ex = p_0 + pi)
                If monostatic geometry is used, the input-values of t_ex and p_ex
                have no effect on the calculations!
  
              For detailed information on the specification of the
              geometry-parameter, please have a look at the
              "Evaluation Geometries" section of the documentation
              (http://rt1.readthedocs.io/en/latest/model_specification.html#evaluation-geometries)
  
          Returns
          -------
          sympy - expression
              The legendre - expansion of the BRDF for the chosen geometry
  
          """$SEP$# define sympy variables based on chosen geometry