From b3bf2377b971385f5861aa84a742fa522e9cfbfa Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Wed, 21 Feb 2018 23:36:45 +0100 Subject: [PATCH] doc tweaks --- nifty4/field.py | 30 +++++++++++++++++++++-- nifty4/library/wiener_filter_curvature.py | 6 ++--- nifty4/library/wiener_filter_energy.py | 12 +++++---- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/nifty4/field.py b/nifty4/field.py index 1e3f1bbe..ea758f5b 100644 --- a/nifty4/field.py +++ b/nifty4/field.py @@ -44,8 +44,6 @@ class Field(object): dtype : type A numpy.type. Most common are float and complex. - - copy : bool """ def __init__(self, domain=None, val=None, dtype=None, copy=False, @@ -77,6 +75,20 @@ class Field(object): @staticmethod def full(domain, val, dtype=None): + """Creates a Field with a given domain, filled with a constant value. + + Parameters + ---------- + domain : Domain, tuple of Domain, or DomainTuple + domain of the new Field + val : float/complex/int scalar + fill value. Data type of the field is inferred from val. + + Returns + ------- + Field + the newly created field + """ if not np.isscalar(val): raise TypeError("val must be a scalar") return Field(DomainTuple.make(domain), val, dtype) @@ -95,6 +107,20 @@ class Field(object): @staticmethod def full_like(field, val, dtype=None): + """Creates a Field from a template, filled with a constant value. + + Parameters + ---------- + field : Field + the template field, from which the domain is inferred + val : float/complex/int scalar + fill value. Data type of the field is inferred from val. + + Returns + ------- + Field + the newly created field + """ if not isinstance(field, Field): raise TypeError("field must be of Field type") return Field.full(field._domain, val, dtype) diff --git a/nifty4/library/wiener_filter_curvature.py b/nifty4/library/wiener_filter_curvature.py index 6dc9ed2f..08e075ba 100644 --- a/nifty4/library/wiener_filter_curvature.py +++ b/nifty4/library/wiener_filter_curvature.py @@ -31,11 +31,11 @@ class WienerFilterCurvature(EndomorphicOperator): Parameters ---------- - R: LinearOperator + R : LinearOperator The response operator of the Wiener filter measurement. - N: EndomorphicOperator + N : EndomorphicOperator The noise covariance. - S: EndomorphicOperator + S : DiagonalOperator The prior signal covariance inverter : Minimizer The minimizer to use during numerical inversion diff --git a/nifty4/library/wiener_filter_energy.py b/nifty4/library/wiener_filter_energy.py index 925c7729..12ea6079 100644 --- a/nifty4/library/wiener_filter_energy.py +++ b/nifty4/library/wiener_filter_energy.py @@ -28,17 +28,19 @@ class WienerFilterEnergy(Energy): Parameters ---------- - position: Field + position : Field The current map in harmonic space. - d: Field + d : Field the data - R: LinearOperator + R : LinearOperator The response operator, description of the measurement process. It needs to map from harmonic signal space to data space. - N: EndomorphicOperator + N : EndomorphicOperator The noise covariance in data space. - S: EndomorphicOperator + S : EndomorphicOperator The prior signal covariance in harmonic space. + inverter : Minimizer + the minimization strategy to use for operator inversion """ def __init__(self, position, d, R, N, S, inverter, _j=None): -- GitLab