Commit 3f608e71 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

flake8

parent a9c4141e
......@@ -70,9 +70,9 @@ def add_common_options(parser):
type='choice',
choices=('critical', 'error', 'warning', 'info', 'debug'),
default='info',
help ='set logger level to '
'"critical", "error", "warning", "info", or "debug". '
'Default is "%default".')
help='set logger level to '
'"critical", "error", "warning", "info", or "debug". '
'Default is "%default".')
def process_common_options(options):
......@@ -246,7 +246,8 @@ def command_scan(args):
help='show movie when showing detections')
parser.add_option(
'--show-window-traces', dest='show_window_traces', action='store_true',
'--show-window-traces', dest='show_window_traces',
action='store_true',
help='show preprocessed traces for every processing time window')
parser.add_option(
......@@ -324,7 +325,6 @@ def command_snuffle(args):
lassie.snuffle(config)
if __name__ == '__main__':
usage_sub = 'fomosto %s [options]'
......
......@@ -236,8 +236,6 @@ def scan(
idetection = 0
station_weights = {}
tmin = override_tmin or config.tmin or p.tmin + tpad
tmax = override_tmax or config.tmax or p.tmax - tpad
......@@ -399,7 +397,6 @@ def scan(
deltat=deltat_cf,
ydata=frame_maxs)
tr_stackmax.meta = {'tabu': True}
trs_debug.append(tr_stackmax)
......@@ -472,7 +469,8 @@ def scan(
grid, receivers, frames, tmin_frames,
deltat_cf, imax, iframe, fsmooth_min, xpeak, ypeak,
zpeak,
tr_stackmax, tpeaks, apeaks, config.detector_threshold,
tr_stackmax, tpeaks, apeaks,
config.detector_threshold,
wmin, wmax,
pdata, trs, fmin, fmax, idetection,
grid_station_shift_max=shift_max,
......
......@@ -107,8 +107,8 @@ def bounding_box(lat, lon, north, east, depth, scale=1.0):
def bounding_box_square(lat, lon, north, east, depth, scale=1.0):
lat, lon, (north_min, north_max), (east_min, east_max), (depth_min, depth_max) = \
bounding_box(lat, lon, north, east, depth)
lat, lon, (north_min, north_max), (east_min, east_max), \
(depth_min, depth_max) = bounding_box(lat, lon, north, east, depth)
dnorth = north_max - north_min
mnorth = 0.5 * (north_min + north_max)
......
......@@ -199,8 +199,8 @@ def geometrical_normalization(grid, receivers):
nexpect = math.pi * ((dist + delta_ring)**2 - dist**2) /\
delta_grid**2
#nexpect = math.pi * ((dist + delta_ring)**3 - dist**3) /\
# delta_grid**3
# nexpect = math.pi * ((dist + delta_ring)**3 - dist**3) /\
# delta_grid**3
norm_map[indices] += indices.size / nexpect
......
......@@ -210,7 +210,7 @@ class OnsetIFC(IFC):
def get_fsmooth(self):
if self.fsmooth is None and self.fsmooth_factor is None:
raise comming.LassieError('must use fsmooth or fsmooth_factor')
raise common.LassieError('must use fsmooth or fsmooth_factor')
if self.fsmooth is not None:
return self.fsmooth
......@@ -219,7 +219,8 @@ class OnsetIFC(IFC):
def get_fnormalize(self):
if self.fnormalize is None and self.fnormalize_factor is None:
raise common.LassieError('must use fnormalize or fnormalize_factor')
raise common.LassieError(
'must use fnormalize or fnormalize_factor')
if self.fnormalize is not None:
return self.fnormalize
......
......@@ -15,7 +15,8 @@ def detections_to_event_markers(fn_detections):
with open(fn_detections, 'r') as f:
for line in f.readlines():
data = line.split()
i, t_d, t_t, apeak, latpeak, lonpeak, xpeak, ypeak, zpeak = data
i, t_d, t_t, apeak, latpeak, lonpeak, xpeak, ypeak, zpeak = \
data
lat, lon = orthodrome.ne_to_latlon(
float(latpeak), float(lonpeak), float(xpeak), float(ypeak))
t = util.str_to_time("%s %s" % (t_d, t_t))
......@@ -131,9 +132,12 @@ class LassieSnuffling(Snuffling):
self.add_trace(ltrace)
for t, a in zip(tpeaks, apeaks):
if tr_i:
lat, lon, xpeak, ypeak, zpeak = self.grid.index_to_location(
tr_i(t)[1])
lat, lon = orthodrome.ne_to_latlon(lat, lon, xpeak, ypeak)
lat, lon, xpeak, ypeak, zpeak = \
self.grid.index_to_location(tr_i(t)[1])
lat, lon = orthodrome.ne_to_latlon(
lat, lon, xpeak, ypeak)
e = model.Event(
time=t, name="%s-%s" % (i_detection, a), lat=lat,
lon=lon, depth=zpeak)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment