diff --git a/gui/nf.py b/gui/nf.py index 2053994b..a3492318 100644 --- a/gui/nf.py +++ b/gui/nf.py @@ -177,14 +177,17 @@ def plot_updater(): startframenr = newstartframenr dist = newdist draw_plot() - if micfiledata is not None: + if bPlot is not None: plotb() + if micPlot is not None: + plotmic() def plotb(): global horvert global clickpos global cb global initplotb + global micPlot, micfiledata, bPlot if cb is not None: cb.remove() cb = None @@ -226,6 +229,8 @@ def plotb(): canvas.draw() canvas.get_tk_widget().grid(row=0,column=0,columnspan=figcolspan,rowspan=figrowspan,sticky=Tk.W+Tk.E+Tk.N+Tk.S) b.set_aspect('auto') + bPlot = 1 + micPlot = None micfiledata = None def onclick(event): @@ -677,7 +682,6 @@ def plot_update_spot(): minOme = min(startome,endome) maxOme = max(startome,endome) startframenr = int(startframenrvar.get()) - thisome = float(simulatedspots[spotnr-1].split(' ')[2]) rad = float(simulatedspots[spotnr-1].split(' ')[0]) rad = rad * thislsd/simlsd @@ -799,6 +803,9 @@ def plotmic(): global colVar global cb global micfiledatacut + global micPlot, bPlot + micPlot = 1 + bPlot = None if not initplotb: lims = [b.get_xlim(), b.get_ylim()] cb.remove() @@ -1081,6 +1088,8 @@ def findOrientation(): initplotb = 1 colVar = Tk.IntVar() colVar.set(10) +bPlot = None +micPlot = None micfiledata = None dolog = Tk.IntVar() r = Tk.StringVar() diff --git a/utils/NFGrainCentroids.py b/utils/NFGrainCentroids.py index 6a7505dc..5f09b99b 100644 --- a/utils/NFGrainCentroids.py +++ b/utils/NFGrainCentroids.py @@ -2,8 +2,10 @@ import os from math import radians, cos, sin -nLayers = 7 -nGrains = 226 +# ~ nLayers = 7 +# ~ nGrains = 226 +nLayers = 5 +nGrains = 382 micFN = 'MicrostructureZrTxt.mic' outFN = 'GrainCentroidsWeighted.csv' minConfidence = 0.5