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
ift
NIFTy
Commits
a5f581b3
Commit
a5f581b3
authored
Mar 21, 2013
by
Marco Selig
Browse files
version update.
parent
56bbb7ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
a5f581b3
...
...
@@ -96,7 +96,7 @@ Requirements
Download
........
The latest release is tagged **v0.
2.1
** and is available as a source package
The latest release is tagged **v0.
3.0
** and is available as a source package
at `<https://github.com/mselig/nifty/tags>`_. The current version can be
obtained by cloning the repository::
...
...
nifty_core.py
View file @
a5f581b3
...
...
@@ -480,7 +480,7 @@ class _about(object): ## nifty support class for global settings
"""
## version
self
.
_version
=
"0.
2.1
"
self
.
_version
=
"0.
3.0
"
## switches and notifications
self
.
_errors
=
notification
(
default
=
True
,
ccode
=
notification
.
_code
)
...
...
nifty_power.py
View file @
a5f581b3
...
...
@@ -112,14 +112,11 @@ def smooth_power(power,kindex,mode="2s",exclude=1,sigma=-1):
The array specifying the coordinate indices in conjugate space.
mode : string
Specifi
c
es the smoothing mode (default: "2s") :
Specifies the smoothing mode (default: "2s") :
- "ff" (smoothing in the harmonic basis using fast Fourier
transformations)
- "ff" (smoothing in the harmonic basis using fast Fourier transformations)
- "bf" (smoothing in the position basis by brute force)
- "2s" (smoothing in the position basis restricted to a 2-`sigma`
interval)
- "2s" (smoothing in the position basis restricted to a 2-`sigma` interval)
exclude : scalar
Excludes the first power spectrum entries from smoothing, indicated by
...
...
@@ -192,9 +189,9 @@ def _calc_inverse(tk,var,kindex,rho,b1,Amem): ## > computes the inverse Hessian
def
infer_power
(
m
,
domain
=
None
,
Sk
=
None
,
D
=
None
,
pindex
=
None
,
pundex
=
None
,
kindex
=
None
,
rho
=
None
,
q
=
1E-42
,
alpha
=
1
,
perception
=
(
1
,
0
),
smoothness
=
False
,
var
=
100
,
bare
=
True
,
**
kwargs
):
"""
Infer
e
s the power spectrum.
Infers the power spectrum.
Given a map the infered power spectrum is equal to ``m.power()``; given
Given a map the infer
r
ed power spectrum is equal to ``m.power()``; given
an uncertainty a power spectrum is inferred according to the "critical"
filter formula, which can be extended by a smoothness prior. For
details, see references below.
...
...
@@ -202,7 +199,7 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Parameters
----------
m : field
Map
o
f which the power spectrum is inferred.
Map f
or
which the power spectrum is inferred.
domain : space
The space wherein the power spectrum is defined, can be retrieved
from `Sk.domain` (default: None).
...
...
@@ -230,7 +227,8 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Spectral shape parameter of the assumed inverse-Gamme prior
(default: 1).
perception : {tuple, list, array}, *optional*
Tuple specifying the filter perception (default: (1,0)).
Tuple specifying the filter perception (delta,epsilon)
(default: (1,0)).
smoothness : bool, *optional*
Indicates whether the smoothness prior is used or not
(default: False).
...
...
@@ -244,13 +242,13 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Returns
-------
pk : numpy.ndarray
The infered power spectrum, weighted according to the `bare` flag.
The infer
r
ed power spectrum, weighted according to the `bare` flag.
Other Parameters
----------------
random : string, *optional*
The distribution from which the probes
are drawn, supported
distributions are (default: "pm1"):
The distribution from which the probes
for the diagonal probing are
drawn, supported
distributions are (default: "pm1"):
- "pm1" (uniform distribution over {+1,-1} or {+1,+i,-1,-i})
- "gau" (normal distribution with zero-mean and unit-variance)
...
...
@@ -280,10 +278,12 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Notes
-----
The general approach to inference of unknown power spectra is detailed
in [#]_, where the "critical" filter formula used here is derived. The
further incorporation of a smoothness prior is detailed in [#]_, where
the underlying formulas of this implementation are derived and
discussed in terms of their applicability.
in [#]_, where the "critical" filter formula, Eq.(37b), used here is
derived, and the implications of a certain choise of the perception
tuple (delta,epsilon) are discussed.
The further incorporation of a smoothness prior as detailed in [#]_,
where the underlying formula(s), Eq.(27), of this implementation are
derived and discussed in terms of their applicability.
References
----------
...
...
setup.py
View file @
a5f581b3
...
...
@@ -23,7 +23,7 @@ from distutils.core import setup
import
os
setup
(
name
=
"nifty"
,
version
=
"0.
2.1
"
,
version
=
"0.
3.0
"
,
description
=
"Numerical Information Field Theory"
,
author
=
"Marco Selig"
,
author_email
=
"mselig@mpa-garching.mpg.de"
,
...
...
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