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
2172c96d
Commit
2172c96d
authored
Jan 21, 2020
by
Matthieu Tristram
Browse files
Change muKarcmin to Karcmin
parent
2ad8efb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
xqml/simulation.py
xqml/simulation.py
+8
-8
No files found.
xqml/simulation.py
View file @
2172c96d
...
...
@@ -10,14 +10,14 @@ import healpy as hp
def
mu
Karcmin2var
(
mu
Karcmin
,
nside
):
def
Karcmin2var
(
Karcmin
,
nside
):
"""
Return pixel variance for a given nside and noise level [
1e-6
K . arcmin]
Return pixel variance for a given nside and noise level [K . arcmin]
Parameters
----------
mu
Karcmin : float
Pixel noise [
mu
K . arcmin]
Karcmin : float
Pixel noise [K . arcmin]
nside : int
Healpix map resolution (power of 2)
...
...
@@ -28,12 +28,12 @@ def muKarcmin2var(muKarcmin, nside):
Example
----------
>>> var =
mu
Karcmin2var(10
.0
, 16)
>>> var = Karcmin2var(10
e-6
, 16)
>>> print(round(var * 1e16))
21.0
"""
pixarea
=
hp
.
nside2pixarea
(
nside
,
degrees
=
True
)
varperpix
=
(
mu
Karcmin
*
1e-6
/
60.
)
**
2
/
pixarea
varperpix
=
(
Karcmin
/
60.
)
**
2
/
pixarea
return
varperpix
...
...
@@ -56,7 +56,7 @@ def pixvar2nl(pixvar, nside):
Example
----------
>>> nside = 16
>>> pixvar =
mu
Karcmin2var(10
.0
, nside)
>>> pixvar = Karcmin2var(10
e-6
, nside)
>>> nl = pixvar2nl(pixvar, nside)
>>> print(round(nl * 1e18))
8.0
...
...
@@ -86,7 +86,7 @@ def getNl(pixvar, nside, nbins):
Example
----------
>>> nside = 16
>>> pixvar =
mu
Karcmin2var(10
.0
, nside)
>>> pixvar = Karcmin2var(10
e-6
, nside)
>>> nl = getNl(pixvar, nside, 2)
>>> print(round(nl[0] * 1e18))
8.0
...
...
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