runList1 = runList1[np.where(runList1 != 5380)] # dat = np.loadtxt( "/data/work/koji/GRB/kam_data/Observed-dcvf-Kat_0.9MeVwithLikelihood.dat") runList = dat[:, 0] EpList = dat[:, 1] EpList2 = EpList[np.where(runList > 11000)] runList2 = runList[np.where(runList > 11000)] Nbins = 20 xbinmin = 0 xbinmax = 100 h1 = mydef.make_hist(EpList1, 'Period I', Nbins, xbinmin, xbinmax, 2, 2, False) h2 = mydef.make_hist(EpList2, 'Period II', Nbins, xbinmin, xbinmax, 2, 2, False) h0 = mydef.make_hist(EpList1, 'Expected background', Nbins, xbinmin, xbinmax, 2, 2, False) t1 = 6.91 * 365 * 24. t3 = 1.2 * 365 * 24. t = (t1 + t3) tw1 = 18.3 tw3 = 6.82 tw = 25.2 e1 = 0.926179 Ngrb1 = 175 e3 = 0.773454
Epu = 80.0 #MeV EpList2 = EpList[np.where(EpList > Epu)] runList2 = runList[np.where(EpList > Epu)] dr2 = dr[np.where(EpList > Epu)] dt2 = dt[np.where(EpList > Epu)] rpx2 = rpx[np.where(EpList > Epu)] rpy2 = rpy[np.where(EpList > Epu)] rpz2 = rpz[np.where(EpList > Epu)] rdx2 = rdx[np.where(EpList > Epu)] rdy2 = rdy[np.where(EpList > Epu)] rdz2 = rdz[np.where(EpList > Epu)] Nbins = 45 xbinmin = 7.5 xbinmax = 30 h0 = mydef.make_hist(EpList1, 'Ep (7.5-%sMeV)' % Ep30, Nbins, xbinmin, xbinmax, 2, 2, False) #Nbins = 46 Nbins = 71 xbinmin = 7.5 #xbinmax = 99.5 xbinmax = 149.5 h1 = mydef.make_hist(EpList, 'Ep (7.5-150MeV)', Nbins, xbinmin, xbinmax, 2, 2, False) Nbins = 35 xbinmin = 80 xbinmax = 150 h2 = mydef.make_hist(EpList, 'Ep (80-150MeV)', Nbins, xbinmin, xbinmax, 2, 2, False)
elif dList[line]=='HETE': uttime2.append(time.mktime(gtime) + 60*60*9) else: uttime3.append(time.mktime(gtime) + 60*60*9) pass pass uttime1 = np.array(uttime1) uttime2 = np.array(uttime2) uttime3 = np.array(uttime3) Nbins = 500 xbinmin = 1009810800 xbinmax = 1356966000 h1=mydef.make_hist( uttime1, 'hoge1', Nbins, xbinmin, xbinmax, 2, 1, False) h2=mydef.make_hist( uttime2, 'hoge2', Nbins, xbinmin, xbinmax, 2, 1, False) h3=mydef.make_hist( uttime3, 'hoge3', Nbins, xbinmin, xbinmax, 2, 1, False) xList = [] yList1 = [] yList2 = [] yList3 = [] YList1 = [] YList2 = [] YList3 = [] for line in range(Nbins): xList.append(h1.GetBinCenter(line)) yList1.append(h1.GetBinContent(line)) yList2.append(h2.GetBinContent(line)) yList3.append(h3.GetBinContent(line))
#A = np.loadtxt("GRBlongList.dat",dtype={'names':('name','utc','T90','fluence','Instrument','redshift'),'formats':('S8','S8','f8','f8','S8','f8')}) A = np.loadtxt("GRBshortList.dat", dtype={ 'names': ('name', 'utc', 'T90', 'Instrument', 'redshift'), 'formats': ('S8', 'S8', 'f8', 'S8', 'f8') }) B = np.loadtxt( "/data/work/koji/GRB/coincidence_analysis_short/GRBshoftUsedList.dat") zList0 = A['redshift'] zList1 = B Nbins = 200 xbinmin = 0 xbinmax = 10 h0 = mydef.make_hist(zList0, 'hoge1', Nbins, xbinmin, xbinmax, 2, 1, False) h1 = mydef.make_hist(zList1, 'hoge2', Nbins, xbinmin, xbinmax, 4, 1, False) xList = [] yList0 = [] yList1 = [] YList0 = [] YList1 = [] for line in range(Nbins): xList.append(h0.GetBinCenter(line)) yList0.append(h0.GetBinContent(line)) yList1.append(h1.GetBinContent(line)) pass xList = np.array(xList)
# dat =np.loadtxt("/data/work/koji/GRB/kam_data/Observed-dcvf-Kat_0.9MeVwithLikelihood.dat") runList= dat[:,0] EpList = dat[:,1] EpList2 =EpList[np.where( runList>11000 )] runList2=runList[np.where( runList>11000 )] EpList0 = np.r_[EpList1,EpList2] Nbins = 20 xbinmin = 0 xbinmax = 100 h1 =mydef.make_hist( EpList0, 'Period I', Nbins, xbinmin, xbinmax, 2, 2, False) h2 =mydef.make_hist( EpList0, 'Period II', Nbins, xbinmin, xbinmax, 2, 2, False) h2_ =mydef.make_hist( EpList0, 'Period_ II', Nbins, xbinmin, xbinmax, 2, 2, False) # NList = np.array([81.9141,6.20866,1.85299,5.70035]) h3 =mydef.make_hist( NList, 'cList', Nbins, xbinmin, xbinmax, 8, 2, False) t1 = 6.91 t3 = 1.2 t = (t1 + t3) * 365 * 24. tw1 = 18.3 tw3 = 6.82 tw = 25.2