How to use the lightkurve.SFFCorrector function in lightkurve

To help you get started, we’ve selected a few lightkurve examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github afeinstein20 / eleanor / ELLIE_v1.2 / removeSystematics.py View on Github external
def roll_correction(lc, x_point, y_point):
#    lc, x_point, y_point = load_data(camera, chip)
    time = np.arange(0,len(lc),1)

    sff = SFFCorrector()
    lc_corrected = sff.correct(time, lc, x_point, y_point, niters=1,
                               windows=1, polyorder=5)

    return lc_corrected.flux
github afeinstein20 / eleanor / eleanor / ellie.py View on Github external
def rotation_corr(lc, x_pos, y_pos):
            """ Corrects for spacecraft roll using Lightkurve """
            time = np.arange(0, len(lc), 1)
            sff = SFFCorrector()
            x_pos, y_pos = np.array(x_pos), np.array(y_pos)
            lc_corrected = sff.correct(time, lc, x_pos, y_pos, niters=1,
                                       windows=1, polyorder=5)
            return lc_corrected.flux
github afeinstein20 / eleanor / ELLIE / ellie.py View on Github external
def rotation_corr(lc, x_pos, y_pos):
            """ Corrects for spacecraft roll using Lightkurve """
            time = np.arange(0, len(lc), 1)
            sff = SFFCorrector()
            x_pos, y_pos = np.array(x_pos), np.array(y_pos)
            lc_corrected = sff.correct(time, lc, x_pos, y_pos, niters=1,
                                       windows=1, polyorder=5)
            return lc_corrected.flux
github afeinstein20 / eleanor / eleanor / targetdata.py View on Github external
pointing model.

        Parameters
        ----------
        flux : numpy.ndarray
            Flux array to which detrending applied.
        """
        brk = self.find_break()

        r1 = np.arange(0, brk, 1)
        r2 = np.arange(brk,len(self.time))

        t1 = self.time[r1]; f1 = flux[r1]
        t2 = self.time[r2]; f2 = flux[r2]

        sff = SFFCorrector()
        corr_lc_obj_1 = sff.correct(time=t1, flux=f1,
                                    centroid_col=self.centroid_xs[r1],
                                    centroid_row=self.centroid_ys[r1],
                                    windows=1, polyorder=2, niters=3, sigma_1=3, sigma_2=5,
                                    restore_trend=True, bins=15)
        corr_lc_obj_2 = sff.correct(time=t2, flux=f2,
                                    centroid_col=self.centroid_xs[r2],
                                    centroid_row=self.centroid_ys[r2],
                                    windows=1, polyorder=2, niters=3, sigma_1=3, sigma_2=5,
                                    restore_trend=True, bins=15)
        return np.append(corr_lc_obj_1.flux, corr_lc_obj_2.flux)