[reformat] corrected formatting after merge

This commit is contained in:
Sebastian Wehling-Benatelli 2016-05-25 14:22:08 +02:00
parent f8db6b1d9f
commit e46e8cb71b

View File

@ -9,13 +9,15 @@ import re
import subprocess import subprocess
from obspy.core import UTCDateTime from obspy.core import UTCDateTime
def _pickle_method(m): def _pickle_method(m):
if m.im_self is None: if m.im_self is None:
return getattr, (m.im_class, m.im_func.func_name) return getattr, (m.im_class, m.im_func.func_name)
else: else:
return getattr, (m.im_self, m.im_func.func_name) return getattr, (m.im_self, m.im_func.func_name)
def worker(func, input, cores = 'max', async = False):
def worker(func, input, cores='max', async=False):
return result return result
import multiprocessing import multiprocessing
@ -28,6 +30,8 @@ def worker(func, input, cores = 'max', async = False):
else: else:
result = pool.map(func, input) result = pool.map(func, input)
pool.close() pool.close()
def demeanTrace(trace, window): def demeanTrace(trace, window):
""" """
returns the DATA where each trace is demean by the average value within returns the DATA where each trace is demean by the average value within
@ -249,6 +253,7 @@ def runProgram(cmd, parameter=None):
output = subprocess.check_output('{} | tee /dev/stderr'.format(cmd), output = subprocess.check_output('{} | tee /dev/stderr'.format(cmd),
shell=True) shell=True)
if __name__ == "__main__": if __name__ == "__main__":
import doctest import doctest