diff --git a/AmpScan/align.py b/AmpScan/align.py index 6fbbb0a0eaa861f5d3c6fee85ad48a0cd1875f57..2bb153d8ae8644e3f964a609c568ca599ef792bf 100644 --- a/AmpScan/align.py +++ b/AmpScan/align.py @@ -11,7 +11,86 @@ from scipy.optimize import minimize def align(moving, static, method = 'P2P'): - + """ + Using this function for sample docstring (one line desc). + + A more extended description that provides details of how the function works. + + Parameters + ---------- + moving : array_like + Rot has a structure that can be iterated through implying it should be an + array like structure + static : data_type + Description of tTree input and what it does. + method : data_type + Desc of method + + Returns + ------- + type + Explanation of anonymous return value of type ``type``. + describe : type + Explanation of return value named `describe`. + out : type + Explanation of `out`. + type_without_description + + Other Parameters + ---------------- + only_seldom_used_keywords : type + Explanation + common_parameters_listed_above : type + Explanation + + Raises + ------ + BadException + Because you shouldn't have done that. + + See Also + -------- + otherfunc : relationship (optional) + newfunc : Relationship (optional), which could be fairly long, in which + case the line wraps here. + thirdfunc, fourthfunc, fifthfunc + + Notes + ----- + Notes about the implementation algorithm (if needed). + + This can have multiple paragraphs. + + You may include some math: + + .. math:: X(e^{j\omega } ) = x(n)e^{ - j\omega n} + + And even use a Greek symbol like :math:`\omega` inline. + + References + ---------- + Cite the relevant literature, e.g. [1]_. You may also cite these + references in the notes section above. + + .. [1] O. McNoleg, "The integration of GIS, remote sensing, + expert systems and adaptive co-kriging for environmental habitat + modelling of the Highland Haggis using object-oriented, fuzzy-logic + and neural-network techniques," Computers & Geosciences, vol. 22, + pp. 585-588, 1996. + + Examples + -------- + These are written in doctest format, and should illustrate how to + use the function. + + >>> a = [1, 2, 3] + >>> print [x + 3 for x in a] + [4, 5, 6] + >>> print "a\n\nb" + a + b + + """ def icp(): """ @@ -24,84 +103,6 @@ def align(moving, static, method = 'P2P'): def calcDistError(rot, tTree): - """ - Using this function for sample docstring (one line desc). - - A more extended description that provides details of how the function works. - - Parameters - ---------- - rot : array_like - Rot has a structure that can be iterated through implying it should be an - array like structure - tTree : data_type - Description of tTree input and what it does. - - Returns - ------- - type - Explanation of anonymous return value of type ``type``. - describe : type - Explanation of return value named `describe`. - out : type - Explanation of `out`. - type_without_description - - Other Parameters - ---------------- - only_seldom_used_keywords : type - Explanation - common_parameters_listed_above : type - Explanation - - Raises - ------ - BadException - Because you shouldn't have done that. - - See Also - -------- - otherfunc : relationship (optional) - newfunc : Relationship (optional), which could be fairly long, in which - case the line wraps here. - thirdfunc, fourthfunc, fifthfunc - - Notes - ----- - Notes about the implementation algorithm (if needed). - - This can have multiple paragraphs. - - You may include some math: - - .. math:: X(e^{j\omega } ) = x(n)e^{ - j\omega n} - - And even use a Greek symbol like :math:`\omega` inline. - - References - ---------- - Cite the relevant literature, e.g. [1]_. You may also cite these - references in the notes section above. - - .. [1] O. McNoleg, "The integration of GIS, remote sensing, - expert systems and adaptive co-kriging for environmental habitat - modelling of the Highland Haggis using object-oriented, fuzzy-logic - and neural-network techniques," Computers & Geosciences, vol. 22, - pp. 585-588, 1996. - - Examples - -------- - These are written in doctest format, and should illustrate how to - use the function. - - >>> a = [1, 2, 3] - >>> print [x + 3 for x in a] - [4, 5, 6] - >>> print "a\n\nb" - a - b - - """ Id = np.identity(3) for i in range(3): if rot[i] != 0: diff --git a/AmpScan/docstringstuff.py b/AmpScan/docstringstuff.py new file mode 100644 index 0000000000000000000000000000000000000000..1d7b1c5816e6acea6c90cbf7bb3718d3f5b625cd --- /dev/null +++ b/AmpScan/docstringstuff.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +""" +Created on Thu July 05 11:10:30 2018 + +@author: ojs1g14 +""" + + +def add_docs(input_file): + """ + docstring yo + """ + f = open(input_file, r+) + for line in f.readlines(): + if "def " in line: + print(str(line)) + + f.close() \ No newline at end of file diff --git a/Internship_Diary/main.tex b/Internship_Diary/main.tex index 3f3ca0fbf148c1f720d93908bf4f62098b217ef8..e43d5792f92a73d01f7affe51c7564f467c4dc47 100644 --- a/Internship_Diary/main.tex +++ b/Internship_Diary/main.tex @@ -135,5 +135,17 @@ pip install numpydoc An example docstring is provided in the inline documentation - I added this to the \_doctemplates folder in the top level directory with some tweaks to make it more relevant to the project. Copyright infringement may be worth considering before future deployment. +\noindent\fbox{% + \parbox{\textwidth}{% + Quick Note on Git: + +I spent some time finding that I could not add changes made to my branch. Changes were listed but would not be staged when I used \lstinline{git add .}. This turned out to be because I was not in the root directory of the branch. + }% +} + +... + +\subsection{Gitlab Wiki} +Gitlab provides in built documentation associated with the project... \end{document}