Skip to content

Commit

Permalink
Merge pull request #1136 from cta-observatory/overwrite-summary
Browse files Browse the repository at this point in the history
Add option to overwite summary file
  • Loading branch information
rlopezcoto authored Jul 9, 2023
2 parents 873d002 + 0b96500 commit 6791cbd
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 6791cbd

Please sign in to comment.