Exemple #1
0
    def __init__(self, kic):
        #This calls the data file
        catfile = 'villanova-db.csv'
        df = pd.read_csv(catfile)

        #Calls the row and stores it into a new data file that only has the row's information
        dfnew = df[df['KIC'] == kic]
        #We need dfnew to be greater than zero
        #Calls each individual componet from the row
        if len(dfnew) == 0:
            print "no"
        else:
            print 'yasss'

        kicval = dfnew.KIC.values[0]
        KOI = dfnew.KOI.values[0]
        mult = dfnew.Mult.values[0]
        period = dfnew.period.values[0]
        swidth = dfnew.swidth.values[0]
        bjd0 = dfnew.bjd0.values[0]
        pwidth = dfnew.pwidth.values[0]
        pdepth = dfnew.pdepth.values[0]
        sdepth = dfnew.sdepth.values[0]
        sep = dfnew.sep.values[0]
        time, flux, fluxerr, cadence, quarter, quality = data.loadlc_db(kic)
        super(RealBinary,
              self).__init__(time, flux, fluxerr, period, bjd0, pdepth, sdepth,
                             pwidth, swidth, sep, kic)
Exemple #2
0
 def __init__(self,kic):
     #This calls the data file
     catfile='villanova-db.csv'
     df = pd.read_csv(catfile)
 
     #Calls the row and stores it into a new data file that only has the row's information
     dfnew = df[df['KIC']==kic]
     #We need dfnew to be greater than zero
     #Calls each individual componet from the row
     if len(dfnew) ==0:
         print "no"
     # else:
         # print 'yasss'
     
     kicval=dfnew.KIC.values[0]
     KOI=dfnew.KOI.values[0]
     mult=dfnew.Mult.values[0]
     period=dfnew.period.values[0]
     swidth=dfnew.swidth.values[0]
     bjd0= dfnew.bjd0.values[0]
     pwidth=dfnew.pwidth.values[0]
     pdepth=dfnew.pdepth.values[0]
     sdepth=dfnew.sdepth.values[0]
     sep=dfnew.sep.values[0]
     time, flux, fluxerr, cadence, quarter, quality = data.loadlc_db(kic)
     super(RealBinary, self).__init__(time, flux, fluxerr, cadence, quarter, period,
                                      bjd0, pdepth, sdepth, pwidth, swidth,
                                      sep, kic)
     
Exemple #3
0
    def _update(self, idx):
        """
        Update the plot when a new point is selected.
        Parameters
        ----------
        idx : int
            The index of the sky pixel.
        closest : int
            The index of the closest point to the cursor.
        """
        kic = int(self.kics[idx][3:])
        time, flux = data.loadlc_db(kic)[:]
        self.title.set_text("KIC {0}".format(kic))

        self.lightcurve.set_xdata(time)
        self.lightcurve.set_ydata(flux)