Пример #1
0
def main(npulse=100,
         functlist=['spectrums', 'radardata', 'fitting', 'analysis']):
    """ This function will call other functions to create the input data, config
        file and run the radar data sim. The path for the simulation will be 
        created in the Testdata directory in the SimISR module. The new
        folder will be called BasicTest. The simulation is a long pulse simulation
        will the desired number of pulses from the user.
        Inputs
            npulse - Number of pulses for the integration period, default==100.
            functlist - The list of functions for the SimISR to do.
    """

    curloc = Path(__file__).resolve()
    testpath = curloc.parent.parent / 'Testdata' / 'BasicTest'
    if not testpath.is_dir():
        testpath.mkdir(parents=True)

    functlist_default = ['spectrums', 'radardata', 'fitting']
    check_list = sp.array([i in functlist for i in functlist_default])
    check_run = sp.any(check_list)
    functlist_red = sp.array(functlist_default)[check_list].tolist()

    configfilesetup(str(testpath), npulse)
    config = testpath.joinpath('stats.ini')
    (sensdict, simparams) = readconfigfile(str(config))
    makedata(testpath, simparams['Tint'])
    if check_run:
        runsim(functlist_red, str(testpath), config, True)
    if 'analysis' in functlist:
        analysisdump(str(testpath), config)
Пример #2
0
def main(npulse=100, functlist=['spectrums', 'radardata', 'fitting', 'analysis'],radar='pfisr'):
    """ This function will call other functions to create the input data, config
        file and run the radar data sim. The path for the simulation will be
        created in the Testdata directory in the SimISR module. The new
        folder will be called BasicTest. The simulation is a long pulse simulation
        will the desired number of pulses from the user.
        Inputs
            npulse - Number of pulses for the integration period, default==100.
            functlist - The list of functions for the SimISR to do.
    """
    curloc = Path(__file__).resolve()
    testpath = curloc.parent.parent/'Testdata'/'BasicTest'
    if not testpath.is_dir():
        testpath.mkdir(parents=True)

    functlist_default = ['spectrums', 'radardata', 'fitting']
    check_list = sp.array([i in functlist for i in functlist_default])
    check_run = sp.any(check_list)
    functlist_red = sp.array(functlist_default)[check_list].tolist()

    config = testpath.joinpath('stats.yml')
    if not config.exists():
        configfilesetup(str(testpath), npulse, radar)

    (_, simparams) = readconfigfile(str(config))
    makedata(testpath, simparams['Tint'])
    if check_run:
        runsim(functlist_red, str(testpath), config, True)
    if 'analysis' in functlist:
        analysisdump(str(testpath), config)
def main(testpath,npulse = 1400 ,functlist = ['spectrums','radardata','fitting','analysis']):
    """ This function will call other functions to create the input data, config
        file and run the radar data sim. The path for the simulation will be 
        created in the Testdata directory in the SimISR module. The new
        folder will be called BasicTest. The simulation is a long pulse simulation
        will the desired number of pulses from the user.
        Inputs
            npulse - Number of pulses for the integration period, default==100.
            functlist - The list of functions for the SimISR to do.
    """
    
        
    curloc = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
    
    
    
    if not os.path.isdir(testpath):
        os.mkdir(testpath)
        
    functlist_default = ['spectrums','radardata','fitting']
    check_list = sp.array([i in functlist for i in functlist_default])
    check_run =sp.any( check_list) 
    functlist_red = sp.array(functlist_default)[check_list].tolist()

    
    configfilesetup(testpath,npulse)
    config = os.path.join(testpath,'stats.ini')
    (sensdict,simparams) = readconfigfile(config)
    makedata(testpath,simparams['Tint'])
    if check_run :
        runsim(functlist_red,testpath,config,True)
    if 'analysis' in functlist:
        analysisdump(testpath,config)
