File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -371,8 +371,12 @@ def intensity_upd_local(self):
371371 elif self .axis .get () == 2 :
372372 plane = self .cube [:, :, self .plane_num .get ()]
373373 nan_ratio = np .count_nonzero (np .isnan (plane )) / plane .size
374- self .localmax ["text" ] = "{}" .format (np .format_float_scientific (np .nanmax (plane ), 1 ))
375- self .localmin ["text" ] = "{}" .format (np .format_float_scientific (np .nanmin (plane ), 1 ))
374+ if np .isnan (plane ).all ():
375+ self .localmax ["text" ] = "NaN"
376+ self .localmin ["text" ] = "NaN"
377+ else :
378+ self .localmax ["text" ] = "{}" .format (np .format_float_scientific (np .nanmax (plane ), 1 ))
379+ self .localmin ["text" ] = "{}" .format (np .format_float_scientific (np .nanmin (plane ), 1 ))
376380 self .localsum ["text" ] = "{}" .format (np .format_float_scientific (np .nansum (plane ), 1 ))
377381 self .localnanratio ["text" ] = "{}" .format (round (nan_ratio , 2 ))
378382
You can’t perform that action at this time.
0 commit comments