Update GPR and SAR3D processing
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
from python_app.models.run_config_schema import GprModel
|
||||
from python_app.models.run_config_validation import parse_position_csv
|
||||
from python_app.gui.theme import PLOT_BACKGROUND
|
||||
|
||||
|
||||
@@ -22,3 +24,16 @@ def build_lut(stops: list[str], *, size: int = 256) -> np.ndarray:
|
||||
for channel in range(3):
|
||||
lut[:, channel] = np.interp(sample_positions, stop_positions, stop_colors[:, channel]).astype(np.uint8)
|
||||
return lut
|
||||
|
||||
|
||||
# Same Tx/Rx markers on ground BP and the three planar SAR views.
|
||||
ANTENNA_STYLES = (("t", "#ff595e", "#ffca3a"), ("t1", "#4cc9f0", "#e0fbfc"))
|
||||
|
||||
|
||||
def selected_antenna_coordinates(geometry: GprModel, inputs: str, outputs: str) -> tuple[np.ndarray, np.ndarray]:
|
||||
selected_inputs, selected_outputs = parse_position_csv(inputs), parse_position_csv(outputs)
|
||||
tx = [[row.x_m, row.y_m, row.z_m] for row in geometry.tx_geometry
|
||||
if not selected_outputs or row.output_pos in selected_outputs]
|
||||
rx = [[row.x_m, row.y_m, row.z_m] for row in geometry.rx_geometry
|
||||
if not selected_inputs or row.input_pos in selected_inputs]
|
||||
return np.asarray(tx, dtype=float).reshape(-1, 3), np.asarray(rx, dtype=float).reshape(-1, 3)
|
||||
|
||||
Reference in New Issue
Block a user