示例#1
0
#   looping the code


for a in obs.shortlist:
    #obsTime="20130829.1800"
    #kongreyDSS.load()   # reload
    dss.unload()
    obsTime = a.dataTime
    pp.pipeline(dss=dss,
                filteringAlgorithm      = filters.gaussianFilter,
                filteringAlgorithmArgs  = {'sigma':5,
                                           'stream_key': "obs" },
                matchingAlgorithm       = algorithms.nonstandardKernel,
                matchingAlgorithmArgs   = {'obsTime': obsTime, 'maxHourDiff':7, 
                                           'regions':regions,
                                           'k'      : 24,   # steps of semi-lagrangian advections performed
                                            'shiibaArgs':{'searchWindowWidth':11, 'searchWindowHeight':7, },
                                            'outputFolder':outputFolder,
                                            'volumeProportionWeight':volumeProportionWeight,
                                           } ,
                outputFolder=outputFolder,
                toLoad=False,
                #remarks= "Covariance used, rather than correlation:  algorithms.py line 221:   tempScore   = a1.cov(w1)[0,1]",
                remarks = "Correlation used"
                )


print 'start time:', startTime
print 'total time spent:', time.time()-time0

示例#2
0

for a in obs.shortlist:
    # obsTime="20130829.1800"
    # kongreyDSS.load()   # reload
    dss.unload()
    obsTime = a.dataTime
    pp.pipeline(
        dss=dss,
        filteringAlgorithm=filters.gaussianFilter,
        filteringAlgorithmArgs={"sigma": 5, "stream_key": "all"},
        matchingAlgorithm=algorithms.nonstandardKernel,
        matchingAlgorithmArgs={
            "obsTime": obsTime,
            "maxHourDiff": 6,
            "regions": regions,
            "k": 24,  # steps of semi-lagrangian advections performed
            "shiibaArgs": {"searchWindowWidth": 15, "searchWindowHeight": 9},
            "outputFolder": outputFolder,
            "volumeProportionWeight": volumeProportionWeight,
        },
        outputFolder=outputFolder,
        toLoad=False,
        # remarks= "Covariance used, rather than correlation:  algorithms.py line 221:   tempScore   = a1.cov(w1)[0,1]",
        remarks="Correlation used",
    )


print "start time:", startTime
print "total time spent:", time.time() - time0
for a in obs.shortlist:
    #obsTime="20130829.1800"
    #kongreyDSS.load()   # reload
    dss.unload()
    obsTime = a.dataTime
    pp.pipeline(dss=dss,
            #filteringAlgorithm      = filters.gaussianFilter,
            #filteringAlgorithmArgs  = {'sigma':5,
            #                           'stream_key': "obs" },
            filteringAlgorithm      =    "",
            matchingAlgorithm       = algorithms.shiftedCorr,
            matchingAlgorithmArgs   = {'obsTime': obsTime, 'maxHourDiff':6, 
                                       'regions':regions,
                                        'outputFolder':outputFolder,
                                        'volumeProportionWeight':volumeProportionWeight,
                                        'maxLatDiff': 16,
                                        'maxLongDiff': 24,
                                        'shiftStep':  4,
                                       } ,
            outputFolder=outputFolder,
            toLoad=False,
            #remarks= "Covariance used, rather than correlation:  algorithms.py line 221:   tempScore   = a1.cov(w1)[0,1]",
            remarks = "Correlation used"
            )


print 'start time:', startTime
print 'total time spent:', time.time()-time0

示例#4
0
文件: start3a.py 项目: rainly/armor
hualien4 = misc.getFourCorners(dp.hualienCounty)
yilan4   = misc.getFourCorners(dp.yilanCounty)
kaohsiung4  = misc.getFourCorners(dp.kaohsiungCounty)
regions = [{'name': "hualien", 'points': hualien4, 'weight': 0.4},
            {'name': "kaohsiung", 'points':kaohsiung4, 'weight':0.3},
            {'name':"yilan", 'points':yilan4, 'weight':0.3},
            ]

###     next up:  work on the i/o so that i don't need to exit/re-enter ipython every time
#   for loop added 18-03-2014
for a in kongreyDSS.obs:    
    kongreyDSS.load()   # reload
    pp.pipeline(dss=kongreyDSS,
            filteringAlgorithm         = filters.gaussianFilter,
            filteringAlgorithmArgs              = {'sigma':5},
            matchingAlgorithm       = algorithms.nonstandardKernel,
            matchingAlgorithmArgs   = {'obsTime': a.dataTime, 'maxHourDiff':7, 
                                       'regions':regions,
                                       'k'      : 48,   # steps of semi-lagrangian advections performed
                                        'shiibaArgs':{'searchWindowWidth':11, 'searchWindowHeight':11, },
                                       } ,
            outputFolder=dp.defaultRootFolder + "labReports/2014-03-07-filter-matching-scoring-pipeline/",
            toLoad=False,
            remarks= "Covariance used, rather than correlation:  algorithms.py line 221:   tempScore   = a1.cov(w1)[0,1]",
            )


print 'start time:', startTime
print 'time spent:', time.time()-time0

示例#5
0
if not os.path.exists(outputFolder):
    os.makedirs(outputFolder)
shutil.copyfile(dp.defaultRootFolder+"python/armor/validation/"+ scriptFileName, outputFolder+ scriptFileName)
shutil.copyfile(dp.defaultRootFolder+"python/armor/patternMatching/algorithms.py", outputFolder+ "algorithms.py")
shutil.copyfile(dp.defaultRootFolder+"python/armor/patternMatching/pipeline.py", outputFolder+ "pipeline.py")

################################################################################
#   looping the code


for a in obs.shortlist:
    #obsTime="20130829.1800"
    #kongreyDSS.load()   # reload
    dss.unload()
    obsTime = a.dataTime
    pp.pipeline(dss=dss,
            filteringAlgorithm      = filteringAlgorithm,
            filteringAlgorithmArgs  = filteringAlgorithmArgs,
            matchingAlgorithm       = matchingAlgorithm,
            matchingAlgorithmArgs   = matchingAlgorithmArgs,
            outputFolder=outputFolder,
            toLoad=False,
            #remarks= "Covariance used, rather than correlation:  algorithms.py line 221:   tempScore   = a1.cov(w1)[0,1]",
            remarks = "Correlation used"
            )


print 'start time:', startTime
print 'total time spent:', time.time()-time0