Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sec23
korte
CORBASS
Commits
9a34d273
Commit
9a34d273
authored
Feb 04, 2020
by
Maximilian Schanner
Browse files
Design points can be passed directly as an array or DataFrame
parent
f052c3c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
corbass/inversion.py
View file @
9a34d273
...
...
@@ -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'
]]
else
:
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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment