original_docstring: 
      Simulates an eclipsing binary light curve using PyTransit.
      Args:
          time (numpy array): Time of each data point
                              [days from transit midpoint].
          R_EB (float): EB radius [Solar radii].
          EB_fluxratio (float): F_EB / (F_EB + F_target).
          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): F_comp / (F_comp + F_target).
          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 an eclipsing binary light curve using PyTransit.
docstring_tokens: Simulates an eclipsing binary light curve using PyTransit .
code: def simulate_EB_transit(time: np.ndarray, R_EB: float,
                          EB_fluxratio: 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 an eclipsing binary light curve using PyTransit.
      Args:
          time (numpy array): Time of each data point
                              [days from transit midpoint].
          R_EB (float): EB radius [Solar radii].
          EB_fluxratio (float): F_EB / (F_EB + F_target).
          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): F_comp / (F_comp + F_target).
          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)
      F_EB = EB_fluxratio/(1 - EB_fluxratio)
  
      tm.set_data(time)
  
      # step 1: simulate light curve assuming only the host star exists
      # calculate primary eclipse
      k = R_EB/R_s
      if abs(k - 1.0) < 1e-6:
          k *= 0.999
      flux = tm.evaluate_ps(k, [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)
  
      # calculate secondary eclipse depth
      fr = (EB_fluxratio)/(1 - EB_fluxratio)
      sec_flux = 1.0/(1. + fr)
  
      # step 2: adjust the light curve to account for flux dilution
      # from EB and non-host star
      if companion_is_host:
          flux = (flux + F_EB/F_comp)/(1 + F_EB/F_comp)
          F_dilute = F_target/(F_comp + F_EB)
          flux = (flux + F_dilute)/(1 + F_dilute)
          secdepth = 1 - (sec_flux + F_dilute)/(1 + F_dilute)
      else:
          flux = (flux + F_EB/F_target)/(1 + F_EB/F_target)
          F_dilute = F_comp/(F_target + F_EB)
          flux = (flux + F_dilute)/(1 + F_dilute)
          secdepth = 1 - (sec_flux + F_dilute)/(1 + F_dilute)
      return flux, secdepth
code_tokens: def simulate_EB_transit ( time : np . ndarray , R_EB : float , EB_fluxratio : 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 ) F_EB = EB_fluxratio / ( 1 - EB_fluxratio ) tm . set_data ( time ) k = R_EB / R_s if abs ( k - 1.0 ) < 1e-6 : k *= 0.999 flux = tm . evaluate_ps ( k , [ 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 ) fr = ( EB_fluxratio ) / ( 1 - EB_fluxratio ) sec_flux = 1.0 / ( 1. + fr ) if companion_is_host : flux = ( flux + F_EB / F_comp ) / ( 1 + F_EB / F_comp ) F_dilute = F_target / ( F_comp + F_EB ) flux = ( flux + F_dilute ) / ( 1 + F_dilute ) secdepth = 1 - ( sec_flux + F_dilute ) / ( 1 + F_dilute ) else : flux = ( flux + F_EB / F_target ) / ( 1 + F_EB / F_target ) F_dilute = F_comp / ( F_target + F_EB ) flux = ( flux + F_dilute ) / ( 1 + F_dilute ) secdepth = 1 - ( sec_flux + F_dilute ) / ( 1 + F_dilute ) return flux , secdepth
short_docstring: Simulates an eclipsing binary light curve using PyTransit.
short_docstring_tokens: Simulates an eclipsing binary light curve using PyTransit .
comment: """
      Simulates an eclipsing binary light curve using PyTransit.
      Args:
          time (numpy array): Time of each data point
                              [days from transit midpoint].
          R_EB (float): EB radius [Solar radii].
          EB_fluxratio (float): F_EB / (F_EB + F_target).
          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): F_comp / (F_comp + F_target).
          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$# calculate primary eclipse$SEP$# calculate secondary eclipse depth$SEP$# step 2: adjust the light curve to account for flux dilution$SEP$# from EB and non-host star