Skip to content
Snippets Groups Projects
Commit 0319a5a4 authored by Luke Grazette's avatar Luke Grazette
Browse files

fix typo + Clarity renaming of variables

parent 69249b6e
No related branches found
No related tags found
1 merge request!330[RTADPA BW Tests] Introducing an Hlt1-bandwidth test via Moore_in_Allen
......@@ -172,13 +172,13 @@ if __name__ == "__main__":
args = parser.parse_args()
fname_helper = FileNameHelper(args.process)
stream_configs, all_lines = {
stream_configs, main_stream_config = {
"hlt1": (["streamless"], "streamless"),
"hlt2": (["production", "wg"], "production"),
"spruce": (["wg"], "wg")
}[args.process]
rates_all_lines(all_lines, fname_helper)
rates_all_lines(main_stream_config, fname_helper)
for stream_config in stream_configs:
make_rate_table_row_per_stream(stream_config, fname_helper)
make_rate_table_row_per_line(stream_config, fname_helper)
......@@ -508,11 +508,13 @@ if __name__ == '__main__':
[info for info in rate_bw_info_by_line.values() if info.rate == 0])
n_high_rate = len(
[info for info in rate_bw_info_by_line.values() if info.rate > tol])
stream = {
main_stream_config = {
"hlt1": "streamless",
"hlt2": "production",
"spruce": "wg"
}[args.process]
prod_df = pd.read_csv(
fname_helper.final_rate_table_all_streams_path(stream, ext="csv"))
tot_rate = sum(prod_df['Rate (kHz)'])
......@@ -528,37 +530,30 @@ if __name__ == '__main__':
other_line_table = make_other_line_table(other_line_list)
plots_per_wg = make_plots_per_wg_list(wg_list)
with open(
fname_helper.final_rate_table_all_streams_path(main_stream_config),
"r") as rate_html:
table_main_stream_rates = rate_html.read()
if args.process == 'hlt2':
with open(
fname_helper.final_rate_table_all_streams_path("production"),
"r") as rate_html:
table_5stream_rates = rate_html.read()
template = HLT2_REPORT_TEMPLATE.render(
BASE_PATH=fname_helper.base_html_path(args.building_locally),
stream_config_json_prod=fname_helper.stream_config_json_path(
"production", full_path=False),
stream_config_json_wg=fname_helper.stream_config_json_path(
"wg", full_path=False),
table_5stream_rates=table_5stream_rates)
table_5stream_rates=table_main_stream_rates)
elif args.process == 'spruce':
with open(fname_helper.final_rate_table_all_streams_path("wg"),
"r") as rate_html:
table_wgstream_rates = rate_html.read()
template = SPRUCE_REPORT_TEMPLATE.render(
BASE_PATH=fname_helper.base_html_path(args.building_locally),
stream_config_json_wg=fname_helper.stream_config_json_path(
"wg", full_path=False),
table_wgstream_rates=table_wgstream_rates)
table_wgstream_rates=table_main_stream_rates)
elif args.process == 'hlt1':
with open(
fname_helper.final_rate_table_all_streams_path("streamless"),
"r") as rate_html:
table_streamless_rates = rate_html.read()
template = HLT1_REPORT_TEMPLATE.render(
BASE_PATH=fname_helper.base_html_path(args.building_locally),
stream_config_json_wg=fname_helper.stream_config_json_path(
"streamless", full_path=False),
table_streamless_rates=table_streamless_rates)
table_streamless_rates=table_main_stream_rates)
with open(fname_helper.html_page_outputs_path("index.html"),
"w") as html_file:
......
......@@ -139,7 +139,7 @@ if __name__ == '__main__':
parser.add_argument(
'--digi',
action='store_true',
help="Specifics input files as digi instead of mdf as the default")
help="Specifies input files as digi instead of mdf as the default")
parser.add_argument(
'--cache-dirs',
default=None,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment