# show that operations like multiply and add preserve metadata

density= getDataSet('http://jfaden.net/~jbf/autoplot/data/cdf/rbsp/emfisis/rbsp-b_density_emfisis_20140308_v1.3.15.cdf?density')
plot( 0, density )
plot( 1, 1000*density )
plot( 2, density*1000 )
plot( 3, '100 cm**-3'+density )

dom.plotElements[0].legendLabel= 'density'
dom.plotElements[1].legendLabel= '1000*density'
dom.plotElements[2].legendLabel= 'density*1000'
dom.plotElements[3].legendLabel= '100 cm**-3 + density'

for i in xrange(4):
    dom.plotElements[i].displayLegend=True

writeToPng('test037_operations.png')


print dataset('5ms')+dataset('5ms')
print dataset('5ms')+dataset('0.005s')
print dataset('0.005s')+dataset('5ms')
print dataset('5ms')+'5ms'
print dataset('5ms')+5


print dataset('5ms')-dataset('5ms')
print dataset('5ms')-dataset('0.005s')
print dataset('0.005s')-dataset('5ms')
print dataset('5ms')-'5ms'
print dataset('5ms')-5

B= dataset( '45Hz' )
C= dataset( '45kHz' )
print B/C 
print B/450
print 1/C