lingering scipy to numpy swap in surface
# Author: David R Thompson, david.r.thompson@jpl.nasa.gov
#
-import scipy as s
+import numpy as np
from scipy.interpolate import interp1d
from ..core.common import load_spectrum, load_wavelen
@@ -36,11 +36,11 @@ class Surface:
config = full_config.forward_model.surface
self.statevec_names = []
- self.bounds = s.array([])
- self.scale = s.array([])
- self.init = s.array([])
+ self.bounds = np.array([])
+ self.scale = np.array([])
+ self.init = np.array([])
self.bvec = []
- self.bval = s.array([])
+ self.bval = np.array([])
self.emissive = False
if config.reflectance is not None:
@@ -65,18 +65,18 @@ class Surface:
def xa(self, x_surface, geom):
"""Mean of prior state vector distribution calculated at state x."""
- return s.array(self.init)
+ return np.array(self.init)
def Sa(self, x_surface, geom):
"""Covariance of prior state vector distribution calculated at state x."""
- return s.zeros((0, 0), dtype=float)
+ return np.zeros((0, 0), dtype=float)
def fit_params(self, rfl_meas, geom, *args):
"""Given a directional reflectance estimate and one or more emissive
parameters, fit a state vector."""
- return s.array([])
+ return np.array([])
def calc_lamb(self, x_surface, geom):
"""Calculate a Lambertian surface reflectance for this state vector."""
@@ -94,26 +94,26 @@ class Surface:
calculated at x_surface. In the case that there are no free
paramters our convention is to return the vector of zeros."""
- return s.zeros((self.n_wl, 1))
+ return np.zeros((self.n_wl, 1))
def drfl_dsurfaceb(self, x_surface, geom):
"""Partial derivative of reflectance with respect to unmodeled
variables, calculated at x_surface. In the case that there are no
free paramters our convention is to return the vector of zeros."""
- return s.zeros((self.n_wl, 1))
+ return np.zeros((self.n_wl, 1))
def calc_Ls(self, x_surface, geom):
"""Emission of surface, as a radiance."""
- return s.zeros((self.n_wl,))
+ return np.zeros((self.n_wl,))
def dLs_dsurface(self, x_surface, geom):
"""Partial derivative of surface emission with respect to state vector,
calculated at x_surface. In the case that there are no free paramters
our convention is to return the vector of zeros."""
- return s.zeros((self.n_wl, 1))
+ return np.zeros((self.n_wl, 1))
def summarize(self, x_surface, geom):
"""Summary of state vector."""
