# verify extent functions

n= 1000000

print '== no error bars =='
ds= sin( linspace(0,4*PI,n) )
print 'extent', extent(ds)
print 'extentSimple', extentSimple( ds, None, None )
print 'extent445', extent445(ds)

print '== with error bars =='
ds= sin( linspace(0,4*PI,n) )
ds= putProperty( ds, QDataSet.DELTA_MINUS, ones(n) )
ds= putProperty( ds, QDataSet.DELTA_PLUS, ones(n) )
print 'extent', extent(ds)
print 'extentSimple', extentSimple( ds, None, None )
print 'extent445', extent445(ds)

print '== with bins =='
ds= sin( linspace(0,4*PI,n) )
ds= putProperty( ds, QDataSet.BIN_MINUS, ones(n) )
ds= putProperty( ds, QDataSet.BIN_PLUS, ones(n) )
print 'extent', extent(ds)
print 'extentSimple', extentSimple( ds, None, None )
print 'extent445', extent445(ds)

print '== just bins =='
ds= sin( linspace(0,4*PI,n) )
ds= bundle( ds, ds+1 ) 
ds= putProperty( ds, QDataSet.BINS_1, 'min,max'  )
ds= putProperty( ds, QDataSet.BUNDLE_1, None )
print 'extent', extent(ds)
print 'extentSimple', extentSimple( ds, None, None )
print 'extent445', extent445(ds)

print '== fill handling failed =='
ds= getDataSet('file:///home/jbf/ct/hudson/data.backup/cdf/seth/rbspa_int_ect-mageisLOW-L3_20160411_v8.1.0.cdf?FEDU')
alpha= ds.property( QDataSet.DEPEND_1 )
print 'extent with fill', extent( alpha )

