Skip to content

Commit

Permalink
Merge pull request #288 from cta-observatory/webmaker
Browse files Browse the repository at this point in the history
Add no-gainsel option to sequencer_webmaker
  • Loading branch information
morcuended authored May 2, 2024
2 parents 962da4d + 79cad1e commit 5ffc014
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/osa/scripts/sequencer_webmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def html_content(body: str, date: str) -> str:
)


def get_sequencer_output(date: str, config: str, test=False) -> list:
def get_sequencer_output(date: str, config: str, test=False, no_gainsel=False) -> list:
"""Call sequencer to get table with the sequencer status report.
Parameters
Expand All @@ -82,6 +82,9 @@ def get_sequencer_output(date: str, config: str, test=False) -> list:
options.tel_id,
]

if no_gainsel:
commandargs.insert(1, "--no-gainsel")

if test:
commandargs.insert(-1, "-t")

Expand Down Expand Up @@ -144,7 +147,7 @@ def main():
sys.exit(1)

# Get the table with the sequencer status report:
lines = get_sequencer_output(date, args.config, args.test)
lines = get_sequencer_output(date, args.config, test=args.test, no_gainsel=args.no_gainsel)

# Build the html sequencer table that will be place in the body of the HTML file
matrix = lines_to_matrix(lines)
Expand Down
6 changes: 6 additions & 0 deletions src/osa/utils/cliopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ def sequencer_webmaker_argparser():
parser = ArgumentParser(
description="Script to make an xhtml from LSTOSA sequencer output", parents=[common_parser]
)
parser.add_argument(
"--no-gainsel",
action="store_true",
default=False,
help="Do not check if the gain selection finished correctly (default False)",
)
options.tel_id = "LST1"
options.prod_id = get_prod_id()

Expand Down

0 comments on commit 5ffc014

Please sign in to comment.