[revision] cleaned up unclean code: tabs -> spaces

This commit is contained in:
2021-03-30 16:39:44 +02:00
parent f11ffc67ff
commit 07e7ef3efa
4 changed files with 19 additions and 19 deletions

View File

@@ -221,15 +221,15 @@ class LocalMagnitude(Magnitude):
power = [np.power(tr.data, 2) for tr in st if tr.stats.channel[-1] not
in 'Z3']
# checking horizontal count and calculating power_sum accordingly
if len(power) == 1:
print ('WARNING: Only one horizontal found for station {0}.'.format(st[0].stats.station))
power_sum = power[0]
elif len(power) == 2:
power_sum = power[0] + power[1]
else:
raise ValueError('Wood-Anderson aomplitude defintion only valid for'
' up to two horizontals: {0} given'.format(len(power)))
# checking horizontal count and calculating power_sum accordingly
if len(power) == 1:
print ('WARNING: Only one horizontal found for station {0}.'.format(st[0].stats.station))
power_sum = power[0]
elif len(power) == 2:
power_sum = power[0] + power[1]
else:
raise ValueError('Wood-Anderson aomplitude defintion only valid for'
' up to two horizontals: {0} given'.format(len(power)))
sqH = np.sqrt(power_sum)