Commit a5f581b3 authored by Marco Selig's avatar Marco Selig

version update.

parent 56bbb7ad
...@@ -96,7 +96,7 @@ Requirements ...@@ -96,7 +96,7 @@ Requirements
Download 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 at `<https://github.com/mselig/nifty/tags>`_. The current version can be
obtained by cloning the repository:: obtained by cloning the repository::
......
...@@ -480,7 +480,7 @@ class _about(object): ## nifty support class for global settings ...@@ -480,7 +480,7 @@ class _about(object): ## nifty support class for global settings
""" """
## version ## version
self._version = "0.2.1" self._version = "0.3.0"
## switches and notifications ## switches and notifications
self._errors = notification(default=True,ccode=notification._code) self._errors = notification(default=True,ccode=notification._code)
......
...@@ -112,14 +112,11 @@ def smooth_power(power,kindex,mode="2s",exclude=1,sigma=-1): ...@@ -112,14 +112,11 @@ def smooth_power(power,kindex,mode="2s",exclude=1,sigma=-1):
The array specifying the coordinate indices in conjugate space. The array specifying the coordinate indices in conjugate space.
mode : string mode : string
Specifices the smoothing mode (default: "2s") : Specifies the smoothing mode (default: "2s") :
- "ff" (smoothing in the harmonic basis using fast Fourier - "ff" (smoothing in the harmonic basis using fast Fourier transformations)
transformations)
- "bf" (smoothing in the position basis by brute force) - "bf" (smoothing in the position basis by brute force)
- "2s" (smoothing in the position basis restricted to a 2-`sigma` - "2s" (smoothing in the position basis restricted to a 2-`sigma` interval)
interval)
exclude : scalar exclude : scalar
Excludes the first power spectrum entries from smoothing, indicated by 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 ...@@ -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): 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):
""" """
Inferes the power spectrum. Infers the power spectrum.
Given a map the infered power spectrum is equal to ``m.power()``; given Given a map the inferred power spectrum is equal to ``m.power()``; given
an uncertainty a power spectrum is inferred according to the "critical" an uncertainty a power spectrum is inferred according to the "critical"
filter formula, which can be extended by a smoothness prior. For filter formula, which can be extended by a smoothness prior. For
details, see references below. details, see references below.
...@@ -202,7 +199,7 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None ...@@ -202,7 +199,7 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Parameters Parameters
---------- ----------
m : field m : field
Map of which the power spectrum is inferred. Map for which the power spectrum is inferred.
domain : space domain : space
The space wherein the power spectrum is defined, can be retrieved The space wherein the power spectrum is defined, can be retrieved
from `Sk.domain` (default: None). 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 ...@@ -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 Spectral shape parameter of the assumed inverse-Gamme prior
(default: 1). (default: 1).
perception : {tuple, list, array}, *optional* 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* smoothness : bool, *optional*
Indicates whether the smoothness prior is used or not Indicates whether the smoothness prior is used or not
(default: False). (default: False).
...@@ -244,13 +242,13 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None ...@@ -244,13 +242,13 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Returns Returns
------- -------
pk : numpy.ndarray pk : numpy.ndarray
The infered power spectrum, weighted according to the `bare` flag. The inferred power spectrum, weighted according to the `bare` flag.
Other Parameters Other Parameters
---------------- ----------------
random : string, *optional* random : string, *optional*
The distribution from which the probes are drawn, supported The distribution from which the probes for the diagonal probing are
distributions are (default: "pm1"): drawn, supported distributions are (default: "pm1"):
- "pm1" (uniform distribution over {+1,-1} or {+1,+i,-1,-i}) - "pm1" (uniform distribution over {+1,-1} or {+1,+i,-1,-i})
- "gau" (normal distribution with zero-mean and unit-variance) - "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 ...@@ -280,10 +278,12 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
Notes Notes
----- -----
The general approach to inference of unknown power spectra is detailed The general approach to inference of unknown power spectra is detailed
in [#]_, where the "critical" filter formula used here is derived. The in [#]_, where the "critical" filter formula, Eq.(37b), used here is
further incorporation of a smoothness prior is detailed in [#]_, where derived, and the implications of a certain choise of the perception
the underlying formulas of this implementation are derived and tuple (delta,epsilon) are discussed.
discussed in terms of their applicability. 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 References
---------- ----------
......
...@@ -23,7 +23,7 @@ from distutils.core import setup ...@@ -23,7 +23,7 @@ from distutils.core import setup
import os import os
setup(name="nifty", setup(name="nifty",
version="0.2.1", version="0.3.0",
description="Numerical Information Field Theory", description="Numerical Information Field Theory",
author="Marco Selig", author="Marco Selig",
author_email="mselig@mpa-garching.mpg.de", author_email="mselig@mpa-garching.mpg.de",
......
Markdown is supported
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