From 6d671c7d8766ec73b54817820f7852545e2480e1 Mon Sep 17 00:00:00 2001 From: Wenduo Zhou Date: Mon, 5 Nov 2018 14:34:49 -0500 Subject: [PATCH] Refs #42. Fixed an error if pole figure contour is init to nan. pyrs/core/mantid_fit_peak.py:249: # TODO - 20181101 - Need to expand this method such that all fitted parameters will be added to output pyrs/interface/ui/diffdataviews.py:113: # TODO - 20181101 - Enable after auto_scale is fixed: self.auto_rescale() pyrs/interface/ui/mplgraphicsview1d.py:287: # TODO FIXME - 20181101 - This is a broken method. Fix it! pyrs/core/strain_stress_calculator.py:497: # TODO FIXME - 20181001 - Temporarily disabled in order to clean up for the new workflow pyrs/core/strain_stress_calculator.py:1417: # TODO - 20181010 - check whether all the raw files (e11/e22/e33) are ready for next! pyrs/interface/strainstresscalwindow.py:388: # TODO - 20181010 - Refactor! pyrs/interface/strainstresscalwindow.py:872: # TODO - 20181011 - Implement (from cleaning old codes) pyrs/interface/strainstresscalwindow.py:873: # TODO - ASAP - 20181011 - Continue from here! pyrs/interface/strainstresscalwindow.py:1056: # # TODO - 20181010 - Consider how to integrate method plot_peak_parameter() pyrs/interface/manualreductionwindow.py:140: # TODO - 20181009 - Need to refine pyrs/interface/manualreductionwindow.py:207: # TODO - 20181006 - Implement ASAP pyrs/interface/manualreductionwindow.py:297: # TODO - 20181008 - ASAP tests/unittest/straincalculationtest.py:75: # TODO FIXME - 20181001 - Make an individual method for .... ---> New workflow! tests/unittest/straincalculationtest.py:77: # TODO FIXME - 20181001 - This is a new suite of methods to analyze the sample grids --- pyrs/interface/ui/diffdataviews.py | 3 ++- pyrs/interface/ui/mplgraphicsviewpolar.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyrs/interface/ui/diffdataviews.py b/pyrs/interface/ui/diffdataviews.py index 51bed4acc..6ada694b7 100644 --- a/pyrs/interface/ui/diffdataviews.py +++ b/pyrs/interface/ui/diffdataviews.py @@ -45,8 +45,9 @@ def plot_pole_figure(self, vec_alpha, vec_beta, vec_intensity): # else: # plot contour # TODO - make the grid of r converted from linear grid on alpha + init_value = np.nan # np.nan self._myCanvas.plot_contour(vec_theta=vec_beta, vec_r=vec_r, vec_values=vec_intensity, max_r=90., - r_resolution=5., theta_resolution=5., init_value=np.nan) + r_resolution=5., theta_resolution=5., init_value=init_value) # TODO - convert (vec_r, vec_beta) to X, Y and do a scattering in another diff --git a/pyrs/interface/ui/mplgraphicsviewpolar.py b/pyrs/interface/ui/mplgraphicsviewpolar.py index 57d176837..24cb8375c 100644 --- a/pyrs/interface/ui/mplgraphicsviewpolar.py +++ b/pyrs/interface/ui/mplgraphicsviewpolar.py @@ -191,7 +191,10 @@ def plot_contour(self, vec_theta, vec_r, vec_values, max_r, r_resolution, theta_ # END-IF-ELSE # set value - mesh_values[index_theta, index_r] += value_i + if np.isnan(mesh_values[index_theta, index_r]): + mesh_values[index_theta, index_r] = value_i + else: + mesh_values[index_theta, index_r] += value_i # END-FOR # plot