pro gn_GS_trends_test ;cd,'C:\Users\gfleishm\Dropbox\Magnet School\Lecture7(2017)', CURRENT=old_dir cd,'C:\Users\Gelu\Dropbox\Active Projects\Magnet School\Lectures\Lecture7(2017)', CURRENT=old_dir ParmIn=fltarr(29) n=150 ;number of frequencies s=fltarr(5, n) ;s[0, *] - frequency ;s[1, *]=observed (at the Earth) intensity, O-mode ;s[2, *]=exp(-tau) O-mode ;s[3, *]=observed (at the Earth) intensity, X-mode ;s[4, *]=exp(-tau) X-mode ParmIn[0] =(0.5*725d5*10)^2 ;Area, cm^2 arcsec 11 ParmIn[1] =725d5*10*1.5 ;Depth, cm arcsec 11 ParmIn[2] =2.e7 *1e0 ;T_0, K ParmIn[3] =0.07+0.03 ;\eps (not used in this example) ParmIn[4] =4.2 ;\kappa (not used in this example) ParmIn[5] =32 ;16 ;number of integration nodes ParmIn[6] =0.02* 1 ;E_min, MeV ParmIn[7] =10. *1 ;E_max, MeV ParmIn[8] =1.0 ;E_break, MeV (not used in this example) ParmIn[9] =5.25 + 0;4.0 ;\delta_1 ParmIn[10]=6.0 ;\delta_2 (not used in this example) ParmIn[11]=1*3d9 *1;1d11*7 ;n_0 - thermal electron density, cm^{-3} ParmIn[12]=6e7 *1 ;n_b - nonthermal electron density, cm^{-3} ParmIn[13]=650 ;B - magnetic field, G ParmIn[14]=70 ;-50 ;theta - the viewing angle, degrees ParmIn[15]=5e8 ;starting frequency to calculate spectrum, Hz ParmIn[16]=0.02 ;logarithmic step in frequency ParmIn[17]= 3 ;distribution over energy (PLW is chosen) 5 th+ac; 2 th; 3 ac ParmIn[18]= n ;number of frequencies (specified above) ParmIn[19]=1 ;4 ;distribution over pitch-angle (GLC is chosen) ParmIn[20]=60 ;loss-cone boundary, degrees ParmIn[21]=50+10 ;beam direction (degrees) in GAU and SGA (not used in this example) ParmIn[22]=0.4 ;\Delta\mu ParmIn[23]=1 ;a_4 in SGA (not used in this example) ParmIn[25]= 0 ;f^C_cr, smooth 0 ParmIn[26]=ParmIn[25] ;f^WH_cr ParmIn[27]=1 ;matching on ParmIn[28]=2 ;Q-optimization on (with 2 bisection steps before including the term \ln Q) ;Test spectrum JW_fast_code,ParmIn,intensityArr,absorption intensityExtraordinary = intensityArr[3,*] intensityOrdinary = intensityArr[1,*] nu = intensityArr[0,*]*1d-9 I_O=intensityOrdinary ;array of the O-mode intensities, sfu I_X=intensityExtraordinary ;array of the X-mode intensities, sfu ;----------------------------------------------------------------- ;now plotting the spectrum and polarization: maxy=2*max(I_X+I_O) window, 0, title='Intensity';, retain=2 plot, nu, I_X+I_O, /xlog, /ylog, xr=[1,100],/xst,/yst, $ xtitle='!8f!3, GHz', $ ytitle='!8I!3, sfu',linest=0, yrange=[1e-2, maxy],thick=3 cd,old_dir end