Пример #4
0
def main(plist=None,
         functlist=['spectrums', 'radardata', 'fitting', 'analysis', 'stats'],
         datadir=None):
    """ This function will call other functions to create the input data, config
        file and run the radar data sim. The path for the simulation will be
        created in the Testdata directory in the SimISR module. The new
        folder will be called BasicTest. The simulation is a long pulse simulation
        will the desired number of pulses from the user.
        Inputs
            npulse - Number of pulses for the integration period, default==100.
            functlist - The list of functions for the SimISR to do.
    """
    if plist is None:
        plist = sp.array([50, 100, 200, 500, 1000, 2000, 5000])
    if isinstance(plist, list):
        plist = sp.array(plist)

    if datadir is None:
        curloc = Path(__file__).resolve().parent
        testpath = curloc.parent.joinpath('Testdata', 'StatsTest')
    else:
        datadir = Path(datadir)
        testpath = datadir

    testpath.mkdir(exist_ok=True, parents=True)

    functlist_default = ['spectrums', 'radardata', 'fitting']
    check_list = sp.array([i in functlist for i in functlist_default])
    check_run = sp.any(check_list)
    functlist_red = sp.array(functlist_default)[check_list].tolist()
    allfolds = []
    #    rsystools = []
    for ip in plist:
        foldname = 'Pulses_{:04d}'.format(ip)
        curfold = testpath.joinpath(foldname)
        allfolds.append(curfold)

        curfold.mkdir(exist_ok=True, parents=True)

        configfilesetup(curfold, ip)
        makedata(curfold)
        config = curfold / 'stats.ini'
        #        rtemp = RadarSys(sensdict,simparams['Rangegatesfinal'],ip)
        #        rsystools.append(rtemp.rms(sp.array([1e12]),sp.array([2.5e3]),sp.array([2.5e3])))
        if check_run:
            runsim(functlist_red, curfold, str(curfold.joinpath('stats.ini')),
                   True)
        if 'analysis' in functlist:
            analysisdump(curfold, config, params=['Ne', 'Te', 'Ti', 'Vi'])
        if 'stats' in functlist:
            makehist(curfold, ip)
Пример #5
0
def main(plist = None, functlist = ['spectrums','radardata','fitting','analysis','stats'], datadir=None):
    """ This function will call other functions to create the input data, config
        file and run the radar data sim. The path for the simulation will be
        created in the Testdata directory in the SimISR module. The new
        folder will be called BasicTest. The simulation is a long pulse simulation
        will the desired number of pulses from the user.
        Inputs
            npulse - Number of pulses for the integration period, default==100.
            functlist - The list of functions for the SimISR to do.
    """
    if plist is None:
        plist = sp.array([50, 100, 200, 500, 1000, 2000, 5000])
    if isinstance(plist, list):
        plist = sp.array(plist)

    if datadir is None:
        curloc = Path(__file__).resolve().parent
        testpath = curloc.parent.joinpath('Testdata', 'StatsTest')
    else:
        datadir = Path(datadir)
        testpath = datadir

    testpath.mkdir(exist_ok=True, parents=True)

    functlist_default = ['spectrums', 'radardata', 'fitting']
    check_list = sp.array([i in functlist for i in functlist_default])
    check_run = sp.any(check_list)
    functlist_red = sp.array(functlist_default)[check_list].tolist()
    allfolds = []
#    rsystools = []
    for ip in plist:
        foldname = 'Pulses_{:04d}'.format(ip)
        curfold = testpath.joinpath(foldname)
        allfolds.append(curfold)

        curfold.mkdir(exist_ok=True, parents=True)

        configfilesetup(curfold, ip)
        makedata(curfold)
        config = curfold/'stats.ini'
#        rtemp = RadarSys(sensdict,simparams['Rangegatesfinal'],ip)
#        rsystools.append(rtemp.rms(sp.array([1e12]),sp.array([2.5e3]),sp.array([2.5e3])))
        if check_run:
            runsim(functlist_red, curfold, str(curfold.joinpath('stats.ini')), True)
        if 'analysis' in functlist:
            analysisdump(curfold, config, params = ['Ne', 'Te', 'Ti', 'Vi'])
        if 'stats' in functlist:
            makehist(curfold, ip)