Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move hvplot import into functions #18

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion hypercoast/emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import os
import xarray as xr
import hvplot.xarray
import numpy as np
import geopandas as gpd

Expand Down Expand Up @@ -100,6 +99,8 @@ def plot_emit(
hvplot.Plot: The line plot of the reflectance data.
"""

import hvplot.xarray

if ortho == True:
if longitude is None or latitude is None:
raise ValueError(
Expand Down Expand Up @@ -182,6 +183,8 @@ def viz_emit(
Returns:
hvplot.Plot: The image plot of the reflectance data at the specified wavelengths.
"""
import hvplot.xarray

if isinstance(ds, str):
ds = read_emit(ds, ortho=ortho)
example = ds.sel(wavelengths=wavelengths, method=method)
Expand Down
Loading