from pylab import *
from irfpy.cena.cena_mass2 import *
import datetime
if __name__ == '__main__':
t1084 = datetime.datetime(2009,2,6,5,22)
t1085 = datetime.datetime(2009,2,6,7,20)
t1086 = datetime.datetime(2009,2,6,9,18)
dt = datetime.timedelta(minutes=5)
c1084 = irfpy.cena.cena_mass2.getobstime(timerange=[t1084-dt, t1084+dt])
c1085 = irfpy.cena.cena_mass2.getobstime(timerange=[t1085-dt, t1085+dt])
c1086 = irfpy.cena.cena_mass2.getobstime(timerange=[t1086-dt, t1086+dt])
len(c1084)
len(c1085)
len(c1086)
dat1084=[]
for c in c1084:
dat1084.append(irfpy.cena.cena_mass2.getdataE16(c).getData())
dat1084=numpy.array(dat1084)
ma1084 = ma.masked_where(dat1084==63488, dat1084)
cent1084 = ma.sum(ma1084[:,:,2:4,:], axis=2)
dirmass1084 = ma.sum(cent1084, axis=0)
for d in range(16):
plot(dirmass1084[d, :]+d*10)
ene = [0, 11, 17, 25, 38, 57, 86,129, 193, 290, 435, 652, 978, 1467, 2200, 3300]
ylim(0, 130)
clr=[None, None, None, None, 'purple', 'yellow', 'black', 'blue', 'green', 'red', 'lightblue', 'purple', None, None, None, None]
for i in range(4, 12):
text(0, i*10, 'E=%d eV'%ene[i], color=clr[i])
title('CENA data (%s-%s) for D(2-4)' % (t1084-dt, t1084+dt))
arrow(23, 20, 0, 10)
arrow(32, 20, 0, 10)
arrow(45, 20, 0, 10)
text(23, 20, 'H')
text(32, 20, 'H2')
text(45, 20, 'He')
savefig('mass1084.png')
figure()
dat1085=[]
for c in c1085:
dat1085.append(irfpy.cena.cena_mass2.getdataE16(c).getData())
dat1085=numpy.array(dat1085)
ma1085 = ma.masked_where(dat1085==63488, dat1085)
cent1085 = ma.sum(ma1085[:,:,2:4,:], axis=2)
dirmass1085 = ma.sum(cent1085, axis=0)
for d in range(16):
plot(dirmass1085[d, :]+d*10)
ene = [0, 11, 17, 25, 38, 57, 86,129, 193, 290, 435, 652, 978, 1467, 2200, 3300]
ylim(0, 130)
clr=[None, None, None, None, 'purple', 'yellow', 'black', 'blue', 'green', 'red', 'lightblue', 'purple', None, None, None, None]
for i in range(4, 12):
text(0, i*10, 'E=%d eV'%ene[i], color=clr[i])
title('CENA data (%s-%s) for D(2-4)' % (t1085-dt, t1085+dt))
arrow(23, 20, 0, 10)
arrow(32, 20, 0, 10)
arrow(45, 20, 0, 10)
text(23, 20, 'H')
text(32, 20, 'H2')
text(45, 20, 'He')
savefig('mass1085.png')
figure()
dat1086=[]
for c in c1086:
dat1086.append(irfpy.cena.cena_mass2.getdataE16(c).getData())
dat1086=numpy.array(dat1086)
ma1086 = ma.masked_where(dat1086==63488, dat1086)
cent1086 = ma.sum(ma1086[:,:,2:4,:], axis=2)
dirmass1086 = ma.sum(cent1086, axis=0)
for d in range(16):
plot(dirmass1086[d, :]+d*10)
ene = [0, 11, 17, 25, 38, 57, 86,129, 193, 290, 435, 652, 978, 1467, 2200, 3300]
ylim(0, 130)
clr=[None, None, None, None, 'purple', 'yellow', 'black', 'blue', 'green', 'red', 'lightblue', 'purple', None, None, None, None]
for i in range(4, 12):
text(0, i*10, 'E=%d eV'%ene[i], color=clr[i])
title('CENA data (%s-%s) for D(2-4)' % (t1086-dt, t1086+dt))
arrow(23, 20, 0, 10)
arrow(32, 20, 0, 10)
arrow(45, 20, 0, 10)
text(23, 20, 'H')
text(32, 20, 'H2')
text(45, 20, 'He')
savefig('mass1086.png')