Skip to content

Commit

Permalink
renamed to specarray
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoelles committed Sep 1, 2023
1 parent 82b10ef commit ef06f01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/specarray/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
from __future__ import annotations

__version__ = "0.0.1"

from .specarray import SpecArray
10 changes: 3 additions & 7 deletions src/specarray/specarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


@dataclass
class Specim:
class SpecArray:
"""Class for Specim hyperspectral Camera data"""

folder: Path
Expand Down Expand Up @@ -84,9 +84,7 @@ def broadband_albedo(self):
self.spectral_albedo.coords["wavelength"].max().values
- self.spectral_albedo.coords["wavelength"].min().values
)
broadband_albedo = xr.DataArray(
broadband_albedo, dims=["sample", "point"], name="broadband_albedo"
)
broadband_albedo = xr.DataArray(broadband_albedo, dims=["sample", "point"], name="broadband_albedo")
return broadband_albedo

def _find_files(self):
Expand Down Expand Up @@ -129,9 +127,7 @@ def _load_spectral_data(self, mode="capture"):

def _get_wavelenghts(self):
"""Set the wavelenghts"""
return pd.Series(
pd.to_numeric(self.metadata["wavelength"]), name="wavelenghts (nm)"
)
return pd.Series(pd.to_numeric(self.metadata["wavelength"]), name="wavelenghts (nm)")

def _gen_wavelength_point_df(self, raw_array: ndarray):
"""Generate a dataframe with the wavelenghts as index and points as colums"""
Expand Down

0 comments on commit ef06f01

Please sign in to comment.