From 3869f9397b25c6864c22521885a0b016d3f4146d Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sun, 21 Apr 2024 01:07:14 -0400 Subject: [PATCH] Clean up --- hypercoast/hypercoast.py | 5 +++-- hypercoast/ui.py | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hypercoast/hypercoast.py b/hypercoast/hypercoast.py index a940767..9785092 100644 --- a/hypercoast/hypercoast.py +++ b/hypercoast/hypercoast.py @@ -4,7 +4,6 @@ import leafmap from .emit import read_emit, plot_emit, viz_emit, emit_to_netcdf, emit_to_image -from .ui import SpectralWidget class Map(leafmap.Map): @@ -36,6 +35,8 @@ def add(self, obj, position="topright", **kwargs): if isinstance(obj, str): if obj == "spectral": + from .ui import SpectralWidget + SpectralWidget(self, position=position) else: @@ -231,5 +232,5 @@ def spectral_to_df(self, **kwargs): """ import pandas as pd - df = pd.DataFrame(self._spectral_data) + df = pd.DataFrame(self._spectral_data, **kwargs) return df diff --git a/hypercoast/ui.py b/hypercoast/ui.py index bd8e8f0..64be4f6 100644 --- a/hypercoast/ui.py +++ b/hypercoast/ui.py @@ -78,9 +78,6 @@ def handle_interaction(**kwargs): self._host_map._plot_marker_cluster = marker_cluster ds = self._host_map.cog_layer_dict[layer_name]["xds"] - # ds["reflectance"].data[ - # :, :, ds["good_wavelengths"].data == 0 - # ] = np.nan da = ds.sel(latitude=lat, longitude=lon, method="nearest")[ "reflectance" ]