[modification] added missing docstring content

This commit is contained in:
Sebastian Wehling-Benatelli 2016-08-10 16:30:28 +02:00
parent 94782f6758
commit a6ce93cd9f

View File

@ -18,7 +18,6 @@ def _pickle_method(m):
return getattr, (m.im_self, m.im_func.func_name) return getattr, (m.im_self, m.im_func.func_name)
def fit_curve(x, y): def fit_curve(x, y):
return splev, splrep(x, y) return splev, splrep(x, y)
def getindexbounds(f, eta): def getindexbounds(f, eta):
@ -180,18 +179,18 @@ def getHash(time):
def getLogin(): def getLogin():
''' '''
returns the actual user's login id
:return: :return: User ID
''' '''
return pwd.getpwuid(os.getuid())[0] return pwd.getpwuid(os.getuid())[0]
def getOwner(fn): def getOwner(fn):
''' '''
takes filename and returns the User ID of the owner of the file
:param fn: :param fn: filename
:type fn: :type fn: str
:return: :return: User ID
''' '''
return pwd.getpwuid(os.stat(fn).st_uid).pw_name return pwd.getpwuid(os.stat(fn).st_uid).pw_name
@ -200,12 +199,11 @@ def getPatternLine(fn, pattern):
""" """
Takes a file name and a pattern string to search for in the file and Takes a file name and a pattern string to search for in the file and
returns the first line which contains the pattern string otherwise None. returns the first line which contains the pattern string otherwise None.
:param fn: filename :param fn: filename
:type fn: str :type fn: str
:param pattern: pattern string to search for :param pattern: pattern string to search for
:type pattern: str :type pattern: str
:return: the complete line containing pattern or None :return: the complete line containing the pattern string or None
>>> getPatternLine('utils.py', 'python') >>> getPatternLine('utils.py', 'python')
'#!/usr/bin/env python\\n' '#!/usr/bin/env python\\n'
@ -223,8 +221,8 @@ def getPatternLine(fn, pattern):
def isSorted(iterable): def isSorted(iterable):
''' '''
takes a python variable and returns True if the iterable is sorted and False otherwise
:param iterable: :param iterable: a python variable
:type iterable: :type iterable:
:return: :return:
''' '''
@ -233,12 +231,12 @@ def isSorted(iterable):
def prepTimeAxis(stime, trace): def prepTimeAxis(stime, trace):
''' '''
takes a starttime 'stime' and a trace object 'trace' and return a vector containing as much time stamps as data values in the trace object are available
:param stime: :param stime:
:type stime: :type stime:
:param trace: :param trace:
:type trace: :type trace:
:return: :return: time axis
''' '''
nsamp = trace.stats.npts nsamp = trace.stats.npts
srate = trace.stats.sampling_rate srate = trace.stats.sampling_rate
@ -294,7 +292,6 @@ def runProgram(cmd, parameter=None):
""" """
run an external program specified by cmd with parameters input returning the run an external program specified by cmd with parameters input returning the
stdout output stdout output
:param cmd: name of the command to run :param cmd: name of the command to run
:type cmd: str :type cmd: str
:param parameter: filename of parameter file or parameter string :param parameter: filename of parameter file or parameter string