diff --git a/CreateBash.py b/CreateBash.py index d6be368..01b00bf 100644 --- a/CreateBash.py +++ b/CreateBash.py @@ -2,9 +2,6 @@ work_list = list(range(9,57,4)) - - - with open(output_name, "w") as f: for w in work_list: #f.write('python RotateLearning.py prepare-datasets-flt -W {}\n'.format(w)) diff --git a/DATASET.py b/DATASET.py index 2c40e15..a1abafd 100644 --- a/DATASET.py +++ b/DATASET.py @@ -154,7 +154,6 @@ def generateDS(self, output, mask, w = WindowSize, choosy = False, ratio = 1.0, return [X,Y, IDX] - def generateDSwithFilter(self, dstype, output, mask, w = WindowSize, choosy = False, ratio = 1.0): # When choosy = TRUE : it only picks the fault locations and labels are based on fault angels # ratio coresponds to randomly selecting all possible locations @@ -208,8 +207,6 @@ def generateDSwithFilter(self, dstype, output, mask, w = WindowSize, choosy = Fa return [X,Y, IDX] - - def shrinkMask(self, maskName = 'train', number = 9): # Shrink mask into 1/9 and return 9 masks: @@ -243,8 +240,6 @@ def shrinkMask(self, maskName = 'train', number = 9): return m - - def evaluate(self, _pmap, expand=0, mask = 'all', etype = 'our'): pmap = np.array(_pmap) labels = self.expandBy(width=expand, epsilon=0.9 ,type='normal', set=False) @@ -264,15 +259,12 @@ def evaluate(self, _pmap, expand=0, mask = 'all', etype = 'our'): pmap[np.where(self.MASK == 0)] = 0 - if etype == 'our': IDX_pos = labels > 0 differror = np.square(labels - pmap) differror[~IDX_pos] = 0 pos_score = differror.sum() / IDX_pos.sum() - - IDX_neg = labels <= 0 differror = np.square(labels - pmap) differror[~IDX_neg] = 0 @@ -280,10 +272,8 @@ def evaluate(self, _pmap, expand=0, mask = 'all', etype = 'our'): IDXa = np.where(pmap > 0) - return [pos_score, neg_score] - - + else: EPS = np.finfo(float).eps diff --git a/Demo.py b/Demo.py index 3e8ce71..a3d5462 100644 --- a/Demo.py +++ b/Demo.py @@ -13,8 +13,6 @@ dir3 = './Results/TrainOnRandomSelection_w45_fault/Pmap_exist_quest.npz' dir4 = './Results/TrainOnRandomSelection_w45_fault/PMAP_exist.npz' - - dir5 = './Results/NewTrainingRandom_strip_mixed/Pmamp_Fault_Australia.hdf5Australia_strip.mat.npz' dir6 = './Results/NewTrainingRandom_strip_mixed/Pmamp_Fault_Australia.hdf5QUEST_strip.mat.npz' dir7 = './Results/NewTrainingRandom_strip_mixed/Pmamp_Fault_Mixed.hdf5Australia_strip.mat.npz' @@ -22,16 +20,11 @@ dir9 = './Results/NewTrainingRandom_strip_mixed/Pmamp_Fault_Quest.hdf5Australia_strip.mat.npz' dir10 = './Results/NewTrainingRandom_strip_mixed/Pmamp_Fault_Quest.hdf5QUEST_strip.mat.npz' - dir11 = './Results/First3Layers/Pmamp_Fault_Australia.hdf5Australia_strip.mat.npz' - jdir = './applet.json' # Load and run application: p = PmapViewer(dir=jdir) p.run() - - -#TODO: Prepare a demo video on training phase diff --git a/LogParser.py b/LogParser.py index ff6c9e2..aa8bf28 100644 --- a/LogParser.py +++ b/LogParser.py @@ -6,8 +6,8 @@ model_quest = {} model_mixed = {} - models = [model_australia, model_quest, model_mixed] + for m in models: m['Quest'] = {} m['Australia'] = {} @@ -21,9 +21,6 @@ m[mp]['All_n'] = [] - - - with open("log.txt", "r") as f: for it in range(72): diff --git a/PmapViewer.py b/PmapViewer.py index d77665d..dec75ff 100644 --- a/PmapViewer.py +++ b/PmapViewer.py @@ -66,7 +66,6 @@ def __init__(self, matrix=None, bg = None, dir = None): self.load(dir) - if not bg is None: if len(bg.shape) >= 3: self.bg = bg @@ -96,9 +95,6 @@ def __init__(self, matrix=None, bg = None, dir = None): self.master = tk.Tk() - - - def load(self, dir = './applet.json'): with open(dir) as f: @@ -106,7 +102,6 @@ def load(self, dir = './applet.json'): self.ds = DATASET(self.jfile["dataset"]["link"]) - if LOAD_MODELS: self.wf = int(self.jfile["model1"]["w"]) self.model_flt = MODEL(w=self.wf, param_dir=self.jfile["model1"]["link"]) @@ -126,10 +121,8 @@ def load(self, dir = './applet.json'): #self.angels = h['matrix'] self.angels = np.zeros((self.width, self.height, 36)) - - - sz = MAX_WINDOW_SIZE + if self.width > sz or self.height > sz: if self.width > sz: self.height2 = (sz * self.height) // self.width @@ -142,10 +135,7 @@ def load(self, dir = './applet.json'): self.width2 = self.width - - # -------------------------------------------------------------------------- - def getBackground(self, showLines=False, c1 = 1, c2 = 254, layer=-1): BG = np.ones((self.width, self.height, 3)) @@ -169,7 +159,6 @@ def getBackground(self, showLines=False, c1 = 1, c2 = 254, layer=-1): return np.uint8(BG) - def getImage(self, showLines = False, angels=False, pct = 0.9, onlyMax = True, threshold = 0.5, cb=1, cl=254, sheet=-1, prob=False): p = pmapCutoff(self.matrix, threshold = threshold) @@ -216,8 +205,6 @@ def getImage(self, showLines = False, angels=False, pct = 0.9, onlyMax = True, t im = Image.fromarray(np.uint8(map)) return im - - else: if int(self.jfile["pmap"]["trained"]) == 1: @@ -268,18 +255,13 @@ def getImage(self, showLines = False, angels=False, pct = 0.9, onlyMax = True, t return Image.fromarray(tmp) - - - else: flt_name = self.jfile["filter"]["link"] FLT = FILTER(flt_name) - [X, Y, IDX] = self.ds.generateDSwithFilter(FILTERDIR + 'Filters_0_w45.mat', self.ds.DEGREES, p, ratio=pct, - w=self.wa, - choosy=True) + [X, Y, IDX] = self.ds.generateDSwithFilter(FILTERDIR + 'Filters_0_w45.mat', self.ds.DEGREES, p, ratio=pct, w=self.wa, choosy=True) ang_predictions = np.zeros((len(Y), FLT.N)) @@ -335,7 +317,6 @@ def getImage(self, showLines = False, angels=False, pct = 0.9, onlyMax = True, t return Image.fromarray(BG) - def plotEvaluation(self): fname = './applet_images/plot.png' @@ -362,7 +343,6 @@ def plotEvaluation(self): all_err[i] = self.ds.evaluate(self.matrix, xaxis[i], 'all') - f, axarr = plt.subplots(3, sharey=True) axarr[0].plot(xaxis, train_err[:,0], '+', xaxis, train_err[:,1], 'r--') @@ -371,7 +351,6 @@ def plotEvaluation(self): axarr[0].text(4, 0.5,str, horizontalalignment='right', verticalalignment='center') - axarr[1].plot(xaxis, test_err[:, 0], '+', xaxis, test_err[:, 1], 'r--') axarr[1].set_title('Test errors') str = 'pos: {:10.3f}\n neg:{:10.3f}'.format(np.mean(test_err[:,0]), np.mean(test_err[:,1])) @@ -424,28 +403,20 @@ def showValues(self): im.save('./Temp.png') - def updateImage(self, im): im2 = im.resize((self.width2, self.height2)) photo = ImageTk.PhotoImage(im2) self.panel.configure(image = photo) self.panel.image = photo - - def openImage(self): im = self.requestImage() im.save('./Temp.png') im.show() - - - def close_window(self): self.master.destroy() - - def showclusters(self): p2l = prob2map(self.matrix) @@ -461,7 +432,6 @@ def showclusters(self): return im - def convert2lines(self): p2l = prob2map(self.matrix) @@ -484,17 +454,9 @@ def convert2lines(self): return im - - - - - def run(self): self.master.title("Probability Map Viewer") - - - # FAULT EXISTENSE: # Scale bar to set threshold mainframe = tk.Frame(self.master) @@ -516,20 +478,15 @@ def run(self): frame5 = tk.Frame(mainframe) frame5.pack(side = tk.RIGHT) - - checkFrame = tk.Frame(self.master) checkFrame.pack() buttonFrame = tk.Frame(self.master) buttonFrame.pack() - - # ========================================= # # =============== FRAME 1 ============== # # ========================================= # - self.th = tk.Scale(frame1, from_=1, to=100, orient=tk.HORIZONTAL, label='Labeling threshold', length=200) self.th.set( 50 ) self.th.pack() @@ -538,13 +495,9 @@ def run(self): self.pcth.set( 1 ) self.pcth.pack() - - # ========================================= # # =============== FRAME 2 ============== # # ========================================= # - - self.bgcol = tk.Scale(frame2, from_=0, to=254, orient=tk.HORIZONTAL, length=100) self.bgcol.set(0) self.bgcol.pack() @@ -558,13 +511,9 @@ def run(self): pnl_bar = tk.Label(frame2, image=img_bar) pnl_bar.pack() - - # ========================================= # # =============== FRAME 3 ============== # # ========================================= # - - tbg = tk.Text(frame3, height=2, width=15) tbg.pack() tbg.insert(tk.END, "Background's colour") @@ -573,19 +522,13 @@ def run(self): tl.pack() tl.insert(tk.END, "Line's colour") - - - # ========================================= # # =============== FRAME 4 ============== # # ========================================= # - - tpc = tk.Text(frame4, height=2, width=30) tpc.pack() tpc.insert(tk.END, "Prediction colour:") - self.pcol = tk.Listbox(frame4, height=6) self.pcol.insert(1, 'red') self.pcol.insert(2, 'green') @@ -602,19 +545,13 @@ def run(self): self.pcol.itemconfig(4, {'bg': 'white'}) self.pcol.itemconfig(5, {'bg': 'black', 'fg':'white'}) - - - # ========================================= # # =============== FRAME 5 ============== # # ========================================= # - - tls = tk.Text(frame5, height=2, width=30) tls.pack() tls.insert(tk.END, "Underlying map/sheet:") - self.lselect = tk.Listbox(frame5, height=5) self.lselect.insert(1, 'Empty') self.lselect.insert(2, '1vd_TMI_RTP') @@ -627,30 +564,21 @@ def run(self): self.lselect.insert(9, 'RTP_RI_HGM') self.lselect.pack(side=tk.RIGHT) - - - # ========================================= # # ============== CHECK FRAME ============== # # ========================================= # - - self.CheckVar1 = tk.IntVar() check = tk.Checkbutton(checkFrame , text="Show interpreted lines", variable = self.CheckVar1) check.pack(side=tk.LEFT) - self.CheckVarMode = tk.IntVar() showMax = tk.Checkbutton(checkFrame, text="Maximum/Mode?", variable = self.CheckVarMode) showMax.pack(side=tk.RIGHT) - - self.CheckVarpmap = tk.IntVar() angTik = tk.Checkbutton(checkFrame, text="Show prob map?", variable = self.CheckVarpmap) angTik.pack(side=tk.LEFT) - # ========================================= # # ============== BUTTON FRAME ============= # # ========================================= # @@ -663,20 +591,15 @@ def run(self): tk.Button(buttonFrame, text='Convert to Lines', command=self.convert2lines, bg="yellow", bd=4, fg="yellow").pack( side=tk.RIGHT) - - # ========================================= # # ============== IMAGE FRAME ============== # # ========================================= # - - im = Image.fromarray(self.bg) im = im.resize((self.width2, self.height2)) img = ImageTk.PhotoImage(im) self.panel = tk.Label(self.master, image=img) self.panel.pack() - self.RUN = True self.master.mainloop() diff --git a/Prob2Line.py b/Prob2Line.py index 7e11f7f..ef2c29a 100644 --- a/Prob2Line.py +++ b/Prob2Line.py @@ -17,7 +17,6 @@ import numpy.matlib - METHOD_OPTIONS = ['Linear', 'Curve', 'BestCurve'] METHOD = METHOD_OPTIONS[2] DEGREELIST = [1,3] @@ -148,7 +147,6 @@ def getClusterDistance(self, cmap, c1, c2, center=False): return np.sqrt(D) - def sortClustesrsByDistance(self, cmap, cbase): clist = np.unique(cmap)[1:] d = np.zeros_like(clist) @@ -160,8 +158,6 @@ def sortClustesrsByDistance(self, cmap, cbase): return clist[args] - - def getClusterLinearError(self, cmap, c): centroid = self.getClusterCentroid(cmap, c) centroid = np.uint64(centroid) @@ -188,7 +184,6 @@ def getClusterBestCurveError(self, cmap, c, degree=None): return self.convertCluster2BestCurve(centroid, ind, degree, getError=True) - def convertCluster2Curve(self, center, cluster, degree=3, getError=False): # Cluster : 2xN array [[x1,x2,...],[y1,y2,...]] # Center : [X0,Y0] @@ -215,6 +210,7 @@ def convertCluster2Curve(self, center, cluster, degree=3, getError=False): return [ xset + center[0], yset + center[1] ] + def convertCluster2BestCurve(self, center, cluster, degree=None, getError=False): # Cluster : 2xN array [[x1,x2,...],[y1,y2,...]] # Center : [X0,Y0] @@ -256,7 +252,6 @@ def convertCluster2BestCurve(self, center, cluster, degree=None, getError=False) return [ xset + center[0], yset + center[1] ] - def convertCluster2Line(self, center, cluster, getError=False): # Cluster : 2xN array [[x1,x2,...],[y1,y2,...]] # Center : [X0,Y0] @@ -321,16 +316,12 @@ def doIteration(self, cmap, crange = 5, threshold = 0.8): Best_Desc = "No Merge!" - - for i in range(crange): cprim = cnearby[i+1] if cprim <= 0: continue - - # Computing Error for other cluster if METHOD.__eq__("Linear"): E2 = self.getClusterLinearError(cmap, cprim) @@ -339,12 +330,8 @@ def doIteration(self, cmap, crange = 5, threshold = 0.8): else: E2 = self.getClusterCurveError(cmap, cprim, degree=DEGREE) - - cmerge = self.mergeClusters(cmap, cbase, cprim) - - # Computing Error if merge these two clusters if METHOD.__eq__("Linear"): Emerge = self.getClusterLinearError(cmerge, np.min([cprim, cbase])) @@ -354,8 +341,6 @@ def doIteration(self, cmap, crange = 5, threshold = 0.8): Emerge = self.getClusterCurveError(cmerge, np.min([cprim, cbase]), degree=DEGREE) - - if Emerge < EMIN and E1+E2 >= Emerge * threshold: EMIN = Emerge BestMerge = cmerge @@ -365,7 +350,6 @@ def doIteration(self, cmap, crange = 5, threshold = 0.8): Best_Desc = "--- Merged {} and {}".format(cbase, cprim) - if DEBUG_MODE: print(Best_Desc) print("--- Total number of clusters = {}".format(len(np.unique(BestMerge)))) @@ -373,16 +357,11 @@ def doIteration(self, cmap, crange = 5, threshold = 0.8): return BestMerge - - - - def makeConversion(self, cutoff = 0.3, eps = 0.3): cmap = self.getClusters(cutoff, eps) return self.convertClustersToLines(cmap) - def convertClustersToLines(self, cmap): nclass = np.unique(cmap) lines = [] @@ -444,9 +423,6 @@ def convertClustersToBestCurves(self, cmap, degree = None): return curves - - - def drawLines(self, pachsize = 17, cutoff = 0.3, mincut = 0.2): lines = self.getLines(pachsize, cutoff, mincut) diff --git a/RotateLearning.py b/RotateLearning.py index a2bb4c1..ee1b956 100644 --- a/RotateLearning.py +++ b/RotateLearning.py @@ -20,10 +20,9 @@ # -------------------------------------- - def GET_PARSER(): parser = argparse.ArgumentParser() - parser.add_argument('work', default='teset-choosy') + parser.add_argument('work', default='test-choosy') parser.add_argument('-W', '--WSIZE', type=int, default=45) parser.add_argument('-it', '--iterations', type=int, default=ITERATIONS) parser.add_argument('-prefix', '--prepprefix', default='ANG_') @@ -49,13 +48,8 @@ def SET_DEFAULT_ARGUMENTS(args): parser = GET_PARSER() args = parser.parse_args() work = args.work - #SET_DEFAULT_ARGUMENTS(args) - - - - - + #SET_DEFAULT_ARGUMENTS(args) # ------------------ Training model only on faulty areas ------------------------------------------------------------ if work.__eq__("train-choosy"): @@ -97,27 +91,13 @@ def SET_DEFAULT_ARGUMENTS(args): model.train(X, Y, epochs=1) - - - - - - - - - # ------------------ Testing model only on faulty areas ------------------------------------------------------------ elif work.__eq__("test-choosy"): - - - #testList = list(range(36)) # See Results on all different rotations testList = list([23]) # See Results only on main file (because 36 = 360 degrees rotation = main file) step = np.pi / NUMBER_OF_DEGREE_MODELS - - for i in testList: if DEBUG_MODE: @@ -168,16 +148,6 @@ def SET_DEFAULT_ARGUMENTS(args): tmp = drawLinesSlope(empty, IDX, MaxSlope, ws=6, fname=FG + 'Predictions_Overlay_{}.png'.format(i + 1)) - - - - - - - - - - # ------------------ Train Fault detection method on all area, Not break mask, instead Bootstrapping on all input images ----------------------------- elif work.__eq__("train-fault-all"): @@ -220,15 +190,6 @@ def SET_DEFAULT_ARGUMENTS(args): model.train(X,Y,epochs=1) - - - - - - - - - # ------------------ Test Fault detection method on all area, break mask ----------------------------- elif work.__eq__("test-fault-all"): @@ -283,17 +244,6 @@ def SET_DEFAULT_ARGUMENTS(args): showMatrix(mergeAll, dim=3, fname=FG + 'MergeAll_{}.png'.format(i+1), show=False) #showMatrix(mergeAll, dim=3, fname=FG + 'MergeAll_QUEST_{}.png'.format(i + 1), show=False) - - - - - - - - - - - # ------------------ Test Fault detection method on all area, break mask ----------------------------- elif work.__eq__("test-fault-all-derotate"): @@ -353,18 +303,6 @@ def SET_DEFAULT_ARGUMENTS(args): im.save(FG+'mergeTest.png') - - - - - - - - - - - - elif work.__eq__("prepare-datasets-ang"): ds = DATASET(DSDIR + 'Australia_360.mat') @@ -389,35 +327,21 @@ def SET_DEFAULT_ARGUMENTS(args): np.savez(FNAME+'{}'.format(t1), X=X, Y=Y) - - - - - - - - - - elif work.__eq__("prepare-datasets-flt"): W = args.WSIZE - ds1 = DATASET(DSDIR + 'Australia_strip.mat') ds2 = DATASET(DSDIR + 'QUEST_strip.mat') RATIO = [0.04, 0.005] oname = ['A_','Q_'] - ds1.expandBy(width=W, epsilon=0.9) ds2.expandBy(width=W, epsilon=0.9) ds = [ds1, ds2] - - NFILE = [100,100] for t2 in range(len(ds)): @@ -430,17 +354,6 @@ def SET_DEFAULT_ARGUMENTS(args): np.savez(FNAME, X=X, Y=Y) - - - - - - - - - - - elif work == "train-prepared": W = args.WSIZE @@ -482,15 +395,6 @@ def SET_DEFAULT_ARGUMENTS(args): model.train(X, Y, epochs=1) - - - - - - - - - elif work.__eq__("test-fault-all-prep"): testList = ['Australia_strip.mat', 'QUEST_strip.mat'] @@ -512,7 +416,6 @@ def SET_DEFAULT_ARGUMENTS(args): O[:, :, 2] = ds.OUTPUT * 255 O = np.uint8(O) - if DEBUG_MODE: print("-"*30) print("Loading Model W = {}".format(W)) @@ -534,16 +437,6 @@ def SET_DEFAULT_ARGUMENTS(args): P.save(dir = FG + 'Probmap_{}.npz'.format(idx)) - - - - - - - - - - elif work.__eq__("test-choosy-prepared"): #testList = list(range(36)) # See Results on all different rotations @@ -555,7 +448,6 @@ def SET_DEFAULT_ARGUMENTS(args): model = MODEL(w=W, param_dir=CB + 'Rotate_choosy.hdf5') - for i in testList: if DEBUG_MODE: @@ -588,14 +480,8 @@ def SET_DEFAULT_ARGUMENTS(args): P.save(dir=FG + 'Probmap_choosy_{}.npz'.format(idx)) - - - - - - elif work.__eq__("apply-on-prediction"): - Wf = 45 # Fault deteciton window size + Wf = 45 # Fault detection window size Wa = 45 # Angel detection window size threshold = 0.4 @@ -654,24 +540,18 @@ def SET_DEFAULT_ARGUMENTS(args): tmp = drawLinesSlope(empty, IDX, MaxSlope, ws=15, fname=FG + 'Combined_Ovelay.png') - - - - elif work.__eq__("prepare-pmap"): Wf = args.WSIZE ratio = 0.999 testList = ['Australia_strip.mat', 'QUEST_strip.mat'] - for T in testList: ds_fname = DSDIR + T ds = DATASET(ds_fname) model_flt = MODEL(w=Wf, param_dir=CB + args.callback) - masknumber = 80 masks = ds.shrinkMask(maskName="all", number=masknumber) pmap = np.zeros(ds.OUTPUT.shape) @@ -682,7 +562,6 @@ def SET_DEFAULT_ARGUMENTS(args): pmap_tmp = probMap(ds.OUTPUT.shape, IDX, Yh1) pmap = np.maximum(pmap, pmap_tmp) - # Logging activity: L = Logger() L.addlog("-"*30) @@ -698,7 +577,6 @@ def SET_DEFAULT_ARGUMENTS(args): L.addlog(" Test Error = {} , {}".format(ev_test[0], ev_test[1])) L.addlog(" All Error = {} , {}".format(ev_all[0], ev_all[1])) - pmapname = PMAP_DIR + '{}_Pmamp_'.format(Wf)+ args.callback + '_on_{}_'.format(T[:5]) + '.npz' np.savez(pmapname, matrix=pmap) @@ -747,8 +625,6 @@ def SET_DEFAULT_ARGUMENTS(args): sio.savemat('loss_'+ args.callback + "_" + T + "_eval.mat", errors) - - else: print(globals()) print("No job is defined!") diff --git a/Utility.py b/Utility.py index 83a3c86..b34b3a0 100644 --- a/Utility.py +++ b/Utility.py @@ -7,13 +7,11 @@ from globalVariables import * - def slideBar(pct = 10.0, totalLength = 30): [p1,p2] = [(pct*totalLength)//100 , ((100-pct)*totalLength)//100] return '{'+ '='*int(p1) +'#'+ '-'*int(p2) +'}' - def myNormalizer(matrix): xmax, xmin = matrix.max(), matrix.min() @@ -44,7 +42,6 @@ def myNormalizer(matrix): return matrix - def rotateWithMap(mat, rmap, map_type = 'r2m', dim = 1): MODE_VALUE = 100000 @@ -109,7 +106,6 @@ def rotateWithMap(mat, rmap, map_type = 'r2m', dim = 1): return newMat - def showMatrix(matrix , dim = 3, fname = FG+'DEFAULT.png', show = True): a = np.array(matrix) @@ -146,7 +142,6 @@ def markPredictions(matrix, pmap, WIDTH = 3 , FILL = 128, fname = FG+'Default.pn return im - def drawLines(matrix, idx , Y, WIDTH = 3 , FILL = 128, ws = 50, fname = FG+'lines.png', threshold = 0.51): # ws = window size, how many pixels go left or right in x-axis @@ -281,9 +276,6 @@ def drawCurves(bg, curves, fname=FG+'curves.png', _width=5): return im - - - def colour2vec(colour = 'red'): if colour.__eq__('red'): return np.array([1,0,0]) @@ -301,7 +293,6 @@ def colour2vec(colour = 'red'): return np.array([0, 0, 0]) - def getRandomColour(channel=3, tint = 'default'): if tint == 'red': @@ -326,7 +317,6 @@ def getRandomColour(channel=3, tint = 'default'): return np.random.choice(range(10, 255), channel) - def circular_mask(width = 5 , R = None): radius = (width - 1) / 2 diff --git a/temp.py b/temp.py index 3dd905a..4753217 100644 --- a/temp.py +++ b/temp.py @@ -7,22 +7,10 @@ #p2l = prob2map(pmap) #p2l.runMethod(coeff=0.66, eps = 3, iteration=350) - - - - - - from DATASET import * import scipy.io as sio -# -------------------------------------- - - - - - - +# -------------------------------------- testList = ['Australia_strip.mat', 'QUEST_strip.mat'] for T in testList: ds_fname = DSDIR + T @@ -70,7 +58,6 @@ sio.savemat(T[0:5]+'_extreme.mat' , [z,r,o] ) - pmapname = '45_Pmamp_45_Fault_Quest.hdf5_on_QUEST_.npz' outputname = 'Quest_on_Quest'