Skip to content

Commit

Permalink
Add filter option to band script
Browse files Browse the repository at this point in the history
  • Loading branch information
wladerer committed Feb 23, 2024
1 parent f4d598a commit abb648d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions vsh/scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def band(subparsers):
"--dpi", type=int, default=800, help="DPI of the output file"
)

subp_band.add_argument("--filter", action="store_true", help="Filter the data")


def db(subparsers):
"""Parse command line arguments"""
Expand Down
6 changes: 5 additions & 1 deletion vsh/scripts/band.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,8 @@ def filter_procar(args):
def run(args):
functions = {"plot": plot_procar, "filter": filter_procar}

functions[args.function](args)
#if filter, run filter function, else plot
if args.filter:
functions["filter"](args)
else:
functions["plot"](args)

0 comments on commit abb648d

Please sign in to comment.