Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Fix file parsing in __plot_spatial
Browse files Browse the repository at this point in the history
  • Loading branch information
qitianshi committed Jan 10, 2022
1 parent 9df6ac8 commit 5fa957b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions analysis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,11 @@ def __plot_spatial():

plot_files = []
if QUANTITIES is None:
plot_files = [f for f in os.listdir(anl.paths.spatial.root(DATE)) if f.endswith("json")]
plot_files = [f for f in os.listdir(anl.paths.spatial.root(DATE))
if not f.endswith("json")]
else:
plot_files = [f for f in os.listdir(anl.paths.spatial.root(DATE)) if f in QUANTITIES]
plot_files = [f for f in os.listdir(anl.paths.spatial.root(DATE))
if not f.endswith("json") and f.strip(".tsv") in QUANTITIES]

# Checks if plot_files is empty.
if not plot_files:
Expand Down

0 comments on commit 5fa957b

Please sign in to comment.