Returns times and fluxes of eclipse i (centered at t=0)

def eclipse_new(self, i, secondary=False, npoints=200, width=3,
                texp=None):
        """
        Returns times and fluxes of eclipse i (centered at t=0)
        """
        texp = self.cadence
        s = self.stars.iloc[i]

        e = s['ecc']
        P = s['P']
        if secondary:
            mu1, mu2 = s[['u1_2', 'u2_2']]
            w = np.mod(np.deg2rad(s['w']) + np.pi, 2*np.pi)
            mass_central, radius_central = s[['mass_2','radius_2']]
            mass_body, radius_body = s[['mass_1','radius_1']]
            b = s['b_sec'] * s['radius_1']/s['radius_2']
            frac = s['fluxfrac_2']
        else:
            mu1, mu2 = s[['u1_1', 'u2_1']]
            w = np.deg2rad(s['w'])
            mass_central, radius_central = s[['mass_1','radius_1']]
            mass_body, radius_body = s[['mass_2','radius_2']]
            b = s['b_pri']
            frac = s['fluxfrac_1']


        central_kwargs = dict(mass=mass_central, radius=radius_central,
                              mu1=mu1, mu2=mu2)
        central = Central(**central_kwargs)

        body_kwargs = dict(radius=radius_body, mass=mass_body, b=b,
                           period=P, e=e, omega=w)
        body = Body(**body_kwargs)

        logging.debug('central: {}'.format(central_kwargs))
        logging.debug('body: {}'.format(body_kwargs))

        s = System(central)
        s.add_body(body)

        # As of now, body.duration returns strictly circular duration
        dur = body.duration

        logging.debug('duration: {}'.format(dur))

        ts = np.linspace(-width/2*dur, width/2*dur, npoints)
        fs = s.light_curve(ts, texp=texp)
        fs = 1 - frac*(1-fs)
        return ts, fs