Ejemplo n.º 1
0
 def get_slice(self, t1, t2):
     if self.__load__() < 0:
         return
     tiertype = get_tier_type(self.__cached_object__)
     if tiertype == "interval":
         return slice_intervalframe_by_time(self.__cached_object__, t1, t2)
     elif tiertype == "point":
         return slice_pointframe_by_time(self.__cached_object__, t1, t2)
Ejemplo n.º 2
0
 def get_slice(self, t1, t2):
     if self.__load__() < 0:
         return
     tiertype = get_tier_type(self.__cached_object__)
     if tiertype == 'interval':
         return slice_intervalframe_by_time(self.__cached_object__, t1, t2)
     elif tiertype == 'point':
         return slice_pointframe_by_time(self.__cached_object__, t1, t2)
Ejemplo n.º 3
0
    def test_slicing(self):

        self.failUnlessEqual(
            slice_streamframe_on_intervals(
                self.stream, self.ifr)['framenumber'][1341393414961], 45776.0)
        self.failUnlessEqual(
            slice_intervalframe_by_time(self.tier1, 578.171, 698.440).index[0],
            5)
        self.failUnlessEqual(
            slice_intervalframe_by_time(self.tier1, 578.171,
                                        698.440).index[-1], 21)

        self.failUnlessEqual(
            slice_pointframe_by_time(self.withPoint['P'], 10,
                                     100)['mark'].iloc[0], 'B')
Ejemplo n.º 4
0
    def test_slicing(self):

        self.failUnlessEqual(slice_streamframe_on_intervals(self.stream,
                                      self.ifr)['framenumber'][1341393414961],
                                                            45776.0)
        self.failUnlessEqual(slice_intervalframe_by_time(self.tier1,
                                                         578.171,
                                                         698.440).index[0],
                                                         5)
        self.failUnlessEqual(slice_intervalframe_by_time(self.tier1,
                                                         578.171,
                                                         698.440).index[-1],
                                                         21)

        self.failUnlessEqual(slice_pointframe_by_time(self.withPoint['P'],
                                                      10, 100)['mark'].iloc[0],
                             'B')