Skip to content

Commit

Permalink
Merge branch 'master' of github.com:AI4EPS/QuakeFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuwq0 committed Jan 2, 2024
2 parents c8e0734 + 36df55d commit 86f92b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datasets/NCEDC/download_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ def process(year):
for phase_file in sorted(glob(f"{catalog_path}/{year}/*.phase.Z"))[::-1]:
phase_filename = phase_file.split("/")[-1]

if not os.path.exists(f"{result_path}/catalog_raw/{phase_filename[:-2]}"):
shutil.copy(phase_file, f"{result_path}/catalog_raw/{phase_filename}")
os.system(f"uncompress {result_path}/catalog_raw/{phase_filename}")
# if not os.path.exists(f"{result_path}/catalog_raw/{phase_filename[:-2]}"):
shutil.copy(phase_file, f"{result_path}/catalog_raw/{phase_filename}")
os.system(f"uncompress -f {result_path}/catalog_raw/{phase_filename}")

with open(f"{result_path}/catalog_raw/{phase_filename[:-2]}") as f:
lines = f.readlines()
Expand Down

0 comments on commit 86f92b1

Please sign in to comment.