Skip to content

Commit

Permalink
add comment about landsat bands
Browse files Browse the repository at this point in the history
  • Loading branch information
favyen2 committed Feb 6, 2025
1 parent 1515060 commit 2620713
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion rslp/landsat_vessels/predict_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,12 @@ def predict_pipeline(
if near_infra_filter.should_filter(lon, lat):
infra_detections += 1
continue
# Load crops from the window directory.

# Load crops from the window directory for writing output PNGs.
# We create two PNGs:
# - b8.png: just has B8 (panchromatic band).
# - rgb.png: true color with pan-sharpening. The RGB is from B4, B3, and B2
# respectively while B8 is used for pan-sharpening.
images = {}
crop_window_dir = detection.metadata["crop_window_dir"]
if crop_window_dir is None:
Expand Down
8 changes: 6 additions & 2 deletions rslp/vessels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(
ts: datetime | None = None,
scene_id: str | None = None,
crop_fname: UPath | None = None,
metadata: dict[str, Any] = {},
metadata: dict[str, Any] | None = None,
) -> None:
"""Create a new VesselDetection.
Expand All @@ -45,7 +45,11 @@ def __init__(
self.ts = ts
self.scene_id = scene_id
self.crop_fname = crop_fname
self.metadata = metadata

if metadata is None:
self.metadata = {}
else:
self.metadata = metadata

def get_lon_lat(self) -> tuple[float, float]:
"""Get the longitude and latitude of this detection.
Expand Down

0 comments on commit 2620713

Please sign in to comment.