Example #1
0
def main(argv):

    kinput=1
    try:
      opts, args = getopt.getopt(argv,"hp:o:",["pulses=","ofile="])
    except getopt.GetoptError:
      print 'radarsystools.py -p <number of pulses> -o <outputfile>'
      sys.exit(2)
    for opt, arg in opts:
      if opt == '-h':
         print 'radarsystools.py -p <number of pulses> -o <outputfile>'
         sys.exit()
      elif opt in ("-p", "--pulses"):
         kinput = int(arg)
      elif opt in ("-o", "--ofile"):
          print "Still have to add output file feature. I'm working on it... may be..."

    print "Without angle"
    sensdict = sensconst.getConst('risr')
    sensdict['tau'] = 320e-6
    r_sys = RadarSys(sensdict,Kpulse = kinput)
    r_sys.printsnr(ne = np.array([1e11,2e11]),te=np.array([1e3,2e11]),ti=np.array([1e3,2e11]))
    r_sys.printrms(ne = np.array([1e11,2e11]),te=np.array([1e3,2e11]),ti=np.array([1e3,2e11]))
    r_sys.printfracrms(ne = np.array([1e11,2e11]),te=np.array([1e3,2e11]),ti=np.array([1e3,2e11]))
    print "\n\n"


    angles = [(90,85)]
    ang_data = np.array([[iout[0],iout[1]] for iout in angles])
    sensdict = sensconst.getConst('risr',ang_data)
    sensdict['tau'] = 320e-6

    print "With Angle"
    r_sys = RadarSys(sensdict,Kpulse = kinput)
    r_sys.printsnr(ne = np.array([1e11,2e11]),te=np.array([1e3,2e11]),ti=np.array([1e3,2e11]))
    r_sys.printrms(ne = np.array([1e11,2e11]),te=np.array([1e3,2e11]),ti=np.array([1e3,2e11]))
    r_sys.printfracrms(ne = np.array([1e11,2e11]),te=np.array([1e3,2e11]),ti=np.array([1e3,2e11]))
Example #2
0
        Titemp[auglist] = Titemp[auglist]*ratiodiff
        Tetemp[auglist] = Tetemp[auglist]*ratiodiff
        curprofile[auglist] = val
        #densitys
        params[:,it,0,0] = curprofile
        params[:,it,1,0] = curprofile
        #tempreturs
        params[:,it,0,1] = Tetemp
        params[:,it,1,1] = Titemp
        #veclocity
        params[:,it,0,2] = Vi_all
        params[:,it,1,2] = Vi_all
        #charge
        params[:,it,0,3] = 1.0
        params[:,it,1,3] = 1.0
        #mass
        params[:,it,0,4] = 1.0
        params[:,it,1,4] = 16.0
        #collision frequency
        params[:,it,0,5] = 0.0
        params[:,it,1,5] = 0.0


    Icont1 = IonoContainer(coordlist=coords,paramlist=params,times = timevec,coordvecs=coordVecs)
#    Icont1.savemat(os.path.join(testpath,'pathwtempdoppler.mat'))

    sensdict = sensconst.getConst('risr')

    Icont2 = Icont1.makespectruminstance(sensdict,128)
#    Icont2.savemat(os.path.join(testpath,'pa'))