Skip to content

Commit

Permalink
[explorer.RasterViewer] extended documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johntruckenbrodt committed Sep 27, 2019
1 parent 7b1d31c commit f061204
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions spatialist/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def __init__(self, filename, cmap='jet', band_indices=None, band_names=None, pmi

self.fig = plt.figure(num=title)

# display of SLC amplitude
# left display (image)
self.ax1 = self.fig.add_subplot(121)
# display of topographical phase
# right display (time series)
self.ax2 = self.fig.add_subplot(122)

# self.ax1 = plt.gca()
Expand All @@ -179,6 +179,7 @@ def __init__(self, filename, cmap='jet', band_indices=None, band_names=None, pmi
self.ax1.tick_params(axis='both', which='major', labelsize=self.fontsize)
self.ax2.tick_params(axis='both', which='major', labelsize=self.fontsize)

# format the values displayed for the mouse pointer
text_pointer = self.ylab + '={0:.2f}, ' + self.xlab + '={1:.2f}, value='
self.ax1.format_coord = lambda x, y: text_pointer.format(y, x)

Expand All @@ -190,7 +191,7 @@ def __init__(self, filename, cmap='jet', band_indices=None, band_names=None, pmi
# set up the vertical profile plot
self.__init_vertical_plot()

# make the figure respond to mouse clicks by executing method __onclick
# make the figure responds to mouse clicks by executing method __onclick
self.cid1 = self.fig.canvas.mpl_connect('button_press_event', self.__onclick)

# enable interaction with the slider
Expand Down Expand Up @@ -297,7 +298,9 @@ def __onclick(self, event):
# redraw the cross-hair
self.__reset_crosshair()

# convert the map coordinates collected at the click to image pixel coordinates
x, y = self.__map2img(self.x_coord, self.y_coord)
# read the time series at the image coordinates
subset_vertical = self.__read_timeseries(x, y)

# redraw/clear the vertical profile plot in case stacking is disabled
Expand Down

0 comments on commit f061204

Please sign in to comment.