예제 #1
0
for i in np.arange(2):
#for i in np.arange(a,a+1):
    #try:
    for r in np.arange(1):
        
        event= sim_dir[i].split('events/')[1].split('/')[0]
        print '{0}  {1}'.format(sim_dir[i], runnr[i])
        sim_zenith, sim_azimuth, sim_alpha,sim_energy, hillas, antenna_positions,ant_pos_uvw,fluence11,fluence21,fluence41=sim.ProcessSim(sim_dir[i], runnr[i])# fluence in J
        ant_pos,times,efield,zenith,az,energy,xmax=sim.get_efield(sim_dir[i], runnr[i])
        em_energy_hold,other_energy_hold,total_energy_hold=sim.getEM(sim_dir[i], runnr[i])
        
        ant_pos_shower=sim.ground_to_shower(ant_pos,zenith,az,B=1.1837)
        atm=sim.get_atm(event)
        # returns antenna positions,efield,zenith,az_rot,energy (az=0=east, pi/2=north)
        # efield (3,nant,2, dlen)
        alpha=sim.GetAlpha(zenith,az,1.1837)
        
        filtered_efield=sim.filter(times,efield, 30.0, 80.0)


        fluence=flu.calculate_energy_fluence(filtered_efield, times, signal_window=100., remove_noise=True)

        Erad_new=rad.integral(fluence,ant_pos_shower)


        pos_uvw_vxb=ant_pos_uvw[0::8]
        pos_uvw_vxvxb=ant_pos_uvw[2::8]
        neg_uvw_vxvxb=ant_pos_uvw[6::8]
            
            
        fluence_vxb=fluence21[0::8]
예제 #2
0
        nbins=40
        x0=-600
        xf=600
        y0=-600
        yf=600
        r0=0
        rf=800
        phi0=0
        phif=360
        nbins=50
    #test=int_by_hand(energy,zenith,azimuth,xmax,x0,xf,y0,yf,nbins)
    
        test_r=int_by_hand_rad(energy,zenith,azimuth,xmax,r0,rf,phi0,phif,nbins)
    
    
        alpha=sim.GetAlpha(zenith,azimuth,1.1837)
        int_e_rad= test_r*6.242e18/(np.sin(alpha)**2)
    #int_e_dbl= test_dbl[0]*6.242e18/(np.sin(alpha)**2)

        E_rad = GetIntegral(res['x'][1],res['x'][3],res['x'][0])/(np.sin(alpha)**2)

    # erad_coreas[i]=Srd_1_P[event]
    # erad_int[i]=int_e_rad
    # erad_int_dbl[i]=int_e_dbl

    # erad_ldf[i]=E_rad