Skip to content

Commit

Permalink
Fix PZ if damping constant is zero (#24)
Browse files Browse the repository at this point in the history
For some stations (e.g. DONET1 stations), the damping constant is always
zero, leading to real=0.
  • Loading branch information
seisman authored Dec 6, 2019
1 parent 78311a6 commit 7685526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HinetPy/win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _get_channels(ctable):
lsb_value=float(items[12]))
channels.append(channel)
except ValueError as e:
logger.warning("Error in parsing channel information for %s.%s (%s). Skipped.",
logger.warning("Error in parsing channel information for %s.%s (%s). Skipped.",
items[3], items[4], items[0])
logger.warning("Original error message: %s", e)
return channels
Expand Down Expand Up @@ -417,7 +417,7 @@ def _write_pz(pzfile, real, imaginary, constant):

def _extract_sacpz(channel, suffix='SAC_PZ', outdir='.', keep_sensitivity=False):
real, imaginary, constant = _channel2pz(channel, keep_sensitivity=keep_sensitivity)
if not real: # something wrong with channel information, skipped
if real == None or imaginary == None or constant == None: # something wrong with channel information, skipped
return None

pzfile = "{}.{}".format(channel.name, channel.component)
Expand Down

0 comments on commit 7685526

Please sign in to comment.