Commit 9a34d273 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

Design points can be passed directly as an array or DataFrame

parent f052c3c4
......@@ -355,7 +355,18 @@ class Inversion:
The posterior covariance of the field at design points.
# Setup design points
self.x_desi, self.n_desi = self.desi_points(n_desi)
if isinstance(n_desi, np.ndarray):
self.x_desi = n_desi
self.n_desi = self.x_desi.shape[1]
elif isinstance(n_desi, DataFrame):
self.n_desi = len(n_desi)
self.x_desi = np.zeros(4, self.n_desi)
self.x_desi[0] = n_desi[['co-lat']]
self.x_desi[1] = n_desi[['lon']]
self.x_desi[2] = n_desi[['rad']]
self.x_desi[3] = n_desi[['t']]
self.x_desi, self.n_desi = self.desi_points(n_desi)
# Allocate and retrieve basis functions at design points
dspharm_desi = np.empty((3, 3*self.n_desi), order='F')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment