diff --git a/nifty4/field.py b/nifty4/field.py index 1e3f1bbee71fe8bfaeb53ad34f52b818800f40ea..ea758f5b47841ef5ab0bd742d09626fe306bce3e 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 6dc9ed2ffb58c2c98a5bb5852ceca55cf3080342..08e075bab6c5b3c591a8ba4bb4a9cbaad5ecb0e5 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 925c7729ae31739dbeed4445650fa6bc5f2692fa..12ea6079c88f5d22235bb0fbdfcaed15e15069f1 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):