Skip to content

Commit 25dd977

Browse files
authored
Merge pull request #179 from MBARIMike/main
Use more of the area for data, swap speed and pitch plots.
2 parents 7908412 + e144a3c commit 25dd977

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

‎.vscode/launch.json‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,11 @@
480480
// Test ESP markers - Shallow log file from Denmark deployment in June 2024, has large depth values in self.ds.depth.values[6500:6800]
481481
//"args": ["-v", "1", "--log_file", "makai/missionlogs/2024/20240607_20240615/20240611T082709/202406110827_202406111026.nc4", "--update_ssds_provenance", "--clobber"]
482482
// Test making engineering plot with a short log file
483-
//"args": ["-v", "1", "--log_file", "ahi/missionlogs/2025/20250128_20250131/20250129T145420/202501291454_202501292233.nc4", "--update_ssds_provenance", "--clobber"]
483+
"args": ["-v", "1", "--log_file", "ahi/missionlogs/2025/20250128_20250131/20250129T145420/202501291454_202501292233.nc4", "--update_ssds_provenance", "--clobber"]
484484
// and for the rest of the log files of this deployment
485-
"args": ["-v", "1", "--auv_name", "ahi", "--start", "20250127T000000", "--end", "20250201T000000", "--update_ssds_provenance", "--clobber", "--no_cleanup"]
485+
//"args": ["-v", "1", "--auv_name", "ahi", "--start", "20250127T000000", "--end", "20250201T000000", "--update_ssds_provenance", "--clobber", "--no_cleanup"]
486+
// Test having a better y-max that puts data instead of white space at the bottom
487+
//"args": ["-v", "1", "--log_file", "ahi/missionlogs/2026/20260406_20260412/20260410T010521/202604100105_202604100800.nc4"]
486488
},
487489
{
488490
"name": "lrauv_deployment_plots",
@@ -523,8 +525,9 @@
523525
// Test --build_index for 2026 to test a fixed layout
524526
//"args": ["-v", "1", "--build_index", "--start", "20260101", "--end", "20261231", "--force"]
525527
// Test fixing the "folded" bathymetry
526-
"args": ["-v", "1", "--dlist", "ahi/missionlogs/2026/20260218_20260220.dlist", "--force", "--update_ssds_provenance", "--notify", "mccann@mbari.org"]
527-
528+
//"args": ["-v", "1", "--dlist", "ahi/missionlogs/2026/20260218_20260220.dlist", "--force", "--update_ssds_provenance", "--notify", "mccann@mbari.org"]
529+
// Repair a badly plotted deployment with fixed bathymetry plotting - Pontus 54 Docking
530+
"args": ["-v", "1", "--dlist", "pontus/missionlogs/2025/20250604_20250616.dlist"]
528531
},
529532

530533
]

‎src/data/create_products.py‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def __init__( # noqa: PLR0913
243243
# ── bioluminescence (Dorado) ───────────────────────────────────────────
244244
"biolume_flow": "Flow",
245245
"biolume_avg_biolume": "Bioluminescence",
246-
"biolume_intflash": "Integrated Flash",
246+
"biolume_intflash": "Flash Intensity",
247247
"biolume_bg_biolume": "Background Biolum.",
248248
"biolume_nbflash_high": "High Flash Count",
249249
"biolume_nbflash_low": "Low Flash Count",
@@ -275,7 +275,7 @@ def __init__( # noqa: PLR0913
275275
"wetlabsubat_flow_rate": "Flow",
276276
"wetlabsubat_flow": "Flow",
277277
"wetlabsubat_average_bioluminescence": "Bioluminescence",
278-
"wetlabsubat_intflash": "Integrated Flash",
278+
"wetlabsubat_intflash": "Flash Intensity",
279279
"wetlabsubat_bg_biolume": "Background Biolum.",
280280
"wetlabsubat_nbflash_high": "High Flash Count",
281281
"wetlabsubat_nbflash_low": "Low Flash Count",
@@ -543,7 +543,7 @@ def _get_lrauv_plot_variables(self) -> list:
543543
("wetlabsbb2fl_particulatebackscatteringcoeff470nm", "linear"),
544544
("wetlabsbb2fl_particulatebackscatteringcoeff650nm", "linear"),
545545
("wetlabsbb2fl_mass_concentration_of_chlorophyll_in_sea_water", "linear"),
546-
("universals_platform_pitch_angle", "linear"),
546+
("universals_platform_speed_wrt_sea_water", "linear"),
547547
]
548548

549549
def _get_dorado_biolume_variables(self) -> list:
@@ -612,7 +612,7 @@ def _get_lrauv_engineering_plot_variables(self) -> list:
612612
("bpc1_platform_battery_charge", "linear"),
613613
("bpc1_platform_battery_voltage", "linear"),
614614
("onboard_platform_average_current", "linear"),
615-
("universals_platform_speed_wrt_sea_water", "linear"),
615+
("universals_platform_pitch_angle", "linear"),
616616
("universals_platform_yaw_angle", "linear"),
617617
("universals_platform_roll_angle", "linear"),
618618
("buoyancyservo_platform_buoyancy_position", "linear"),
@@ -1905,9 +1905,10 @@ def _plot_var_scatter( # noqa: C901, PLR0912, PLR0913, PLR0915
19051905
v97_5,
19061906
)
19071907

1908-
# Set axis limits
1908+
# Set axis limits and freeze them so scatter() cannot autoscale beyond max(iz).
19091909
curr_ax.set_xlim([min(distnav.to_numpy()) / 1000.0, max(distnav.to_numpy()) / 1000.0])
19101910
curr_ax.set_ylim(max(iz), min(iz))
1911+
curr_ax.autoscale(enable=False)
19111912

19121913
# Create scatter plot with actual data points
19131914
marker_size = next(
@@ -1927,10 +1928,7 @@ def _plot_var_scatter( # noqa: C901, PLR0912, PLR0913, PLR0915
19271928
# Add bathymetry as grey filled contour if available
19281929
if bottom_depths is not None:
19291930
dist_km = distnav.to_numpy() / 1000.0
1930-
# get_yticks() includes the locator's "next nice step" beyond the view
1931-
# limit, matching the deepest tick label the user sees (e.g. 300 m
1932-
# when the view limit is 280 m and the tick step is 50 m).
1933-
y_max = max(curr_ax.get_yticks())
1931+
y_max = float(max(iz))
19341932
capped = np.fmin(bottom_depths, y_max)
19351933
xb_bathy = np.append(
19361934
dist_km,
@@ -1978,10 +1976,10 @@ def _plot_var_scatter( # noqa: C901, PLR0912, PLR0913, PLR0915
19781976
else:
19791977
curr_ax.set_ylabel("")
19801978

1981-
# Set y-axis ticks adaptively based on depth range
1979+
# Set y-axis ticks adaptively based on depth range; stay within the view limit.
19821980
y_min, y_max = curr_ax.get_ylim()
19831981
tick_step = 10 if y_min <= 50 else 50 # noqa: PLR2004
1984-
y_ticks = np.arange(0, int(y_min) + tick_step, tick_step)
1982+
y_ticks = np.arange(0, y_min + 0.001, tick_step)
19851983
curr_ax.set_yticks(y_ticks)
19861984

19871985
cb = fig.colorbar(scatter, ax=curr_ax, pad=0.01)
@@ -2201,7 +2199,7 @@ def _plot_var_contour( # noqa: C901, PLR0912, PLR0913, PLR0915
22012199
# Add bathymetry as grey filled contour if available
22022200
if bottom_depths is not None:
22032201
dist_km = distnav.to_numpy() / 1000.0
2204-
y_max = max(curr_ax.get_yticks())
2202+
y_max = float(max(iz))
22052203
capped = np.fmin(bottom_depths, y_max)
22062204
xb_bathy = np.append(
22072205
dist_km,

0 commit comments

Comments
 (0)