Ejemplo n.º 1
0
def test_biss_startend02():
        a = np.array(values)
        biss = BISS()
        res = biss.request('TCNUSAER',start=2000001, end=2000366)
        t = res['TCNUSAER']._data
        for i in range(0,366):
            if not np.isnan(t[i]):
                assert a[i]-t[i]<1e-10
Ejemplo n.º 2
0
def test_biss_startend04():
    biss = BISS()
    res1 = biss.request('TCNUSAER',start=2001360, end=2001366)
    res2 = biss.request('TCNUSAER',start=2001366, end=2002010)
    t1 = res1['TCNUSAER']._data
    t2 = res2['TCNUSAER']._data
    import scikits.timeseries.lib.reportlib as rl
    basicReport = rl.Report(t1,t2)
    basicReport()
Ejemplo n.º 3
0
def test_biss_startend01():
        target = +3.38395879999993E+003
        biss = BISS()
        res = biss.request('TCNUSAER',start=2000001, end=2011000)
        t = res['TCNUSAER']._data
        a = np.nansum( t.series )
        assert a-target < 1e-10
        assert t.start_date == ts.Date('D',year=2000,month=1,day=1)
        assert len(t)==4026
Ejemplo n.º 4
0
def test_biss_data01():
        target = +3.65999489999992E+003
        biss = BISS()
        res = biss.request('TCNUSAER',end=2011000)
        t = res['TCNUSAER']._data
        a = np.nansum( t.series )
        assert a-target < 1e-10
        assert t.start_date == ts.Date('D',year=1999,month=1,day=1)
        assert len(t)==4392
Ejemplo n.º 5
0
def test_biss_startend03():
        a = np.array(values)
        b = a.cumsum()
        biss = BISS()
        for i in range(1,366):
            end = 2000*1000+i
            target = b[i-1]
            res = biss.request('TCNUSAER',start=2000001, end=end)
            t = res['TCNUSAER']._data
            h = np.nansum( t.series )
            # print end, i, target , h, len(t),a[i-1],t[i-1]
            assert (h-target) < 1e-10 if target else True
            assert len(t)==i