Skip to content

Commit

Permalink
fixing call to insar2d class function; adjusting visualization plots
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaterna committed May 29, 2024
1 parent 19197ac commit cdc2a0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def plot_synthetic_grid_los(params, insarobj, disp_points=None, disp_points_colo
:param disp_points_color: a 1d array of floats to be plotted as colors in the disp_points fill
"""
if params['plot_unwrapped']:
myobj_ref = insarobj.subtract_reference(insarobj, params['refidx']) # Subtract reference pix
myobj_ref = insarobj.subtract_reference(params['refidx']) # Subtract reference pix
InSAR_2D_Object.outputs.write_InSAR2D(myobj_ref, os.path.join(params['outdir'],
params['label']+"unw_phase.grd"))
InSAR_2D_Object.outputs.map_wrapped_insar(os.path.join(params['outdir'], params['label']+"unw_phase.grd"),
Expand Down
8 changes: 4 additions & 4 deletions geodesy_modeling/InSAR_2D_Object/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def add_flight_vector(fig, flight_heading, look_dir, region):
fig.text(x=region[0], y=region[2], text='LOS', offset=str(0.6 + 0.4 * x_los) + "i/0.45i",
fill='white', font="10p,Helvetica,black") # LOS text annotation
fig.plot(x=[region[0]], y=[region[2]], style='v0.2c+e+gblack+h0+p1p,black+z' + str(1.0),
direction=[[x_flight], [y_flight]], pen="thin,black", offset="0.6i/0.45i") # flight vector
direction=[[2*x_flight], [2*y_flight]], pen="thin,black", offset="0.6i/0.45i") # flight vector
fig.plot(x=[region[0]], y=[region[2]], style='v0.2c+e+gblack+h0+p1p,black+z' + str(1.0),
direction=[[x_los / 2], [y_los / 2]], pen="thin,black", offset="0.6i/0.45i") # los vector
direction=[[x_los], [y_los]], pen="thin,black", offset="0.6i/0.45i") # los vector
return fig


Expand Down Expand Up @@ -128,9 +128,9 @@ def map_wrapped_insar(grd_filename, plotname, text_annot=None, flight_heading=No
label_inc = 1.57 # for wrapped phase
label = "Phase"
else: # currently hard-coded for different applications
pygmt.makecpt(cmap="polar", series="-30/30/0.01", background="o", output="mycpt.cpt")
pygmt.makecpt(cmap="polar", series="-10/10/0.01", background="o", output="mycpt.cpt")
title = "Unwrapped LOS Displacement"
label_inc = 5 # For unwrapped displacement. Currently hard-coded
label_inc = 2 # For unwrapped displacement. Currently hard-coded
label = "LOS Deformation (mm)"

# Build a PyGMT plot
Expand Down

0 comments on commit cdc2a0f

Please sign in to comment.