diff --git a/HISTORY.rst b/HISTORY.rst index 6054d4b..e45a874 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,13 @@ History ======= +1.7.8 (2022-08-19) +------------------ + +* Fixed missing grid and frame lines of Tie_Point_Grid.plot_shift_distribution() (!27). +* Remove deprecated sphinx_autodoc_typehints option. + + 1.7.7 (2022-07-21) ------------------ diff --git a/arosics/CoReg.py b/arosics/CoReg.py index 9201576..0b4f160 100755 --- a/arosics/CoReg.py +++ b/arosics/CoReg.py @@ -123,7 +123,7 @@ def __init__(self, with warnings.catch_warnings(record=True) as w: _ = self.footprint_poly # execute getter - if len(w) > 0 and 'disjunct polygone(s) outside' in str(w[-1].message): + if len(w) > 0 and 'disjunct polygon(s) outside' in str(w[-1].message): warnings.warn('The footprint of the %s contains multiple separate image parts. ' 'AROSICS will only process the largest image part.' % self.imName) # FIXME use a convex hull as footprint poly diff --git a/arosics/Tie_Point_Grid.py b/arosics/Tie_Point_Grid.py index 4d05653..a60e151 100755 --- a/arosics/Tie_Point_Grid.py +++ b/arosics/Tie_Point_Grid.py @@ -71,7 +71,7 @@ class Tie_Point_Grid(object): Spatial shifts are calculated for each point in grid of which the parameters can be adjusted using keyword arguments. Shift correction performs a polynomial transformation using te calculated shifts of each point in the - grid as GCPs. Thus 'Tie_Point_Grid' can be used to correct for locally varying geometric distortions of the target + grid as GCPs. Thus, 'Tie_Point_Grid' can be used to correct for locally varying geometric distortions of the target image. See help(Tie_Point_Grid) for documentation! @@ -727,12 +727,14 @@ def plot_shift_distribution(self, # add text box containing RMSE of plotted shifts xlim, ylim = ax.get_xlim(), ax.get_ylim() - plt.text(xlim[1] - (xlim[1] / 20), -ylim[1] + (ylim[1] / 20), - 'RMSE: %s m / %s px' % (np.round(rmse, 2), np.round(rmse / self.shift.xgsd, 2)), - ha='right', va='bottom', fontsize=fontsize, bbox=dict(facecolor='w', pad=None, alpha=0.8)) + ax.text(xlim[1] - (xlim[1] / 20), -ylim[1] + (ylim[1] / 20), + 'RMSE: %s m / %s px' % (np.round(rmse, 2), np.round(rmse / self.shift.xgsd, 2)), + ha='right', va='bottom', fontsize=fontsize, bbox=dict(facecolor='w', pad=None, alpha=0.8)) # add grid and increase linewidth of middle line - plt.grid() + ax.grid(b=True) + ax.spines["right"].set_visible(True) + ax.spines["top"].set_visible(True) xgl = ax.get_xgridlines() middle_xgl = xgl[int(np.median(np.array(range(len(xgl)))))] middle_xgl.set_linewidth(2) @@ -746,8 +748,8 @@ def plot_shift_distribution(self, ax.set_title(title, fontsize=fontsize) [tick.label1.set_fontsize(fontsize) for tick in ax.xaxis.get_major_ticks()] [tick.label1.set_fontsize(fontsize) for tick in ax.yaxis.get_major_ticks()] - plt.xlabel('x-shift [%s]' % 'meters' if unit == 'm' else 'pixels', fontsize=fontsize) - plt.ylabel('y-shift [%s]' % 'meters' if unit == 'm' else 'pixels', fontsize=fontsize) + ax.set_xlabel('x-shift [%s]' % 'meters' if unit == 'm' else 'pixels', fontsize=fontsize) + ax.set_ylabel('y-shift [%s]' % 'meters' if unit == 'm' else 'pixels', fontsize=fontsize) # add legend with labels in the right order handles, labels = ax.get_legend_handles_labels() @@ -755,7 +757,7 @@ def plot_shift_distribution(self, leg.get_frame().set_edgecolor('black') # remove white space around the figure - plt.subplots_adjust(top=.94, bottom=.06, right=.96, left=.09) + fig.subplots_adjust(top=.94, bottom=.06, right=.96, left=.09) if savefigPath: fig.savefig(savefigPath, dpi=savefigDPI, pad_inches=0.3, bbox_inches='tight') diff --git a/arosics/version.py b/arosics/version.py index 70148f8..7a1bbcf 100644 --- a/arosics/version.py +++ b/arosics/version.py @@ -24,5 +24,5 @@ # limitations under the License. -__version__ = '1.7.7' -__versionalias__ = '2022-07-21_01' +__version__ = '1.7.8' +__versionalias__ = '2022-08-19_01' diff --git a/docs/conf.py b/docs/conf.py index cb8191a..096226e 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -159,8 +159,7 @@ def setup(app): 'sticky_navigation': True, 'navigation_depth': 4, 'includehidden': True, - 'titles_only': False, - 'set_type_checking_flag': True # option of sphinx_autodoc_typehints extension + 'titles_only': False } # Add any paths that contain custom themes here, relative to this directory.