Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xQML
xQML
Commits
a213f533
Commit
a213f533
authored
Jan 18, 2019
by
Syl
Browse files
Merge branch 'master' of gitlab.in2p3.fr:xQML/xQML
parents
6e633dee
f72036fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
xqml/xqml.py
xqml/xqml.py
+5
-3
xqml/xqml_utils.py
xqml/xqml_utils.py
+7
-0
No files found.
xqml/xqml.py
View file @
a213f533
...
...
@@ -16,7 +16,7 @@ import numpy as np
import
healpy
as
hp
import
random
as
rd
from
xqml_utils
import
getstokes
from
xqml_utils
import
getstokes
,
pd_inv
from
estimators
import
El
from
estimators
import
CovAB
...
...
@@ -149,10 +149,12 @@ class xQML(object):
self
.
NB
=
NB
if
self
.
cross
else
NA
# Invert (signalA + noise) matrix
self
.
invCa
=
linalg
.
inv
(
self
.
S
+
self
.
NA
)
# self.invCa = linalg.inv(self.S + self.NA)
self
.
invCa
=
pd_inv
(
self
.
S
+
self
.
NA
)
# Invert (signalB + noise) matrix
self
.
invCb
=
linalg
.
inv
(
self
.
S
+
self
.
NB
)
# self.invCb = linalg.inv(self.S + self.NB)
self
.
invCb
=
pd_inv
(
self
.
S
+
self
.
NB
)
# Compute E using Eq...
self
.
E
=
El
(
self
.
invCa
,
self
.
invCb
,
self
.
Pl
)
...
...
xqml/xqml_utils.py
View file @
a213f533
...
...
@@ -9,6 +9,13 @@ import sys
import
timeit
import
numpy
as
np
from
scipy
import
linalg
def
pd_inv
(
a
):
n
=
a
.
shape
[
0
]
I
=
np
.
identity
(
n
)
return
linalg
.
solve
(
a
,
I
,
sym_pos
=
True
,
overwrite_b
=
True
)
def
getstokes
(
spec
=
None
,
temp
=
False
,
polar
=
False
,
corr
=
False
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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