parameters: (self, T_0=1.e9)
return_statement: return x1 + slope*(T_0 - T1)
docstring: given a profile x(T), find the x_0 that corresponds to T_0
docstring_summary: given a profile x(T), find the x_0 that corresponds to T_0
docstring_tokens: given a profile x ( T ) find the x_0 that corresponds to T_0
function: def find_x_for_T(self, T_0=1.e9):
          """ given a profile x(T), find the x_0 that corresponds to T_0 """
  
          # our strategy here assumes that the hot ash is in the early
          # part of the profile.  We then find the index of the first
          # point where T drops below T_0
          idx = np.where(self.T < T_0)[0][0]
  
          T1 = self.T[idx-1]
          x1 = self.x[idx-1]
  
          T2 = self.T[idx]
          x2 = self.x[idx]
  
          slope = (x2 - x1)/(T2 - T1)
  
          return x1 + slope*(T_0 - T1)
function_tokens: def find_x_for_T ( self , T_0 = 1.e9 ) : # our strategy here assumes that the hot ash is in the early # part of the profile.  We then find the index of the first # point where T drops below T_0 idx = np . where ( self . T < T_0 ) [ 0 ] [ 0 ] T1 = self . T [ idx - 1 ] x1 = self . x [ idx - 1 ] T2 = self . T [ idx ] x2 = self . x [ idx ] slope = ( x2 - x1 ) / ( T2 - T1 ) return x1 + slope * ( T_0 - T1 )