original_docstring: 
      Simulates a transiting planet light curve using PyTransit.
      Args:
          time (numpy array): Time of each data point
                              [days from transit midpoint].
          R_p (float): Planet radius [Earth radii].
          P_orb (float): Orbital period [days].
          inc (float): Orbital inclination [degrees].
          a (float): Semimajor axis [cm].
          R_s (float): Star radius [Solar radii].
          u1 (float): 1st coefficient in quadratic limb darkening law.
          u2 (float): 2nd coefficient in quadratic limb darkening law.
          companion_fluxratio (float): Proportion of flux provided by
                                       the unresolved companion.
          companion_is_host (bool): True if the transit is around the
                                    unresolved companion and False if
                                    it is not.
      Returns:
          m.light_curve (numpy array): Normalized flux at eat time given.
      
docstring: Simulates a transiting planet light curve using PyTransit.
docstring_tokens: Simulates a transiting planet light curve using PyTransit .
code: def simulate_TP_transit(time: np.ndarray, R_p: float, P_orb: float,
                          inc: float, a: float, R_s: float, u1: float,
                          u2: float, companion_fluxratio: float = 0.0,
                          companion_is_host: bool = False):
      """
      Simulates a transiting planet light curve using PyTransit.
      Args:
          time (numpy array): Time of each data point
                              [days from transit midpoint].
          R_p (float): Planet radius [Earth radii].
          P_orb (float): Orbital period [days].
          inc (float): Orbital inclination [degrees].
          a (float): Semimajor axis [cm].
          R_s (float): Star radius [Solar radii].
          u1 (float): 1st coefficient in quadratic limb darkening law.
          u2 (float): 2nd coefficient in quadratic limb darkening law.
          companion_fluxratio (float): Proportion of flux provided by
                                       the unresolved companion.
          companion_is_host (bool): True if the transit is around the
                                    unresolved companion and False if
                                    it is not.
      Returns:
          m.light_curve (numpy array): Normalized flux at eat time given.
      """
      F_target = 1
      F_comp = companion_fluxratio/(1-companion_fluxratio)
      # step 1: simulate light curve assuming only the host star exists
      tm.set_data(time)
      flux = tm.evaluate_ps(R_p*Rearth/(R_s*Rsun), [float(u1), float(u2)], t0=0.0, p=P_orb, a=a/(R_s*Rsun), i=inc*(pi/180.), e=0.0, w=0.0)
      # step 2: adjust the light curve to account for flux dilution
      # from non-host star
      if companion_is_host:
          F_dilute = F_target / F_comp
          flux = (flux + F_dilute)/(1 + F_dilute)
      else:
          F_dilute = F_comp / F_target
          flux = (flux + F_dilute)/(1 + F_dilute)
      return flux
code_tokens: def simulate_TP_transit ( time : np . ndarray , R_p : float , P_orb : float , inc : float , a : float , R_s : float , u1 : float , u2 : float , companion_fluxratio : float = 0.0 , companion_is_host : bool = False ) : F_target = 1 F_comp = companion_fluxratio / ( 1 - companion_fluxratio ) tm . set_data ( time ) flux = tm . evaluate_ps ( R_p * Rearth / ( R_s * Rsun ) , [ float ( u1 ) , float ( u2 ) ] , t0 = 0.0 , p = P_orb , a = a / ( R_s * Rsun ) , i = inc * ( pi / 180. ) , e = 0.0 , w = 0.0 ) if companion_is_host : F_dilute = F_target / F_comp flux = ( flux + F_dilute ) / ( 1 + F_dilute ) else : F_dilute = F_comp / F_target flux = ( flux + F_dilute ) / ( 1 + F_dilute ) return flux
short_docstring: Simulates a transiting planet light curve using PyTransit.
short_docstring_tokens: Simulates a transiting planet light curve using PyTransit .
comment: """
      Simulates a transiting planet light curve using PyTransit.
      Args:
          time (numpy array): Time of each data point
                              [days from transit midpoint].
          R_p (float): Planet radius [Earth radii].
          P_orb (float): Orbital period [days].
          inc (float): Orbital inclination [degrees].
          a (float): Semimajor axis [cm].
          R_s (float): Star radius [Solar radii].
          u1 (float): 1st coefficient in quadratic limb darkening law.
          u2 (float): 2nd coefficient in quadratic limb darkening law.
          companion_fluxratio (float): Proportion of flux provided by
                                       the unresolved companion.
          companion_is_host (bool): True if the transit is around the
                                    unresolved companion and False if
                                    it is not.
      Returns:
          m.light_curve (numpy array): Normalized flux at eat time given.
      """$SEP$# step 1: simulate light curve assuming only the host star exists$SEP$# step 2: adjust the light curve to account for flux dilution$SEP$# from non-host star