### Merge branch 'documentation_feedback' into 'NIFTy_5'

Documentation feedback

See merge request !303
parents 53c0d64a c44ef5b6
Pipeline #46643 passed with stages
in 9 minutes and 32 seconds
This diff is collapsed.
 ... ... @@ -38,3 +38,17 @@ Support for spherical harmonic transforms is added via:: MPI support is added via:: sudo apt-get install python3-mpi4py NIFTy documentation is provided by Sphinx. To build the documentation:: sudo apt-get install python3-sphinx-rtd-theme dvipng cd sh docs/generate.sh To view the documentation in firefox:: firefox docs/build/index.html (Note: Make sure that you reinstall nifty after each change since sphinx imports nifty from the Python path.)
 Discretization and Volume in NIFTy Discretisation and Volume in NIFTy ================================== .. note:: Some of this discussion is rather technical and may be skipped in a first read-through. ... ... @@ -160,15 +160,21 @@ Often, log-likelihoods contain integrals over the quantity of interest :math:s \int_\Omega \text{d}x\, s(x) \approx \sum_i s^i\int_{\Omega_i}\text{d}x\, 1 Here the domain of the integral :math:\Omega = \dot{\bigcup_q} \; \Omega_i is the disjoint union over smaller :math:\Omega_i, e.g. the pixels of the space, and :math:s_i is the discretized field value on the :math:i-th pixel. Here the domain of the integral :math:\Omega = \dot{\bigcup_q} \; \Omega_i is the disjoint union over smaller :math:\Omega_i, e.g. the pixels of the space, and :math:s_i is the discretised field value on the :math:i-th pixel. This introduces the weighting :math:V_i=\int_{\Omega_i}\text{d}x\, 1, also called the volume factor, a property of the space. NIFTy aids you in constructing your own log-likelihood by providing methods like :func:~field.Field.weight, which weights all pixels of a field with their corresponding volume. An integral over a :class:~field.Field :code:s can be performed by calling :code:s.weight(1).sum(), which is equivalent to :code:s.integrate(). Volume factors are also applied automatically in the following places: - :class:~operators.harmonic_operators.FFTOperator as well as all other harmonic operators. Here the zero mode of the transformed field is the integral over the original field, thus the whole field is weighted once. - some response operators, such as the :class:~library.los_response.LOSResponse. In this operator a line integral is descritized, so a 1-dimensional volume factor is applied. - In :class:~library.correlated_fields.CorrelatedField as well :class:~library.correlated_fields.MfCorrelatedField, the field is multiplied by the square root of the total volume in configuration space. This ensures that the same field reconstructed over a larger domain has the same variance in position space in the limit of infinite resolution. It also ensures that power spectra in NIFTy behave according to the definition of a power spectrum, namely the power of a k-mode is the expectation of the k-mode square, divided by the volume of the space. - :class:~operators.harmonic_operators.FFTOperator as well as all other harmonic operators. Here the zero mode of the transformed field is the integral over the original field, thus the whole field is weighted once. - Some response operators, such as the :class:~library.los_response.LOSResponse. In this operator a line integral is discretised, so a 1-dimensional volume factor is applied. - In :class:~library.correlated_fields.CorrelatedField as well as :class:~library.correlated_fields.MfCorrelatedField. Both describe fields with a smooth, a priori unknown correlation structure specified by a power spectrum. The field is multiplied by the square root of the total volume of it domain's harmonic counterpart. This ensures that the same power spectrum can be used regardless of the chosen resolution, provided the total volume of the space remains the same. It also guarantees that the power spectra in NIFTy behave according to their definition, i.e. the power of a mode :math:s_k is the expectation value of that mode squared, divided by the volume of its space :math:P(k) = \left\langle s_k^2 \right\rangle / V_k. Note that in contrast to some older versions of NIFTy, the dot product :code:s.vdot(t) of fields does **not** apply a volume factor, but instead just sums over the field components, ... ...
 ... ... @@ -45,6 +45,13 @@ def FuncConvolutionOperator(domain, func, space=None): The index of the subdomain on which the operator should act If None, it is set to 0 if domain contains exactly one space. domain[space] must be of type RGSpace, HPSpace, or GLSpace. Notes ----- The operator assumes periodic boundaries in the input domain. This means for a sufficiently broad function a point source close to the boundary will blur into the opposite side of the image. Zero padding can be applied to avoid this behaviour. """ domain = DomainTuple.make(domain) space = utilities.infer_space(domain, space) ... ...
 ... ... @@ -361,6 +361,13 @@ class HarmonicTransformOperator(LinearOperator): The index of the domain on which the operator should act If None, it is set to 0 if domain contains exactly one subdomain. domain[space] must be a harmonic domain. Notes ----- HarmonicTransformOperator uses a Hartley transformation to transform between harmonic and non-harmonic RGSpaces. This has the advantage that all field values are real in either space. If you require a true Fourier transform you should use FFTOperator instead. """ def __init__(self, domain, target=None, space=None): ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
{"ft_lang_label":"__label__en","ft_lang_prob":0.7795343,"math_prob":0.92157865,"size":5649,"snap":"2019-51-2020-05","text_gpt3_token_len":1373,"char_repetition_ratio":0.13374668,"word_repetition_ratio":0.21717171,"special_character_ratio":0.2566826,"punctuation_ratio":0.20837125,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9823141,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-16T06:32:29Z\",\"WARC-Record-ID\":\"<urn:uuid:09e7ef15-76b5-4081-970c-8595d97b3965>\",\"Content-Length\":\"156010\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f238b44e-14ea-4526-94e2-53d66b6f198a>\",\"WARC-Concurrent-To\":\"<urn:uuid:44fe08b6-bbc7-44a2-b24a-a9cb8821639a>\",\"WARC-IP-Address\":\"130.183.206.201\",\"WARC-Target-URI\":\"https://gitlab.mpcdf.mpg.de/ift/nifty/commit/ec9e1f7fa2749bbbbf9f999a6b7e3390ad4d1258?w=1\",\"WARC-Payload-Digest\":\"sha1:2WK4UITG7ZFAO2LY6EYY5WNUJEGFXEJ6\",\"WARC-Block-Digest\":\"sha1:FRA7GEA7KQMKEEECQVB4ML62BYXHL6NO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575541317967.94_warc_CC-MAIN-20191216041840-20191216065840-00510.warc.gz\"}"}