Skip to content

Commit

Permalink
make_wci: include transducer position when determining hmin and hmax …
Browse files Browse the repository at this point in the history
…of the image
  • Loading branch information
peter-urban committed Oct 23, 2024
1 parent 563377a commit f408498
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ def from_pings_and_limits(
ping_offsets.append(ping_sensor_configurations[-1].get_target("Transducer"))

# compute limits of the create image
if hmin is None: _hmin = np.nanmin([_hmin, np.nanmin(xyz.y)])
if hmax is None: _hmax = np.nanmax([_hmax, np.nanmax(xyz.y)])
tr_y = ping_offsets[-1].y
if hmin is None: _hmin = np.nanmin([_hmin, np.nanmin(xyz.y), tr_y])
if hmax is None: _hmax = np.nanmax([_hmax, np.nanmax(xyz.y), tr_y])
if vmax is None: _vmax = np.nanmax([_vmax, np.nanmax(xyz.z)])

if hmin is None: hmin = _hmin * 1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ def __init__(self, pings, horizontal_pixels=1024, name="WCI", figure=None, progr
if show:
display(self.layout)

def set_ping_sample_selector(self, ping_sample_selector):
self.args_imagebuilder["ping_sample_selector"] = ping_sample_selector
self.update_data(0)

def fix_xy(self, w):
with self.output:
xlim = self.ax.get_xlim()
Expand Down

0 comments on commit f408498

Please sign in to comment.