Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions methods/coseismic/Coseismic_Requirement_Validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"dataset = \"ARIA_S1_new\" # Dataset type: 'ARIA_S1', 'ARIA_S1_new'\n",
"aria_gunw_version = \"3_0_1\"\n",
"\n",
"rundate = \"20250512\" # Date of this Cal/Val run\n",
"rundate = \"20250820\" # Date of this Cal/Val run\n",
"version = \"1\" # Version of this Cal/Val run\n",
"custom_sites = \"/home/jovyan/my_sites.txt\" # Path to custom site metadata\n",
"\n",
Expand Down Expand Up @@ -198,6 +198,11 @@
"mintpy_dir = os.path.join(work_dir, \"MintPy\")\n",
"weather_dir = os.path.join(site_dir)\n",
"\n",
"# === Home directory for saving reports ===\n",
"home_dir = os.path.join(\"/home/jovyan/validation/\", site, requirement, rundate, f\"v{version}\")\n",
"if not os.path.exists(home_dir):\n",
" os.makedirs(home_dir)\n",
"\n",
"# === Log Directory Paths ===\n",
"print(f\" Work directory: {work_dir}\")\n",
"print(f\" GUNW directory: {gunw_dir}\")\n",
Expand All @@ -211,12 +216,12 @@
"else:\n",
" os.chdir(mintpy_dir)\n",
"\n",
" # === Set Expected MintPy Filenames ===\n",
" geom_file = os.path.join(mintpy_dir, \"inputs\", \"geometryGeo.h5\")\n",
" msk_file = os.path.join(mintpy_dir, \"maskTempCoh.h5\") # alt: maskConnComp.h5\n",
" ts_file = os.path.join(mintpy_dir, \"timeseries.h5\")\n",
" vel_file = os.path.join(mintpy_dir, \"velocity.h5\")\n",
" config_file = os.path.join(mintpy_dir, site_info.get('calval_location') + '.cfg')"
"# === Set Expected MintPy Filenames ===\n",
"geom_file = os.path.join(mintpy_dir, \"inputs\", \"geometryGeo.h5\")\n",
"msk_file = os.path.join(mintpy_dir, \"maskTempCoh.h5\") # alt: maskConnComp.h5\n",
"ts_file = os.path.join(mintpy_dir, \"timeseries.h5\")\n",
"vel_file = os.path.join(mintpy_dir, \"velocity.h5\")\n",
"config_file = os.path.join(mintpy_dir, site_info.get('calval_location') + '.cfg')"
]
},
{
Expand Down Expand Up @@ -1487,6 +1492,10 @@
" 'validation_table': validation_table_method1,\n",
" 'ts_functions': ts_functions,\n",
"}\n",
"save_results(**save_params)\n",
"\n",
"# Save the report in the home directory as well\n",
"save_params['save_dir'] = home_dir\n",
"save_results(**save_params)"
]
},
Expand Down Expand Up @@ -1784,6 +1793,10 @@
" 'validation_table': validation_table_method2,\n",
" 'ts_functions': ts_functions,\n",
"}\n",
"save_results(**save_params)\n",
"\n",
"# Save the report in the home directory as well\n",
"save_params['save_dir'] = home_dir\n",
"save_results(**save_params)"
]
},
Expand Down
44 changes: 34 additions & 10 deletions methods/secular/Secular_Requirement_Validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"dataset = \"ARIA_S1_new\" # Dataset type: 'ARIA_S1', 'ARIA_S1_new'\n",
"aria_gunw_version = \"3_0_1\"\n",
"\n",
"rundate = \"20250602\" # Date of this Cal/Val run\n",
"rundate = \"20250820\" # Date of this Cal/Val run\n",
"version = \"1\" # Version of this Cal/Val run\n",
"custom_sites = \"/home/jovyan/my_sites.txt\" # Path to custom site metadata\n",
"\n",
Expand Down Expand Up @@ -204,6 +204,11 @@
"mintpy_dir = os.path.join(work_dir, \"MintPy\")\n",
"weather_dir = os.path.join(site_dir)\n",
"\n",
"# === Home directory for saving reports ===\n",
"home_dir = os.path.join(\"/home/jovyan/validation/\", site, requirement, rundate, f\"v{version}\")\n",
"if not os.path.exists(home_dir):\n",
" os.makedirs(home_dir)\n",
"\n",
"# === Log Directory Paths ===\n",
"print(f\" Work directory: {work_dir}\")\n",
"print(f\" GUNW directory: {gunw_dir}\")\n",
Expand All @@ -217,12 +222,12 @@
"else:\n",
" os.chdir(mintpy_dir)\n",
"\n",
" # === Set Expected MintPy Filenames ===\n",
" geom_file = os.path.join(mintpy_dir, \"inputs\", \"geometryGeo.h5\")\n",
" msk_file = os.path.join(mintpy_dir, \"maskTempCoh.h5\") # alt: maskConnComp.h5\n",
" ts_file = os.path.join(mintpy_dir, \"timeseries.h5\")\n",
" vel_file = os.path.join(mintpy_dir, \"velocity.h5\")\n",
" config_file = os.path.join(mintpy_dir, site_info.get('calval_location') + '.cfg')"
"# === Set Expected MintPy Filenames ===\n",
"geom_file = os.path.join(mintpy_dir, \"inputs\", \"geometryGeo.h5\")\n",
"msk_file = os.path.join(mintpy_dir, \"maskTempCoh.h5\") # alt: maskConnComp.h5\n",
"ts_file = os.path.join(mintpy_dir, \"timeseries.h5\")\n",
"vel_file = os.path.join(mintpy_dir, \"velocity.h5\")\n",
"config_file = os.path.join(mintpy_dir, site_info.get('calval_location') + '.cfg')"
]
},
{
Expand Down Expand Up @@ -517,7 +522,7 @@
" \"-c\", cmap_str,\n",
" \"-u\", \"mm\",\n",
" \"-v\", str(vmin), str(vmax),\n",
" \"--title\", velocity_filename.split('/')[-1],\n",
" \"--title\", 'Velocity after correction for SET',\n",
" \"--noverbose\"\n",
" ]\n",
" view.main(view_opts)\n",
Expand Down Expand Up @@ -626,6 +631,10 @@
"source": [
"# Visualize velocity\n",
"if site_info.get('do_iono') != \"False\":\n",
" \n",
" if site_info.get('do_SET') != \"False\":\n",
" titlestr = 'Velocity after correcting for SET and iono'\n",
" \n",
" view_opts = [\n",
" velocity_filename, \"velocity\",\n",
" \"-m\", msk_file,\n",
Expand All @@ -637,7 +646,7 @@
" \"-c\", cmap_str,\n",
" \"-u\", \"mm\",\n",
" \"-v\", str(vmin), str(vmax),\n",
" \"--title\", velocity_filename.split('/')[-1],\n",
" \"--title\", titlestr,\n",
" \"--noverbose\"\n",
" ]\n",
" view.main(view_opts)\n",
Expand Down Expand Up @@ -745,6 +754,13 @@
"source": [
"# Visualize velocity\n",
"if site_info.get('do_tropo') != \"False\":\n",
" if site_info.get('do_iono') == \"True\" and site_info.get('do_SET') == \"True\":\n",
" titlestr = 'Velocity after correcting for SET, iono, and tropo'\n",
" elif site_info.get('do_iono') == \"True\":\n",
" titlestr = 'Velocity after correcting for iono and tropo'\n",
" elif site_info.get('do_SET') == \"True\":\n",
" titlestr = 'Velocity after correcting for SET and tropo'\n",
" \n",
" view_opts = [\n",
" velocity_filename, \"velocity\",\n",
" \"-m\", msk_file,\n",
Expand All @@ -756,7 +772,7 @@
" \"-c\", cmap_str,\n",
" \"-u\", \"mm\",\n",
" \"-v\", str(vmin), str(vmax),\n",
" \"--title\", velocity_filename.split('/')[-1],\n",
" \"--title\", titlestr,\n",
" \"--noverbose\"\n",
" ]\n",
" view.main(view_opts)\n",
Expand Down Expand Up @@ -1534,6 +1550,10 @@
" 'validation_table': validation_table_method1,\n",
" 'ts_functions': ts_functions,\n",
"}\n",
"save_results(**save_params)\n",
"\n",
"# Save the report in the home directory as well\n",
"save_params['save_dir'] = home_dir\n",
"save_results(**save_params)"
]
},
Expand Down Expand Up @@ -1714,6 +1734,10 @@
" 'validation_table': validation_table_method2,\n",
" 'ts_functions': ts_functions,\n",
"}\n",
"save_results(**save_params)\n",
"\n",
"# Save the report in the home directory as well\n",
"save_params['save_dir'] = home_dir\n",
"save_results(**save_params)"
]
},
Expand Down
Loading