From 7f7571cb10e3c41b1213a524103a751871650829 Mon Sep 17 00:00:00 2001 From: Philipp Arras Date: Sun, 13 Jan 2019 16:42:45 +0100 Subject: [PATCH] living -> defined --- docs/source/code.rst | 8 ++++---- nifty5/domain_tuple.py | 4 ++-- nifty5/domains/domain.py | 4 ++-- nifty5/field.py | 2 +- nifty5/minimization/energy_adapter.py | 4 ++-- nifty5/multi_domain.py | 4 ++-- nifty5/operators/contraction_operator.py | 2 +- nifty5/operators/linear_operator.py | 20 ++++++++++---------- nifty5/operators/mask_operator.py | 2 +- nifty5/operators/operator.py | 2 +- nifty5/plot.py | 2 +- nifty5/sugar.py | 4 ++-- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/source/code.rst b/docs/source/code.rst index d01d01e1..6ba4b195 100644 --- a/docs/source/code.rst +++ b/docs/source/code.rst @@ -123,7 +123,7 @@ Some examples are: Consequently, NIFTy defines a class called :class:`DomainTuple` holding a sequence of :class:`Domain` objects, which is used to specify full field domains. In principle, a :class:`DomainTuple` can even be empty, which implies -that the field living on it is a scalar. +that the field defined on it is a scalar. A :class:`DomainTuple` supports iteration and indexing, and also provides the properties :attr:`~DomainTuple.shape`, :attr:`~DomainTuple.size` in analogy to @@ -152,7 +152,7 @@ Fields support a wide range of arithmetic operations, either involving two fields with equal domains, or a field and a scalar. Contractions (like summation, integration, minimum/maximum, computation of statistical moments) can be carried out either over an entire field (producing -a scalar result) or over sub-domains (resulting in a field living on a smaller +a scalar result) or over sub-domains (resulting in a field defined on a smaller domain). Scalar products of two fields can also be computed easily. There is also a set of convenience functions to generate fields with constant @@ -250,7 +250,7 @@ provided by NIFTy's :class:`InversionEnabler` class, which is itself a linear operator. Direct multiplication and adjoint inverse multiplication transform a field -living on the operator's :attr:`~LinearOperator.domain` to one living on the operator's :attr:`~LinearOperator.target`, whereas adjoint multiplication +defined on the operator's :attr:`~LinearOperator.domain` to one defined on the operator's :attr:`~LinearOperator.target`, whereas adjoint multiplication and inverse multiplication transform from :attr:`~LinearOperator.target` to :attr:`~LinearOperator.domain`. Operators with identical domain and target can be derived from @@ -364,7 +364,7 @@ These hold the prescription how to calculate the function's (optionally) :attr:`~Energy.metric` at any given :attr:`~Energy.position` in parameter space. Function values are floating-point scalars, gradients have the form of fields -living on the energy's position domain, and metrics are represented by +defined on the energy's position domain, and metrics are represented by linear operator objects. Energies are classes that typically have to be provided by the user when diff --git a/nifty5/domain_tuple.py b/nifty5/domain_tuple.py index c74baca1..e6e56da1 100644 --- a/nifty5/domain_tuple.py +++ b/nifty5/domain_tuple.py @@ -103,7 +103,7 @@ class DomainTuple(object): """tuple of int: number of pixels along each axis The shape of the array-like object required to store information - living on the DomainTuple. + defined on the DomainTuple. """ return self._shape @@ -112,7 +112,7 @@ class DomainTuple(object): """tuple of int: number of pixels along each axis on the local task The shape of the array-like object required to store information - living on part of the domain which is stored on the local MPI task. + defined on part of the domain which is stored on the local MPI task. """ from .dobj import local_shape return local_shape(self._shape) diff --git a/nifty5/domains/domain.py b/nifty5/domains/domain.py index 26322394..b635ae1a 100644 --- a/nifty5/domains/domain.py +++ b/nifty5/domains/domain.py @@ -80,7 +80,7 @@ class Domain(NiftyMetaBase()): """tuple of int: number of pixels along each axis The shape of the array-like object required to store information - living on the domain. + defined on the domain. """ raise NotImplementedError @@ -89,7 +89,7 @@ class Domain(NiftyMetaBase()): """tuple of int: number of pixels along each axis on the local task The shape of the array-like object required to store information - living on part of the domain which is stored on the local MPI task. + defined on part of the domain which is stored on the local MPI task. """ from ..dobj import local_shape return local_shape(self.shape) diff --git a/nifty5/field.py b/nifty5/field.py index e0bbac11..b8a90e06 100644 --- a/nifty5/field.py +++ b/nifty5/field.py @@ -159,7 +159,7 @@ class Field(object): Returns ------- Field - Field living on `new_domain`, but with the same data as `self`. + Field defined on `new_domain`, but with the same data as `self`. """ return Field(DomainTuple.make(new_domain), self._val) diff --git a/nifty5/minimization/energy_adapter.py b/nifty5/minimization/energy_adapter.py index 2e0c3c27..24958c76 100644 --- a/nifty5/minimization/energy_adapter.py +++ b/nifty5/minimization/energy_adapter.py @@ -25,11 +25,11 @@ class EnergyAdapter(Energy): Parameters ----------- - position: Field or MultiField living on the operator's input domain. - The position where the minimization process is started op: Operator with a scalar target domain The expression computing the energy from the input data constants: list of strings (default: []) + position: Field or MultiField + The position where the minimization process is started. The component names of the operator's input domain which are assumed to be constant during the minimization process. If the operator's input domain is not a MultiField, this must be empty. diff --git a/nifty5/multi_domain.py b/nifty5/multi_domain.py index d9b68b71..492cb528 100644 --- a/nifty5/multi_domain.py +++ b/nifty5/multi_domain.py @@ -22,8 +22,8 @@ from .utilities import frozendict, indent class MultiDomain(object): """A tuple of domains corresponding to a direct sum. - This class is the domain of the direct sum of fields living - over (possibly different) domains. To make an instance + This class is the domain of the direct sum of fields defined + on (possibly different) domains. To make an instance of this class, call `MultiDomain.make(inp)`. """ _domainCache = {} diff --git a/nifty5/operators/contraction_operator.py b/nifty5/operators/contraction_operator.py index 9edcf9ae..d64fbf91 100644 --- a/nifty5/operators/contraction_operator.py +++ b/nifty5/operators/contraction_operator.py @@ -35,7 +35,7 @@ class ContractionOperator(LinearOperator): spaces : int or tuple of int The elements of "domain" which are contracted. weight : int, default=0 - if nonzero, the fields living on self.domain are weighted with the + if nonzero, the fields defined on self.domain are weighted with the specified power. """ diff --git a/nifty5/operators/linear_operator.py b/nifty5/operators/linear_operator.py index 8f1cbb6e..80ab7115 100644 --- a/nifty5/operators/linear_operator.py +++ b/nifty5/operators/linear_operator.py @@ -148,7 +148,7 @@ class LinearOperator(Operator): Parameters ---------- x : Field - The input Field, living on the Operator's domain or target, + The input Field, defined on the Operator's domain or target, depending on mode. mode : int @@ -161,7 +161,7 @@ class LinearOperator(Operator): Returns ------- Field - The processed Field living on the Operator's target or domain, + The processed Field defined on the Operator's target or domain, depending on mode. """ raise NotImplementedError @@ -183,12 +183,12 @@ class LinearOperator(Operator): Parameters ---------- x : Field - The input Field, living on the Operator's domain. + The input Field, defined on the Operator's domain. Returns ------- Field - The processed Field living on the Operator's target domain. + The processed Field defined on the Operator's target domain. """ return self.apply(x, self.TIMES) @@ -198,12 +198,12 @@ class LinearOperator(Operator): Parameters ---------- x : Field - The input Field, living on the Operator's target domain + The input Field, defined on the Operator's target domain Returns ------- Field - The processed Field living on the Operator's domain. + The processed Field defined on the Operator's domain. """ return self.apply(x, self.INVERSE_TIMES) @@ -213,12 +213,12 @@ class LinearOperator(Operator): Parameters ---------- x : Field - The input Field, living on the Operator's target domain + The input Field, defined on the Operator's target domain Returns ------- Field - The processed Field living on the Operator's domain. + The processed Field defined on the Operator's domain. """ return self.apply(x, self.ADJOINT_TIMES) @@ -228,12 +228,12 @@ class LinearOperator(Operator): Parameters ---------- x : Field - The input Field, living on the Operator's domain. + The input Field, defined on the Operator's domain. Returns ------- Field - The processed Field living on the Operator's target domain. + The processed Field defined on the Operator's target domain. Notes ----- diff --git a/nifty5/operators/mask_operator.py b/nifty5/operators/mask_operator.py index f4c6e349..71fb2980 100644 --- a/nifty5/operators/mask_operator.py +++ b/nifty5/operators/mask_operator.py @@ -24,7 +24,7 @@ from .linear_operator import LinearOperator # MR FIXME: this needs a redesign to avoid most _global_data() calls -# Possible approach: keep everything living on `domain` distributed and only +# Possible approach: keep everything defined on `domain` distributed and only # collect the unstructured Fields. class MaskOperator(LinearOperator): def __init__(self, mask): diff --git a/nifty5/operators/operator.py b/nifty5/operators/operator.py index 24794035..9893c35f 100644 --- a/nifty5/operators/operator.py +++ b/nifty5/operators/operator.py @@ -20,7 +20,7 @@ from ..utilities import NiftyMetaBase, indent class Operator(NiftyMetaBase()): - """Transforms values living on one domain into values living on another + """Transforms values defined on one domain into values defined on another domain, and can also provide the Jacobian. """ diff --git a/nifty5/plot.py b/nifty5/plot.py index e1cf2088..a8011e98 100644 --- a/nifty5/plot.py +++ b/nifty5/plot.py @@ -276,7 +276,7 @@ class Plot(object): f: Field, or list of Field objects If `f` is a single Field, it must be defined on a single `RGSpace`, `PowerSpace`, `HPSpace`, `GLSpace`. - If it is a list, all list members must be Fields living over the + If it is a list, all list members must be Fields defined over the same one-dimensional `RGSpace` or `PowerSpace`. title: string title of the plot diff --git a/nifty5/sugar.py b/nifty5/sugar.py index c9215fa0..fcbfec21 100644 --- a/nifty5/sugar.py +++ b/nifty5/sugar.py @@ -52,7 +52,7 @@ def PS_field(pspace, func): Returns ------- - Field : a field living on (pspace,) containing the computed function values + Field : a field defined on (pspace,) containing the computed function values """ if not isinstance(pspace, PowerSpace): raise TypeError @@ -167,7 +167,7 @@ def power_analyze(field, spaces=None, binbounds=None, def _create_power_field(domain, power_spectrum): - if not callable(power_spectrum): # we have a Field living on a PowerSpace + if not callable(power_spectrum): # we have a Field defined on a PowerSpace if not isinstance(power_spectrum, Field): raise TypeError("Field object expected") if len(power_spectrum.domain) != 1: -- GitLab