O6temp = [] ix, iz, x, z, lx, lz, xmax, zmax = ps.get_wind_geom(fname + ".ionH1.dat") H1 = ps.pywind_read(fname + ".ionH1.dat", ix, iz) H2 = ps.pywind_read(fname + ".ionH2.dat", ix, iz) H = np.empty([iz, ix]) for i in range(iz): for j in range(ix): H[i][j] = np.log10(H1[i][j] + H2[i][j]) te = ps.pywind_log_read(fname + ".te.dat", ix, iz) tr = ps.pywind_log_read(fname + ".tr.dat", ix, iz) vx = ps.pywind_read(fname + ".vrho.dat", ix, iz) vz = ps.pywind_read(fname + ".vz.dat", ix, iz) # nagn=ps.pywind_log_read(fname+'.nphot.dat',ix,iz) ne = ps.pywind_log_read(fname + ".ne.dat", ix, iz) ll = ps.pywind_log_read(fname + ".line_lum.dat", ix, iz) lt = ps.pywind_log_read(fname + ".tot_lum.dat", ix, iz) lff = ps.pywind_log_read(fname + ".ff_lum.dat", ix, iz) lfb = ps.pywind_log_read(fname + ".fb_lum.dat", ix, iz) vxz = np.empty([iz, ix]) for i in range(iz): for j in range(ix): vxz[i][j] = np.log10(np.sqrt(vx[i][j] * vx[i][j] + vz[i][j] * vz[i][j]))
def read2(fname): x=[] z=[] x1=[] z1=[] lx=[] lz=[] lx1=[] lz1=[] data=[] IPtemp=[] tetemp=[] nhtemp=[] xtemp=[] ztemp=[] tetemp=[] trtemp=[] convtemp=[] vx=[] vz=[] H1=[] H2=[] C4temp=[] Si4temp=[] N5temp=[] O6temp=[] ix,iz,x,z,lx,lz,xmax,zmax=ps.get_wind_geom(fname+'.ioncH1.dat') H1=ps.pywind_read(fname+'.ioncH1.dat',ix,iz) H2=ps.pywind_read(fname+'.ioncH2.dat',ix,iz) H=np.empty([iz,ix]) for i in range(iz): for j in range(ix): H[i][j]=np.log10(H1[i][j]+H2[i][j]) IP=ps.pywind_read(fname+'.IP.dat',ix,iz) te=ps.pywind_log_read(fname+'.te.dat',ix,iz) tr=ps.pywind_log_read(fname+'.tr.dat',ix,iz) vx=ps.pywind_read(fname+'.vrho.dat',ix,iz) vz=ps.pywind_read(fname+'.vz.dat',ix,iz) nagn=ps.pywind_log_read(fname+'.nphot.dat',ix,iz) n_e=ps.pywind_log_read(fname+'.ne.dat',ix,iz) vxz=np.empty([iz,ix]) for i in range(iz): for j in range(ix): vxz[i][j]=np.log10(np.sqrt(vx[i][j]*vx[i][j]+vz[i][j]*vz[i][j])) #These are the lines for reading in all the extra ions fractions C3=ps.pywind_log_read(fname+'.ionC3.dat',ix,iz) C4=ps.pywind_log_read(fname+'.ionC4.dat',ix,iz) C5=ps.pywind_log_read(fname+'.ionC5.dat',ix,iz) C6=ps.pywind_log_read(fname+'.ionC6.dat',ix,iz) C7=ps.pywind_log_read(fname+'.ionC7.dat',ix,iz) Si4=ps.pywind_log_read(fname+'.ionSi4.dat',ix,iz) N5=ps.pywind_log_read(fname+'.ionN5.dat',ix,iz) O6=ps.pywind_log_read(fname+'.ionO6.dat',ix,iz) cmdline='py_wind '+fname+' < ~/Documents/Analysis_Scripts/pywindcmds2' subprocess.check_call(cmdline,shell=True) ndisk=ps.pywind_log_read(fname+'.nphot.dat',ix,iz) tauc4=ps.pywind_read(fname+'.ionC4.dat',ix,iz) geoms=np.array([H,vxz,te,tr, IP,nagn,ndisk,n_e]) ions=np.array([C3,C4,C5,C6,C7,Si4,N5,O6]) print 'GEOMS ARRAY: [H,vxz,te,tr, IP,nagn,ndisk,n_e]' print 'IONS ARRAY: [C3,C4,C5,C6,C7,Si4,N5,O6]' return ions, geoms
ix,iz,x,z,lx,lz,xmax,zmax=ps.get_wind_geom(fname+'.ioncH1.dat') H1=ps.pywind_read(fname+'.ioncH1.dat',ix,iz) H2=ps.pywind_read(fname+'.ioncH2.dat',ix,iz) H=np.empty([iz,ix]) for i in range(iz): for j in range(ix): H[i][j]=np.log10(H1[i][j]+H2[i][j]) IP=ps.pywind_read(fname+'.IP.dat',ix,iz) te=ps.pywind_log_read(fname+'.te.dat',ix,iz) tr=ps.pywind_log_read(fname+'.tr.dat',ix,iz) vx=ps.pywind_read(fname+'.vx.dat',ix,iz) vz=ps.pywind_read(fname+'.vz.dat',ix,iz) nagn=ps.pywind_log_read(fname+'.nphot.dat',ix,iz) ne=ps.pywind_log_read(fname+'.ne.dat',ix,iz) ll=ps.pywind_log_read(fname+'.line_lum.dat',ix,iz) lt=ps.pywind_log_read(fname+'.tot_lum.dat',ix,iz) vxz=np.empty([iz,ix]) for i in range(iz): for j in range(ix): vxz[i][j]=np.log10(np.sqrt(vx[i][j]*vx[i][j]+vz[i][j]*vz[i][j]))
ix,iz,x,z,lx,lz,xmax,zmax=ps.get_wind_geom(fname+ionstring+'H1.dat') H1=ps.pywind_read(fname+ionstring+'H1.dat',ix,iz) H2=ps.pywind_read(fname+ionstring+'H2.dat',ix,iz) H=np.empty([iz,ix]) for i in range(iz): for j in range(ix): H[i][j]=np.log10(H1[i][j]+H2[i][j]) te=ps.pywind_log_read(fname+'.te.dat',ix,iz) tr=ps.pywind_log_read(fname+'.tr.dat',ix,iz) vx=ps.pywind_read(fname+'.vrho.dat',ix,iz) vz=ps.pywind_read(fname+'.vz.dat',ix,iz) #nagn=ps.pywind_log_read(fname+'.nphot.dat',ix,iz) ne=ps.pywind_log_read(fname+'.ne.dat',ix,iz) ll=ps.pywind_log_read(fname+'.line_lum.dat',ix,iz) lt=ps.pywind_log_read(fname+'.tot_lum.dat',ix,iz) lff=ps.pywind_log_read(fname+'.ff_lum.dat',ix,iz) lfb=ps.pywind_log_read(fname+'.fb_lum.dat',ix,iz) if vers!='58': heatphoto=ps.pywind_log_read(fname+'heat_photo.dat',ix,iz) heatff=ps.pywind_log_read(fname+'heat_ff.dat',ix,iz) heatline=ps.pywind_log_read(fname+'heat_lines.dat',ix,iz) else: heatphoto,heatff,heatline=te,te,te