From 5b6d8b77ae7ef3d061112a70bf7c52852a6c1634 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Mon, 29 Jul 2019 19:08:42 +0200 Subject: [PATCH] add unique id ending function and get full id function and write ascii data file function --- docs/build/html/_modules/data.html | 104 ++++++++++++++---- docs/build/html/_modules/date.html | 6 +- docs/build/html/_modules/geometry.html | 6 +- docs/build/html/_modules/index.html | 6 +- docs/build/html/_modules/numerical/fit.html | 6 +- .../html/_modules/numerical/integration.html | 6 +- docs/build/html/_modules/numerical/ode.html | 6 +- .../html/_modules/numerical/ode_model.html | 6 +- docs/build/html/_modules/time_of_day.html | 6 +- docs/build/html/_sources/data.rst.txt | 6 +- docs/build/html/_sources/date.rst.txt | 6 +- docs/build/html/_sources/geometry.rst.txt | 6 +- docs/build/html/_sources/numerical.rst.txt | 30 ++--- docs/build/html/_sources/time_of_day.rst.txt | 6 +- docs/build/html/_static/basic.css | 15 +++ docs/build/html/_static/searchtools.js | 7 +- docs/build/html/data.html | 80 ++++++++++++-- docs/build/html/date.html | 18 +-- docs/build/html/genindex.html | 52 ++++++--- docs/build/html/geometry.html | 24 ++-- docs/build/html/index.html | 6 +- docs/build/html/modules.html | 6 +- docs/build/html/numerical.html | 32 +++--- docs/build/html/objects.inv | Bin 698 -> 711 bytes docs/build/html/py-modindex.html | 20 ++-- docs/build/html/search.html | 2 +- docs/build/html/searchindex.js | 2 +- docs/build/html/time_of_day.html | 26 ++--- docs/source/data.rst | 6 +- docs/source/date.rst | 6 +- docs/source/geometry.rst | 6 +- docs/source/numerical.rst | 30 ++--- docs/source/time_of_day.rst | 6 +- src/data.py | 62 +++++++++-- tests/test_data.py | 35 +++++- 35 files changed, 426 insertions(+), 221 deletions(-) diff --git a/docs/build/html/_modules/data.html b/docs/build/html/_modules/data.html index f93c332..bebc72d 100644 --- a/docs/build/html/_modules/data.html +++ b/docs/build/html/_modules/data.html @@ -37,6 +37,8 @@ # -*- coding: utf-8 -*- """Read and write data to or from file. +:Date: 2019-07-29 + .. module:: data :platform: *nix, Windows :synopsis: Handle data files. @@ -46,7 +48,7 @@ from __future__ import print_function import pickle -
[docs]def data_read(file_name, x_column, y_column): +
[docs]def read(file_name, x_column, y_column, default=None, verbose=False): """Read ascii data file. :param filename: file to read @@ -55,27 +57,54 @@ :type x_column: int :param y_column: column index for the y data (first column is 0) :type y_column: int + :param default: return object if data loading fails + :type default: object + :param verbose: verbose information (default = False) + :type verbose: bool :returns: x and y :rtype: tuple(list, list) """ import re - file = open(file_name) - x = [] - y = [] - for row in file: - fields = re.split(r'\s+', row.strip()) - #print(filds) - x.append(float(fields[x_column])) - y.append(float(fields[y_column])) - file.close() + + x = default + y = default + + if verbose: + print('check if data is available') + try: + file = open(file_name) + x = [] + y = [] + for row in file: + fields = re.split(r'\s+', row.strip()) + #print(filds) + x.append(float(fields[x_column])) + y.append(float(fields[y_column])) + file.close() + except IOError: + if verbose: + print('data file not found') return x, y
-
[docs]def data_load(file_name, verbose=False): +
[docs]def write(file_name, data): + """Write ascii file. + + :param file_name: file to write + :type file_name: str + :param data: data to write + :type data: str + """ + with open(file_name, 'w') as file: + file.write(data)
+ +
[docs]def load(file_name, default=None, verbose=False): """Load stored program objects from binary file. :param file_name: file to load :type file_name: str + :param default: return object if data loading fails + :type default: object :param verbose: verbose information (default = False) :type verbose: bool @@ -86,17 +115,18 @@ print('check if data is available') try: with open(file_name, 'rb') as input: - object_data = pickle.load(input) # one load for every dump is needed to load all the data + # one load for every dump is needed to load all the data + object_data = pickle.load(input) if verbose: print('found:') print(object_data) except IOError: - object_data = None + object_data = default if verbose: print('no saved datas found') return object_data
-
[docs]def data_store(file_name, object_data): +
[docs]def store(file_name, object_data): """Store program objects to binary file. :param file_name: file to store @@ -105,14 +135,40 @@ :type object_data: object """ with open(file_name, 'wb') as output: - pickle.dump(object_data, output, pickle.HIGHEST_PROTOCOL) # every dump needs a load
+ # every dump needs a load + pickle.dump(object_data, output, pickle.HIGHEST_PROTOCOL)
-
[docs]def main(): - """Main function.""" - file_name = "slit_test_scan.dat" - x, y = data_read(file_name, 3, 2) - print(x) - print(y)
+
[docs]def unique_ending(ids, n=1): + """From id list get list with unique ending. + + :param ids: ids + :type ids: list + :param n: minumum chars or ints + :type n: int + + :returns: unique ending of ids + :rtype: list + """ + if ids is not None: + x = [idi[-n:] for idi in ids] + if len(x) > len(set(x)): + return unique_ending(ids, n+1) + else: + return x
+ +
[docs]def get_id(ids, uide): + """Get full id from unique id ending. + + :param ids: ids + :type ids: list + :param uide: unique id ending + :type uide: str + + :returns: full id + :rtype: str or int + """ + # we know it is a unique ending + return [idi for idi in ids if idi.endswith(uide)][0]
@@ -142,10 +198,10 @@ diff --git a/docs/build/html/_modules/date.html b/docs/build/html/_modules/date.html index 3ab7901..a6eeaae 100644 --- a/docs/build/html/_modules/date.html +++ b/docs/build/html/_modules/date.html @@ -185,10 +185,10 @@ diff --git a/docs/build/html/_modules/geometry.html b/docs/build/html/_modules/geometry.html index e31d1ca..7b44c51 100644 --- a/docs/build/html/_modules/geometry.html +++ b/docs/build/html/_modules/geometry.html @@ -269,10 +269,10 @@ diff --git a/docs/build/html/_modules/index.html b/docs/build/html/_modules/index.html index 678a239..34f8963 100644 --- a/docs/build/html/_modules/index.html +++ b/docs/build/html/_modules/index.html @@ -68,10 +68,10 @@ diff --git a/docs/build/html/_modules/numerical/fit.html b/docs/build/html/_modules/numerical/fit.html index b0719af..d6f5e06 100644 --- a/docs/build/html/_modules/numerical/fit.html +++ b/docs/build/html/_modules/numerical/fit.html @@ -157,10 +157,10 @@ diff --git a/docs/build/html/_modules/numerical/integration.html b/docs/build/html/_modules/numerical/integration.html index e85af51..e09a6e9 100644 --- a/docs/build/html/_modules/numerical/integration.html +++ b/docs/build/html/_modules/numerical/integration.html @@ -213,10 +213,10 @@ diff --git a/docs/build/html/_modules/numerical/ode.html b/docs/build/html/_modules/numerical/ode.html index 629bed9..88d563d 100644 --- a/docs/build/html/_modules/numerical/ode.html +++ b/docs/build/html/_modules/numerical/ode.html @@ -503,10 +503,10 @@ diff --git a/docs/build/html/_modules/numerical/ode_model.html b/docs/build/html/_modules/numerical/ode_model.html index 2c8e212..77de2d0 100644 --- a/docs/build/html/_modules/numerical/ode_model.html +++ b/docs/build/html/_modules/numerical/ode_model.html @@ -182,10 +182,10 @@ diff --git a/docs/build/html/_modules/time_of_day.html b/docs/build/html/_modules/time_of_day.html index b5afb74..daea33c 100644 --- a/docs/build/html/_modules/time_of_day.html +++ b/docs/build/html/_modules/time_of_day.html @@ -218,10 +218,10 @@ diff --git a/docs/build/html/_sources/data.rst.txt b/docs/build/html/_sources/data.rst.txt index 778b5c5..a5dfafd 100644 --- a/docs/build/html/_sources/data.rst.txt +++ b/docs/build/html/_sources/data.rst.txt @@ -2,6 +2,6 @@ data module =========== .. automodule:: data - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/date.rst.txt b/docs/build/html/_sources/date.rst.txt index 43cc022..67ad670 100644 --- a/docs/build/html/_sources/date.rst.txt +++ b/docs/build/html/_sources/date.rst.txt @@ -2,6 +2,6 @@ date module =========== .. automodule:: date - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/geometry.rst.txt b/docs/build/html/_sources/geometry.rst.txt index 0e22c7e..88d7478 100644 --- a/docs/build/html/_sources/geometry.rst.txt +++ b/docs/build/html/_sources/geometry.rst.txt @@ -2,6 +2,6 @@ geometry module =============== .. automodule:: geometry - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/numerical.rst.txt b/docs/build/html/_sources/numerical.rst.txt index e37c893..bdde3b2 100644 --- a/docs/build/html/_sources/numerical.rst.txt +++ b/docs/build/html/_sources/numerical.rst.txt @@ -8,39 +8,39 @@ numerical.fit module -------------------- .. automodule:: numerical.fit - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: numerical.integration module ---------------------------- .. automodule:: numerical.integration - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: numerical.ode module -------------------- .. automodule:: numerical.ode - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: numerical.ode\_model module --------------------------- .. automodule:: numerical.ode_model - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: numerical - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/time_of_day.rst.txt b/docs/build/html/_sources/time_of_day.rst.txt index 4890e6b..2b8922a 100644 --- a/docs/build/html/_sources/time_of_day.rst.txt +++ b/docs/build/html/_sources/time_of_day.rst.txt @@ -2,6 +2,6 @@ time\_of\_day module ==================== .. automodule:: time_of_day - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_static/basic.css b/docs/build/html/_static/basic.css index 53acd09..c41d718 100644 --- a/docs/build/html/_static/basic.css +++ b/docs/build/html/_static/basic.css @@ -289,6 +289,12 @@ img.align-center, .figure.align-center, object.align-center { margin-right: auto; } +img.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + .align-left { text-align: left; } @@ -297,6 +303,10 @@ img.align-center, .figure.align-center, object.align-center { text-align: center; } +.align-default { + text-align: center; +} + .align-right { text-align: right; } @@ -368,6 +378,11 @@ table.align-center { margin-right: auto; } +table.align-default { + margin-left: auto; + margin-right: auto; +} + table caption span.caption-number { font-style: italic; } diff --git a/docs/build/html/_static/searchtools.js b/docs/build/html/_static/searchtools.js index bdc2706..6031f99 100644 --- a/docs/build/html/_static/searchtools.js +++ b/docs/build/html/_static/searchtools.js @@ -319,12 +319,13 @@ var Search = { for (var prefix in objects) { for (var name in objects[prefix]) { var fullname = (prefix ? prefix + '.' : '') + name; - if (fullname.toLowerCase().indexOf(object) > -1) { + var fullnameLower = fullname.toLowerCase() + if (fullnameLower.indexOf(object) > -1) { var score = 0; - var parts = fullname.split('.'); + var parts = fullnameLower.split('.'); // check for different match types: exact matches of full name or // "last name" (i.e. last dotted part) - if (fullname == object || parts[parts.length - 1] == object) { + if (fullnameLower == object || parts[parts.length - 1] == object) { score += Scorer.objNameMatch; // matches in last name } else if (parts[parts.length - 1].indexOf(object) > -1) { diff --git a/docs/build/html/data.html b/docs/build/html/data.html index 0a100a0..eb74c86 100644 --- a/docs/build/html/data.html +++ b/docs/build/html/data.html @@ -35,14 +35,40 @@

data module

Read and write data to or from file.

+
+
Date
+

2019-07-29

+
+
-
-data_load(file_name, verbose=False)[source]
+
+get_id(ids, uide)[source]
+

Get full id from unique id ending.

+
+
Parameters
+
    +
  • ids (list) – ids

  • +
  • uide (str) – unique id ending

  • +
+
+
Returns
+

full id

+
+
Return type
+

str or int

+
+
+
+ +
+
+load(file_name, default=None, verbose=False)[source]

Load stored program objects from binary file.

Parameters
  • file_name (str) – file to load

  • +
  • default (object) – return object if data loading fails

  • verbose (bool) – verbose information (default = False)

@@ -56,8 +82,8 @@
-
-data_read(file_name, x_column, y_column)[source]
+
+read(file_name, x_column, y_column, default=None, verbose=False)[source]

Read ascii data file.

Parameters
@@ -65,6 +91,8 @@
  • filename (str) – file to read

  • x_column (int) – column index for the x data (first column is 0)

  • y_column (int) – column index for the y data (first column is 0)

  • +
  • default (object) – return object if data loading fails

  • +
  • verbose (bool) – verbose information (default = False)

  • Returns
    @@ -77,8 +105,8 @@
    -
    -data_store(file_name, object_data)[source]
    +
    +store(file_name, object_data)[source]

    Store program objects to binary file.

    Parameters
    @@ -91,9 +119,37 @@
    -
    -main()[source]
    -

    Main function.

    +
    +unique_ending(ids, n=1)[source]
    +

    From id list get list with unique ending.

    +
    +
    Parameters
    +
      +
    • ids (list) – ids

    • +
    • n (int) – minumum chars or ints

    • +
    +
    +
    Returns
    +

    unique ending of ids

    +
    +
    Return type
    +

    list

    +
    +
    +
    + +
    +
    +write(file_name, data)[source]
    +

    Write ascii file.

    +
    +
    Parameters
    +
      +
    • file_name (str) – file to write

    • +
    • data (str) – data to write

    • +
    +
    +
    @@ -124,10 +180,10 @@

    A

    @@ -79,19 +81,13 @@
    @@ -181,6 +179,10 @@ +
    @@ -188,12 +190,10 @@

    M

    @@ -248,6 +248,8 @@

    R

    @@ -264,11 +266,13 @@ - +
    @@ -289,6 +293,22 @@ +

    U

    + + +
    + +

    W

    + + +
    + @@ -316,10 +336,10 @@ diff --git a/docs/build/html/geometry.html b/docs/build/html/geometry.html index 08db166..57bf4fc 100644 --- a/docs/build/html/geometry.html +++ b/docs/build/html/geometry.html @@ -42,7 +42,7 @@
    -cubic(point1, angle1, point2, angle2, samples=50)[source]
    +cubic(point1, angle1, point2, angle2, samples=50)[source]
    Parameters
      @@ -65,7 +65,7 @@
      -cubic_deg(point1, angle1, point2, angle2)[source]
      +cubic_deg(point1, angle1, point2, angle2)[source]
      Parameters
        @@ -91,7 +91,7 @@
        -line(point1, point2, samples=2)[source]
        +line(point1, point2, samples=2)[source]
        \[y = \frac{y_2-y_1}{x_2-x_1}(x-x_1) + y_1\]
        @@ -115,7 +115,7 @@
        -points(*pts)[source]
        +points(*pts)[source]
        Parameters

        *pts – points to rearrange

        @@ -131,7 +131,7 @@
        -rectangle(width, height)[source]
        +rectangle(width, height)[source]
        Parameters
          @@ -150,7 +150,7 @@
          -rotate(origin, angle, *pts, **kwargs)[source]
          +rotate(origin, angle, *pts, **kwargs)[source]

          Rotate a point or polygon counterclockwise by a given angle around a given origin. The angle should be given in radians.

          @@ -173,7 +173,7 @@ origin. The angle should be given in radians.

          -rotate_deg(origin, angle, *pts, **kwargs)[source]
          +rotate_deg(origin, angle, *pts, **kwargs)[source]

          Rotate a point or polygon counterclockwise by a given angle around a given origin. The angle should be given in degrees.

          @@ -200,7 +200,7 @@ origin. The angle should be given in degrees.

          -square(width)[source]
          +square(width)[source]
          Parameters

          width (int or float) – the edge size of the square

          @@ -220,7 +220,7 @@ origin. The angle should be given in degrees.

          -translate(vec, *pts)[source]
          +translate(vec, *pts)[source]

          Translate a point or polygon by a given vector.

          Parameters
          @@ -266,10 +266,10 @@ origin. The angle should be given in degrees.

    diff --git a/docs/build/html/search.html b/docs/build/html/search.html index 4784e07..fb1d910 100644 --- a/docs/build/html/search.html +++ b/docs/build/html/search.html @@ -101,7 +101,7 @@ ©2019, Daniel Weschke. | - Powered by Sphinx 2.0.1 + Powered by Sphinx 2.1.2 & Alabaster 0.7.12 diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index fa5c2a4..43acc68 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["data","date","geometry","index","modules","numerical","time_of_day"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["data.rst","date.rst","geometry.rst","index.rst","modules.rst","numerical.rst","time_of_day.rst"],objects:{"":{data:[0,0,0,"-"],date:[1,0,0,"-"],fit:[5,0,0,"-"],geometry:[2,0,0,"-"],integration:[5,0,0,"-"],numerical:[5,0,0,"-"],ode:[5,0,0,"-"],ode_model:[5,0,0,"-"],time_of_day:[6,0,0,"-"]},"numerical.fit":{gauss:[5,1,1,""],gauss_fit:[5,1,1,""]},"numerical.integration":{trapez:[5,1,1,""]},"numerical.ode":{e1:[5,1,1,""],e2:[5,1,1,""],e4:[5,1,1,""],fpi:[5,1,1,""],i1:[5,1,1,""],newmark_newtonraphson:[5,1,1,""],newmark_newtonraphson_rdk:[5,1,1,""]},"numerical.ode_model":{disk:[5,1,1,""],disk_nm:[5,1,1,""],disk_nmmdk:[5,1,1,""]},data:{data_load:[0,1,1,""],data_read:[0,1,1,""],data_store:[0,1,1,""],main:[0,1,1,""]},date:{"gau\u00dfsche_osterformel":[1,1,1,""],ascension_of_jesus:[1,1,1,""],easter_friday:[1,1,1,""],easter_monday:[1,1,1,""],easter_sunday:[1,1,1,""],pentecost:[1,1,1,""]},geometry:{cubic:[2,1,1,""],cubic_deg:[2,1,1,""],line:[2,1,1,""],points:[2,1,1,""],rectangle:[2,1,1,""],rotate:[2,1,1,""],rotate_deg:[2,1,1,""],square:[2,1,1,""],translate:[2,1,1,""]},numerical:{fit:[5,0,0,"-"],integration:[5,0,0,"-"],ode:[5,0,0,"-"],ode_model:[5,0,0,"-"]},time_of_day:{days:[6,1,1,""],days_norm:[6,1,1,""],hours:[6,1,1,""],hours_norm:[6,1,1,""],in_seconds:[6,1,1,""],minutes:[6,1,1,""],minutes_norm:[6,1,1,""],seconds:[6,1,1,""],seconds_norm:[6,1,1,""],transform:[6,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"1st":5,"2nd":5,"4th":5,"9fsche_osterformel":1,"case":5,"default":[0,5,6],"f\u00fcr":1,"float":[2,5,6],"fr\u00fchling":1,"function":[0,5],"gau\u00dfsch":1,"gau\u00dfsche_osterformel":1,"int":[0,1,2,5],"korrekturgr\u00f6\u00df":1,"m\u00e4rz":1,"m\u00e4rzdatum":1,"new":6,"return":[0,1,2,5,6],"s\u00e4kular":1,"s\u00e4kularzahl":1,"vorw\u00e4rt":5,Das:1,The:[2,5,6],against:5,algorithmu:1,als:1,amplitud:5,analyt:5,angl:2,angle1:2,angle2:2,approx:5,approxim:5,april:1,area:5,around:2,ascens:1,ascension_of_jesu:1,ascii:0,averag:6,backward:5,base:5,becom:5,begin:5,beta:5,binari:0,bmatrix:5,bool:[0,5],calcul:[1,5,6],cauchi:5,cdot:5,center:2,choos:5,column:0,composit:5,condit:5,content:4,convert:6,counterclockwis:2,cubic:2,cubic_deg:2,dai:[1,6],data:[4,5],data_load:0,data_read:0,data_stor:0,date:[2,4,5,6],datetim:1,datum:1,days_norm:6,ddot:5,definit:5,degre:2,delta:[],den:1,der:1,deriv:5,des:1,describ:5,deviat:5,diamet:5,die:1,differ:5,differenti:5,disk:5,disk_nm:5,disk_nmmdk:5,displac:5,distribut:5,divid:5,dot:5,dxdt_dt:[],easter:1,easter_fridai:1,easter_mondai:1,easter_sundai:1,eccentr:5,edg:2,end:[2,5],entfernung:1,equal:5,equalii:5,equat:5,error:5,ersten:1,euler:5,everi:5,exampl:5,expect:5,explicit:5,explizit:5,f_n:5,fals:[0,5],fassregel:5,file:0,file_nam:0,filenam:0,first:[0,5],fit:4,fix:5,fixed_point_iter:[],float64:5,fnm:5,foral:5,forward:5,fourth:5,fpi:5,frac:[2,5],fridai:1,from:[0,5],full:5,fwhm:5,gamma:5,gau:1,gauss:5,gauss_fit:5,geometri:4,gilt:1,given:[2,5],global:5,govern:5,gregorian:6,gregorianischen:1,half:5,has:5,height:2,hour:6,hours_norm:6,http:1,i1n:[],i1new:[],implicit:5,in_second:6,index:[0,3],inform:[0,5],initi:5,integr:4,integrand:5,interv:5,iter:5,jahr:1,jesu:1,johann:5,kalend:1,kalendarisch:1,keim:1,kepler:5,keplersch:5,kutta:5,kwarg:2,lambda:5,ldot:5,left:5,leftrightarrow:5,length:6,leq:5,limit:5,limits_:5,limits_a:5,line:2,list:[0,5],load:0,local:5,lower:5,lvert:5,main:0,march:1,mathmat:5,mathrm:5,max_iter:5,maximum:5,maxiter:[],mean:5,method:5,minut:6,minutes_norm:6,model:5,modul:[3,4],mondai:1,mondparamet:1,mondschaltung:1,ndarrai:5,necessari:5,necessarili:5,newmark:5,newmark_newtonraphson:5,newmark_newtonraphson_rdk:5,none:5,norm:[],normal:6,number:[2,5],numer:4,numerisch:5,numpi:5,object:[0,2],object_data:0,ode:4,ode_model:4,offset:[5,6],one:[2,5],option:2,order:5,ordinari:5,org:1,origin:2,osterentfernung:1,osterformel:1,ostergrenz:1,ostersonntag:1,other:2,packag:4,page:3,paramet:[0,1,2,5,6],pentecost:1,per:5,point1:2,point1_i:2,point1_x:2,point2:2,point2_i:2,point2_x:2,point3:2,point4:2,point:[2,5],point_i:2,point_x:2,points1_i:2,polygon:2,polygonzugverfahren:5,popt:5,posit:5,position_norm:6,print:5,problem:5,program:0,proport:5,pts:2,quad:5,quadratur:5,radian:2,rang:6,read:0,rearrang:2,rectangl:2,residuum:5,right:5,rotat:[2,5],rotate_deg:2,rule:5,rung:5,rvert:5,sampl:2,sample_point1_x:2,sample_point2_i:2,sample_point2_x:2,sample_points1_i:2,save_valu:5,sche:5,search:3,second:[5,6],seconds_norm:6,segment:5,set:5,should:2,side:5,sigma:5,simpson:5,simpsonregel:5,size:[2,5],slope:2,solut:5,solv:5,solver:5,sonnenschaltung:1,sonntag:1,sourc:[0,1,2,5,6],space:5,spacial:1,special:5,specifi:5,sqrt:5,squar:[2,5],stabl:5,standard:5,step:5,store:0,str:0,struct_tim:6,subinterv:5,submodul:4,sum:5,sundai:1,system:5,t_0:5,t_i:5,tagen:1,text:5,therefor:5,thick:5,thoma:5,ti1:5,time:[5,6],time_norm:6,time_of_dai:4,tol:5,toler:5,torqu:5,transform:6,translat:2,trapez:5,trapezium:5,trapezoid:5,trapezregel:5,tupl:[0,2,5],two:5,type:[0,1,2,5,6],upper:5,used:5,using:5,usw:1,valu:[5,6],varepsilon:5,variabl:[1,5],varianc:5,vec:2,vector:2,veloc:5,verbos:[0,5],verfahren:5,vert:[],vert_0:5,vert_a:5,vertic:5,vollmond:1,von:1,where:5,which:5,width:[2,5],wiki:1,wikipedia:1,write:0,x_0:5,x_1:[2,5],x_2:[2,5],x_column:0,x_fit:5,x_i:5,x_n:5,xp0:5,xpn:5,xpp0:5,xppn:5,y_1:2,y_2:2,y_column:0,y_fit:5,year:[1,6]},titles:["data module","date module","geometry module","Welcome to pylib\u2019s documentation!","src","numerical package","time_of_day module"],titleterms:{content:5,data:0,date:1,document:3,fit:5,geometri:2,indic:3,integr:5,modul:[0,1,2,5,6],numer:5,ode:5,ode_model:5,packag:5,pylib:3,src:4,submodul:5,tabl:3,time_of_dai:6,welcom:3}}) \ No newline at end of file +Search.setIndex({docnames:["data","date","geometry","index","modules","numerical","time_of_day"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["data.rst","date.rst","geometry.rst","index.rst","modules.rst","numerical.rst","time_of_day.rst"],objects:{"":{data:[0,0,0,"-"],date:[1,0,0,"-"],fit:[5,0,0,"-"],geometry:[2,0,0,"-"],integration:[5,0,0,"-"],numerical:[5,0,0,"-"],ode:[5,0,0,"-"],ode_model:[5,0,0,"-"],time_of_day:[6,0,0,"-"]},"numerical.fit":{gauss:[5,1,1,""],gauss_fit:[5,1,1,""]},"numerical.integration":{trapez:[5,1,1,""]},"numerical.ode":{e1:[5,1,1,""],e2:[5,1,1,""],e4:[5,1,1,""],fpi:[5,1,1,""],i1:[5,1,1,""],newmark_newtonraphson:[5,1,1,""],newmark_newtonraphson_rdk:[5,1,1,""]},"numerical.ode_model":{disk:[5,1,1,""],disk_nm:[5,1,1,""],disk_nmmdk:[5,1,1,""]},data:{get_id:[0,1,1,""],load:[0,1,1,""],read:[0,1,1,""],store:[0,1,1,""],unique_ending:[0,1,1,""],write:[0,1,1,""]},date:{"gau\u00dfsche_osterformel":[1,1,1,""],ascension_of_jesus:[1,1,1,""],easter_friday:[1,1,1,""],easter_monday:[1,1,1,""],easter_sunday:[1,1,1,""],pentecost:[1,1,1,""]},geometry:{cubic:[2,1,1,""],cubic_deg:[2,1,1,""],line:[2,1,1,""],points:[2,1,1,""],rectangle:[2,1,1,""],rotate:[2,1,1,""],rotate_deg:[2,1,1,""],square:[2,1,1,""],translate:[2,1,1,""]},numerical:{fit:[5,0,0,"-"],integration:[5,0,0,"-"],ode:[5,0,0,"-"],ode_model:[5,0,0,"-"]},time_of_day:{days:[6,1,1,""],days_norm:[6,1,1,""],hours:[6,1,1,""],hours_norm:[6,1,1,""],in_seconds:[6,1,1,""],minutes:[6,1,1,""],minutes_norm:[6,1,1,""],seconds:[6,1,1,""],seconds_norm:[6,1,1,""],transform:[6,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"1st":5,"2nd":5,"4th":5,"9fsche_osterformel":1,"case":5,"char":0,"default":[0,5,6],"f\u00fcr":1,"float":[2,5,6],"fr\u00fchling":1,"function":5,"gau\u00dfsch":1,"gau\u00dfsche_osterformel":1,"int":[0,1,2,5],"korrekturgr\u00f6\u00df":1,"m\u00e4rz":1,"m\u00e4rzdatum":1,"new":6,"return":[0,1,2,5,6],"s\u00e4kular":1,"s\u00e4kularzahl":1,"vorw\u00e4rt":5,Das:1,The:[2,5,6],against:5,algorithmu:1,als:1,amplitud:5,analyt:5,angl:2,angle1:2,angle2:2,approx:5,approxim:5,april:1,area:5,around:2,ascens:1,ascension_of_jesu:1,ascii:0,averag:6,backward:5,base:5,becom:5,begin:5,beta:5,binari:0,bmatrix:5,bool:[0,5],calcul:[1,5,6],cauchi:5,cdot:5,center:2,choos:5,column:0,composit:5,condit:5,content:4,convert:6,counterclockwis:2,cubic:2,cubic_deg:2,dai:[1,6],data:[4,5],date:[0,2,4,5,6],datetim:1,datum:1,days_norm:6,ddot:5,definit:5,degre:2,den:1,der:1,deriv:5,des:1,describ:5,deviat:5,diamet:5,die:1,differ:5,differenti:5,disk:5,disk_nm:5,disk_nmmdk:5,displac:5,distribut:5,divid:5,dot:5,easter:1,easter_fridai:1,easter_mondai:1,easter_sundai:1,eccentr:5,edg:2,end:[0,2,5],entfernung:1,equal:5,equalii:5,equat:5,error:5,ersten:1,euler:5,everi:5,exampl:5,expect:5,explicit:5,explizit:5,f_n:5,fail:0,fals:[0,5],fassregel:5,file:0,file_nam:0,filenam:0,first:[0,5],fit:4,fix:5,float64:5,fnm:5,foral:5,forward:5,fourth:5,fpi:5,frac:[2,5],fridai:1,from:[0,5],full:[0,5],fwhm:5,gamma:5,gau:1,gauss:5,gauss_fit:5,geometri:4,get:0,get_id:0,gilt:1,given:[2,5],global:5,govern:5,gregorian:6,gregorianischen:1,half:5,has:5,height:2,hour:6,hours_norm:6,http:1,ids:0,implicit:5,in_second:6,index:[0,3],inform:[0,5],initi:5,integr:4,integrand:5,interv:5,iter:5,jahr:1,jesu:1,johann:5,kalend:1,kalendarisch:1,keim:1,kepler:5,keplersch:5,kutta:5,kwarg:2,lambda:5,ldot:5,left:5,leftrightarrow:5,length:6,leq:5,limit:5,limits_:5,limits_a:5,line:2,list:[0,5],load:0,local:5,lower:5,lvert:5,march:1,mathmat:5,mathrm:5,max_iter:5,maximum:5,mean:5,method:5,minumum:0,minut:6,minutes_norm:6,model:5,modul:[3,4],mondai:1,mondparamet:1,mondschaltung:1,ndarrai:5,necessari:5,necessarili:5,newmark:5,newmark_newtonraphson:5,newmark_newtonraphson_rdk:5,none:[0,5],normal:6,number:[2,5],numer:4,numerisch:5,numpi:5,object:[0,2],object_data:0,ode:4,ode_model:4,offset:[5,6],one:[2,5],option:2,order:5,ordinari:5,org:1,origin:2,osterentfernung:1,osterformel:1,ostergrenz:1,ostersonntag:1,other:2,packag:4,page:3,paramet:[0,1,2,5,6],pentecost:1,per:5,point1:2,point1_i:2,point1_x:2,point2:2,point2_i:2,point2_x:2,point3:2,point4:2,point:[2,5],point_i:2,point_x:2,points1_i:2,polygon:2,polygonzugverfahren:5,popt:5,posit:5,position_norm:6,print:5,problem:5,program:0,proport:5,pts:2,quad:5,quadratur:5,radian:2,rang:6,read:0,rearrang:2,rectangl:2,residuum:5,right:5,rotat:[2,5],rotate_deg:2,rule:5,rung:5,rvert:5,sampl:2,sample_point1_x:2,sample_point2_i:2,sample_point2_x:2,sample_points1_i:2,save_valu:5,sche:5,search:3,second:[5,6],seconds_norm:6,segment:5,set:5,should:2,side:5,sigma:5,simpson:5,simpsonregel:5,size:[2,5],slope:2,solut:5,solv:5,solver:5,sonnenschaltung:1,sonntag:1,sourc:[0,1,2,5,6],space:5,spacial:1,special:5,specifi:5,sqrt:5,squar:[2,5],stabl:5,standard:5,step:5,store:0,str:0,struct_tim:6,subinterv:5,submodul:4,sum:5,sundai:1,system:5,t_0:5,t_i:5,tagen:1,text:5,therefor:5,thick:5,thoma:5,ti1:5,time:[5,6],time_norm:6,time_of_dai:4,tol:5,toler:5,torqu:5,transform:6,translat:2,trapez:5,trapezium:5,trapezoid:5,trapezregel:5,tupl:[0,2,5],two:5,type:[0,1,2,5,6],uid:0,uniqu:0,unique_end:0,upper:5,used:5,using:5,usw:1,valu:[5,6],varepsilon:5,variabl:[1,5],varianc:5,vec:2,vector:2,veloc:5,verbos:[0,5],verfahren:5,vert_0:5,vert_a:5,vertic:5,vollmond:1,von:1,where:5,which:5,width:[2,5],wiki:1,wikipedia:1,write:0,x_0:5,x_1:[2,5],x_2:[2,5],x_column:0,x_fit:5,x_i:5,x_n:5,xp0:5,xpn:5,xpp0:5,xppn:5,y_1:2,y_2:2,y_column:0,y_fit:5,year:[1,6]},titles:["data module","date module","geometry module","Welcome to pylib\u2019s documentation!","src","numerical package","time_of_day module"],titleterms:{content:5,data:0,date:1,document:3,fit:5,geometri:2,indic:3,integr:5,modul:[0,1,2,5,6],numer:5,ode:5,ode_model:5,packag:5,pylib:3,src:4,submodul:5,tabl:3,time_of_dai:6,welcom:3}}) \ No newline at end of file diff --git a/docs/build/html/time_of_day.html b/docs/build/html/time_of_day.html index 12c9f53..ff1d2b7 100644 --- a/docs/build/html/time_of_day.html +++ b/docs/build/html/time_of_day.html @@ -42,7 +42,7 @@
    -days(time)[source]
    +days(time)[source]

    The days of the time (year).

    Parameters
    @@ -59,7 +59,7 @@
    -days_norm(time)[source]
    +days_norm(time)[source]

    The days normalized to 365.2425 (Gregorian, on average) days.

    Parameters
    @@ -76,7 +76,7 @@
    -hours(time)[source]
    +hours(time)[source]

    The hours of the time.

    Parameters
    @@ -93,7 +93,7 @@
    -hours_norm(time)[source]
    +hours_norm(time)[source]

    The hours normalized to 24 hours.

    Parameters
    @@ -110,7 +110,7 @@
    -in_seconds(time)[source]
    +in_seconds(time)[source]

    If time is time.struct_time convert to float seconds.

    Parameters
    @@ -127,7 +127,7 @@
    -minutes(time)[source]
    +minutes(time)[source]

    The minutes of the time.

    Parameters
    @@ -144,7 +144,7 @@
    -minutes_norm(time)[source]
    +minutes_norm(time)[source]

    The minutes normalized to 60 minutes.

    Parameters
    @@ -161,7 +161,7 @@
    -seconds(time)[source]
    +seconds(time)[source]

    The seconds of the time.

    Parameters
    @@ -178,7 +178,7 @@
    -seconds_norm(time)[source]
    +seconds_norm(time)[source]

    The seconds normalized to 60 seconds.

    Parameters
    @@ -195,7 +195,7 @@
    -transform(time_norm, length, offset=0)[source]
    +transform(time_norm, length, offset=0)[source]

    Transform normalized time value to new length.

    Parameters
    @@ -242,10 +242,10 @@