From 2d198ac7e3cb95a0b4d76ed9fa741ef4b06b8ffe Mon Sep 17 00:00:00 2001 From: Muhammet Nergizci <83592714+mnergizci@users.noreply.github.com> Date: Sat, 16 May 2026 13:47:17 +0100 Subject: [PATCH 1/2] Refactor tide correction logic and date locator- debug the --corrections flag Refactor tide correction condition and update date locator usage. --- bin/LiCSBAS_plot_ts.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/LiCSBAS_plot_ts.py b/bin/LiCSBAS_plot_ts.py index 2f48fdb..649ea95 100755 --- a/bin/LiCSBAS_plot_ts.py +++ b/bin/LiCSBAS_plot_ts.py @@ -442,7 +442,7 @@ def create_hgt_tif(resultsdir: str): print('No latlon field found in {}. Skip.'.format(cumfile)) ### Add the corrections - if correction_flag: + if : # tide correction try: tide = cumh5['tide'][:] @@ -1210,8 +1210,9 @@ def printcoords(event): axts.scatter(imdates_dt, np.zeros(len(imdates_dt)), c='b', alpha=0.6) axts_corr.scatter(imdates_dt, np.zeros(len(imdates_dt)), c='b', alpha=0.6) - loc_ts = axts.xaxis.set_major_locator(mdates.AutoDateLocator()) - try: # Only support from Matplotlib 3.1 + loc_ts = mdates.AutoDateLocator() + axts.xaxis.set_major_locator(loc_ts) + try: axts.xaxis.set_major_formatter(mdates.ConciseDateFormatter(loc_ts)) except: axts.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d')) From 8ffb2532289b254592e33222a4a31607e9901f2a Mon Sep 17 00:00:00 2001 From: Muhammet Nergizci <83592714+mnergizci@users.noreply.github.com> Date: Sat, 16 May 2026 13:51:19 +0100 Subject: [PATCH 2/2] return the if corretion_flag: removed wrongly at last commit --- bin/LiCSBAS_plot_ts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/LiCSBAS_plot_ts.py b/bin/LiCSBAS_plot_ts.py index 649ea95..084d837 100755 --- a/bin/LiCSBAS_plot_ts.py +++ b/bin/LiCSBAS_plot_ts.py @@ -442,7 +442,7 @@ def create_hgt_tif(resultsdir: str): print('No latlon field found in {}. Skip.'.format(cumfile)) ### Add the corrections - if : + if correction_flag: # tide correction try: tide = cumh5['tide'][:]