Skip to content

Commit

Permalink
getting rid of print() statements
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed May 26, 2023
1 parent c3224fe commit f9489e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions msnoise/plots/dvv.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@


def main(mov_stack=None, dttname="M", components='ZZ', filterid=1,
pairs=[], showALL=False, show=False, outfile=None):
pairs=[], showALL=False, show=False, outfile=None, loglevel="INFO"):
logger = get_logger('msnoise.cc_dvv_plot_dvv', loglevel,
with_pid=True)
db = connect()
params = get_params(db)
start, end, datelist = build_movstack_datelist(db)
Expand Down Expand Up @@ -54,8 +56,8 @@ def main(mov_stack=None, dttname="M", components='ZZ', filterid=1,
for comps in components:
try:
dvv = xr_get_dvv(comps, filterid, mov_stack)
except:
traceback.print_exc()
except FileNotFoundError as fullpath:
logger.error("FILE DOES NOT EXIST: %s, skipping" % fullpath)
continue
for _ in ["mean", "50%", "trimmed_mean", "weighted_mean"]:
plt.plot(dvv.index, dvv.loc[:, ("m", _)] * -100, label="%s: %s" % (comps,_ ))
Expand Down

0 comments on commit f9489e1

Please sign in to comment.