Skip to content

Commit

Permalink
add option to overwite summary file
Browse files Browse the repository at this point in the history
  • Loading branch information
morcuended committed Jul 7, 2023
1 parent 873d002 commit 0b96500
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lstchain/scripts/lstchain_create_run_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
default="/fefs/aswg/data/real/monitoring/RunSummary",
)

parser.add_argument(
"--overwrite",
action="store_true",
help="Overwrite existing Run Summary file",
default=False,
)

dtypes = {
"ucts_timestamp": np.int64,
"run_start": np.int64,
Expand Down Expand Up @@ -306,7 +313,10 @@ def main():
run_summary.add_column(n_subruns, name="n_subruns", index=1)
run_summary.add_column(run_types, name="run_type", index=2)
run_summary.write(
args.output_dir / f"RunSummary_{args.date}.ecsv", format="ascii.ecsv", delimiter=",",
args.output_dir / f"RunSummary_{args.date}.ecsv",
format="ascii.ecsv",
delimiter=",",
overwrite=args.overwrite,
)


Expand Down

0 comments on commit 0b96500

Please sign in to comment.