Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
marinerhemant committed Jun 12, 2020
1 parent 9cdf95b commit 8bba087
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 11 additions & 2 deletions gui/nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 4 additions & 2 deletions utils/NFGrainCentroids.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8bba087

Please sign in to comment.