109109p .resProj = 0
110110p .PDsizeThL = 100
111111p .PDsizeThH = 2000
112- p .dim = 2
112+ if Beta :
113+ p .dim = 1
114+ else :
115+ p .dim = 2
113116p .ncpu = 1
114117p .num_psis = 8
115118p .user_dir = pyDir
116119p .proj_name = time_init
117120p .temperature = 25
121+ # as a note, the word 'ZULU' is used throughout this document as a bookmark for pending items by E. Seitz.
118122
119123# =============================================================================
120124# Command line arguments:
@@ -8063,9 +8067,22 @@ def replot(self):
80638067 ThreshAllCanvas .entry_high .setDisabled (True )
80648068
80658069 def confirmThresh (self ):
8066- p .PDsizeThL = ThreshAllCanvas .thresh_low
8067- p .PDsizeThH = ThreshAllCanvas .thresh_high
8068- self .DataStart ()
8070+ if len (ThreshAllCanvas .in_PrDs ) > 2 :
8071+ p .PDsizeThL = ThreshAllCanvas .thresh_low
8072+ p .PDsizeThH = ThreshAllCanvas .thresh_high
8073+ self .DataStart ()
8074+ else :
8075+ msg = 'A minimum of 3 PDs are required.\
8076+ <br /><br />\
8077+ Please select new thresholds before updating.'
8078+ box = QtGui .QMessageBox (self )
8079+ box .setWindowTitle ('%s Error' % progname )
8080+ box .setText ('<b>Input Error</b>' )
8081+ box .setFont (font_standard )
8082+ box .setIcon (QtGui .QMessageBox .Warning )
8083+ box .setInformativeText (msg )
8084+ box .setStandardButtons (QtGui .QMessageBox .Ok )
8085+ ret = box .exec_ ()
80698086
80708087 def DataStart (self ):
80718088 ThreshAllCanvas .btn_update .setDisabled (True )
@@ -8582,7 +8599,7 @@ def noReturn():
85828599 fname = open (os .path .join (P1 .user_directory ,'outputs_{}/selecGCs' .format (p .proj_name )), 'rb' )
85838600 data = pickle .load (fname )
85848601 # all tessellated bins:
8585- totalPrDs = np . int (np .shape (data ['CG1' ])[0 ])
8602+ totalPrDs = int (np .shape (data ['CG1' ])[0 ])
85868603 mid = np .floor (np .shape (data ['CG1' ])[0 ]/ 2 )
85878604 NC1 = data ['NC' ][:int (mid )]
85888605 NC2 = data ['NC' ][int (mid ):]
@@ -9193,7 +9210,7 @@ def onTabChange(self,i):
91939210 mid = np .floor (np .shape (data ['CG1' ])[0 ]/ 2 )
91949211 NC1 = data ['NC' ][:int (mid )]
91959212 NC2 = data ['NC' ][int (mid ):]
9196-
9213+
91979214 P1 .all_PrDs = []
91989215 P1 .all_occ = []
91999216 P1 .thresh_PrDs = []
@@ -9226,7 +9243,7 @@ def onTabChange(self,i):
92269243 P1 .thresh_occ .append (i )
92279244 pd += 1
92289245 pd_all += 1
9229-
9246+
92309247 # ad hoc ratios to make sure S2 volume doesn't freeze-out due to too many particles to plot:
92319248 ratio1 = float (sum (P1 .all_occ ))/ 100
92329249 ratio2 = float (sum (P1 .all_occ ))/ 5000
@@ -9235,21 +9252,21 @@ def onTabChange(self,i):
92359252 P1 .S2_density_all = list (filter (lambda a : a > int (ratio2 ), P1 .S2_density_all ))
92369253 P2 .viz1 .update_S2_density_all ()
92379254 P2 .viz1 .update_S2_params ()
9238-
9255+
92399256 # draw/update plots on Distribution tab:
92409257 P2 .viz1 .update_scene2 ()
92419258 P2 .viz1 .update_scene1 ()
9242-
9259+
92439260 # read points from tessellated sphere:
92449261 PrD_map1 = os .path .join (P1 .user_directory ,'outputs_{}/topos/Euler_PrD/PrD_map1.txt' .format (p .proj_name ))
92459262 PrD_map1_eul = []
92469263 with open (PrD_map1 ) as values :
92479264 for column in zip (* [line for line in csv .reader (values , dialect = "excel-tab" )]):
92489265 PrD_map1_eul .append (column )
9249-
9266+
92509267 P1 .all_phi = PrD_map1_eul [2 ]
92519268 P1 .all_theta = PrD_map1_eul [1 ]
9252-
9269+
92539270 fname .close ()
92549271 # =========================================================
92559272
0 commit comments