# the slice1 keyword appears to have bugs in it.  This creates CDF files for testing.

dsones= ones(100,5)
formatDataSet( dsones,'/tmp/fooRank2Ones.cdf?type=int4' )

ds= findgen(100,5)
formatDataSet( ds,'/tmp/fooRank2.cdf' )

ds= findgen(100,3,4)+10
formatDataSet( ds,'/tmp/fooRank3.cdf' )
formatDataSet( ds,'/tmp/fooRank3Ints.cdf?type=int4' )

ds= findgen(100,3,4,5)
formatDataSet( ds,'/tmp/fooRank4.cdf' )

plot(0,'vap+cdf:file:///tmp/fooRank3Ints.cdf?Variable_0&slice1=0')
plot(1,'vap+cdfj:file:///tmp/fooRank3Ints.cdf?Variable_0&slice1=0')
writeToPng( 'test037_testSlice1.rank3.png' )
dsj= getDataSet('vap+cdfj:file:///tmp/fooRank3Ints.cdf?Variable_0&slice1=0')
dsc= getDataSet('vap+cdf:file:///tmp/fooRank3Ints.cdf?Variable_0&slice1=0')
print dsj, dsc
print 'Java: ', dsj[1,0], dsj[1,1]-dsj[1,0], dsj[1,0]-dsj[0,0]
print '___C: ', dsc[1,0], dsc[1,1]-dsc[1,0], dsc[1,0]-dsc[0,0]

plot(0,'vap+cdf:file:///tmp/fooRank2Ones.cdf?Variable_0&slice1=0')
plot(1,'vap+cdfj:file:///tmp/fooRank2Ones.cdf?Variable_0&slice1=0')
writeToPng( 'test037_testSlice1.int4.png' )

plot(0,'vap+cdf:file:///tmp/fooRank2.cdf?Variable_0&slice1=0')
plot(1,'vap+cdfj:file:///tmp/fooRank2.cdf?Variable_0&slice1=0')
writeToPng( 'test037_testSlice1.rank2.png' )

plotx(0,'vap+cdf:file:///tmp/fooRank4.cdf?Variable_0&slice1=0', ytitle='CDF Native',
   title='!AVerify slice1 keyword for C and Java Readers!c%{CONTEXT}' )
plotx(1,'vap+cdfj:file:///tmp/fooRank4.cdf?Variable_0&slice1=0', ytitle='CDF Java')
writeToPng( 'test037_Slice1.rank4.png' )
