original_docstring: Find the value for psi that has the same location w on the upper 
      surface of the goal as psi_baseline on the upper surface of the 
      baseline
docstring: Find the value for psi that has the same location w on the upper
  surface of the goal as psi_baseline on the upper surface of the
  baseline
docstring_tokens: Find the value for psi that has the same location w on the upper surface of the goal as psi_baseline on the upper surface of the baseline
code: def calculate_psi_goal(psi_baseline, Au_baseline, Au_goal, deltaz,
                         c_baseline, c_goal, l_LE, eps_LE, psi_1):
      """Find the value for psi that has the same location w on the upper 
      surface of the goal as psi_baseline on the upper surface of the 
      baseline"""
      
      def integrand(psi_baseline, Au, deltaz, c ):
          return c*np.sqrt(1 + dxi_u(psi_baseline, Au, deltaz/c)**2)
      
      def equation(psi_goal, Au_goal, deltaz, c):
          if psi_goal != psi_1:
              L_baseline, err = quad(integrand, psi_1, psi_baseline, args=(Au_baseline, deltaz, 
                                                               c_baseline))
          else:
              L_baseline = 0
          L_LE, err = quad(integrand, 0, psi_1, args=(Au_baseline, deltaz, 
                                                           c_baseline))
          y, err = quad(integrand, 0, psi_goal, args=(Au_goal, deltaz, c))
          return y - (1-eps_LE)*(L_LE+c_baseline*l_LE) - L_baseline
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          y = fsolve(equation, psi_baseline, args=(Au_goal, deltaz,
                                                   c_goal))
      return y[0]
code_tokens: def calculate_psi_goal ( psi_baseline , Au_baseline , Au_goal , deltaz , c_baseline , c_goal , l_LE , eps_LE , psi_1 ) : def integrand ( psi_baseline , Au , deltaz , c ) : return c * np . sqrt ( 1 + dxi_u ( psi_baseline , Au , deltaz / c ) ** 2 ) def equation ( psi_goal , Au_goal , deltaz , c ) : if psi_goal != psi_1 : L_baseline , err = quad ( integrand , psi_1 , psi_baseline , args = ( Au_baseline , deltaz , c_baseline ) ) else : L_baseline = 0 L_LE , err = quad ( integrand , 0 , psi_1 , args = ( Au_baseline , deltaz , c_baseline ) ) y , err = quad ( integrand , 0 , psi_goal , args = ( Au_goal , deltaz , c ) ) return y - ( 1 - eps_LE ) * ( L_LE + c_baseline * l_LE ) - L_baseline with warnings . catch_warnings ( ) : warnings . simplefilter ( "ignore" ) y = fsolve ( equation , psi_baseline , args = ( Au_goal , deltaz , c_goal ) ) return y [ 0 ]
short_docstring: Find the value for psi that has the same location w on the upper
  surface of the goal as psi_baseline on the upper surface of the
  baseline
short_docstring_tokens: Find the value for psi that has the same location w on the upper surface of the goal as psi_baseline on the upper surface of the baseline
comment: """Find the value for psi that has the same location w on the upper 
      surface of the goal as psi_baseline on the upper surface of the 
      baseline"""