Skip to content

Commit

Permalink
Added human-readable final inventory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Medlin authored and Cloud User committed Feb 8, 2019
1 parent baee19a commit 49eb47e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions seismic/inventory/engd2stxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,11 @@ def writeFinalInventory(df, fname):
"""
df.to_csv(fname + ".csv", index=False)
df.to_hdf(fname + ".h5", mode='w', key='inventory')
# Human readable, fixed width column format.
with pd.option_context("display.max_rows", None, "display.max_columns", None, "display.width", 1000):
inv_str = str(df)
with open(fname + ".txt", "w") as f:
f.write(inv_str)


def exportNetworkPlots(df, plot_folder):
Expand Down

0 comments on commit 49eb47e

Please sign in to comment.