Skip to content

Commit

Permalink
Merge pull request #154 from cta-observatory/fix-make_progress_bar_op…
Browse files Browse the repository at this point in the history
…tional

Make progress bar optional and add it also to DL2 script
  • Loading branch information
HealthyPear authored Jul 20, 2021
2 parents 2fe78fc + de588cc commit 52faa69
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion protopipe/scripts/data_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def main():
parser.add_argument(
"--debug", action="store_true", help="Print debugging information",
)

parser.add_argument(
"--show_progress_bar",
action="store_true",
help="Show information about execution progress",
)

parser.add_argument(
"--save_images", action="store_true", help="Save also all images",
Expand Down Expand Up @@ -269,7 +275,8 @@ def main():
debug=args.debug),
desc=source.__class__.__name__,
total=source.max_events,
unit="event"
unit="event",
disable= not args.show_progress_bar
):

if good_event:
Expand Down
9 changes: 8 additions & 1 deletion protopipe/scripts/write_dl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def main():
parser.add_argument(
"--debug", action="store_true", help="Print debugging information",
)

parser.add_argument(
"--show_progress_bar",
action="store_true",
help="Show information about execution progress",
)

parser.add_argument("--regressor_dir", default="./", help="regressors directory")
parser.add_argument("--classifier_dir", default="./", help="regressors directory")
Expand Down Expand Up @@ -314,7 +320,8 @@ class RecoEvent(tb.IsDescription):
debug=args.debug),
desc=source.__class__.__name__,
total=source.max_events,
unit="event"
unit="event",
disable= not args.show_progress_bar
):

# True direction
Expand Down

0 comments on commit 52faa69

Please sign in to comment.