Skip to content

Commit 7fca108

Browse files
rzinkerzinkeehavazli
authored
Split reference point with comma (#86)
* Split reference point with comma * simplify and align accessing file contents with the rest of the notebooks --------- Co-authored-by: rzinke <[email protected]> Co-authored-by: ehavazli <[email protected]>
1 parent 89f124c commit 7fca108

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

methods/coseismic/Coseismic_Requirement_Validation.ipynb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,15 @@
356356
"metadata": {},
357357
"outputs": [],
358358
"source": [
359-
"if sitedata['sites'][site]['reference_lalo'].strip() != 'auto':\n",
360-
" new_lat = sitedata['sites'][site]['reference_lalo'].strip().split()[0]\n",
361-
" new_lon = sitedata['sites'][site]['reference_lalo'].strip().split()[1]\n",
362-
" update_reference_point(config_file, new_lat, new_lon) # New latitude and longitude\n",
363-
"\n",
364-
" command = 'smallbaselineApp.py ' + str(config_file) + ' --dostep reference_point'\n",
365-
" process = subprocess.run(command, shell=True)\n",
366-
" os.system('info.py inputs/ifgramStack.h5 | egrep \"REF_\"');"
359+
"if site_info.get('reference_lalo') != 'auto':\n",
360+
" new_lat = site_info.get('reference_lalo').split(',')[0]\n",
361+
" new_lon = site_info.get('reference_lalo').split(',')[1]\n",
362+
" update_reference_point(config_file, new_lat, new_lon) # updates the reference point in MintPy config file\n",
363+
" \n",
364+
"# Now reference interferograms to common lat/lon\n",
365+
"command = 'smallbaselineApp.py ' + str(config_file) + ' --dostep reference_point'\n",
366+
"process = subprocess.run(command, shell=True)\n",
367+
"os.system('info.py inputs/ifgramStack.h5 | egrep \"REF_\"');"
367368
]
368369
},
369370
{

methods/secular/Secular_Requirement_Validation.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,10 @@
327327
},
328328
"outputs": [],
329329
"source": [
330-
"if sitedata['sites'][site]['reference_lalo'].strip() != 'auto':\n",
331-
" # Check the reference point in the my_sites file, to see if it has changed\n",
332-
" new_lat = sitedata['sites'][site]['reference_lalo'].strip().split()[0]\n",
333-
" new_lon = sitedata['sites'][site]['reference_lalo'].strip().split()[1]\n",
334-
" update_reference_point(config_file, new_lat, new_lon) # New latitude and longitude\n",
330+
"if site_info.get('reference_lalo') != 'auto':\n",
331+
" new_lat = site_info.get('reference_lalo').split(',')[0]\n",
332+
" new_lon = site_info.get('reference_lalo').split(',')[1]\n",
333+
" update_reference_point(config_file, new_lat, new_lon) # updates the reference point in MintPy config file\n",
335334
" \n",
336335
"# Now reference interferograms to common lat/lon\n",
337336
"command = 'smallbaselineApp.py ' + str(config_file) + ' --dostep reference_point'\n",

0 commit comments

Comments
 (0)