Commit 86cc563e authored by Daniel Estrada Acevedo's avatar Daniel Estrada Acevedo
Browse files

Fix coding style

parent a42fe2bd
Pipeline #4001091 passed with stages
in 2 minutes and 26 seconds
......@@ -122,9 +122,13 @@ def filter_broken_channels(input_df, output_dir):
"""
discard_list = []
for (fed, slot, oh, vfat, channel), df in input_df.groupby(["fed", "slot", "oh", "vfat", "channel"]):
for (fed, slot, oh, vfat, channel), df in input_df.groupby(
["fed", "slot", "oh", "vfat", "channel"]
):
if ((df["hits"] == 0) & (~df["notReadout"])).all():
discard_list.append({"fed": fed, "slot": slot, "oh": oh, "vfat": vfat, "channel": channel})
discard_list.append(
{"fed": fed, "slot": slot, "oh": oh, "vfat": vfat, "channel": channel}
)
discard_df = pd.DataFrame.from_records(discard_list).astype(int, errors="ignore")
# saving in a file the broken channels
......@@ -162,10 +166,14 @@ def filter_not_functional_channels(input_df, output_dir):
if (condition == True).all():
continue
# not cosider channels labeled as nonReadout or broken
discard_list.append(df.loc[(~condition) & (~df["notReadout"]) & (~df["broken"]),
["fed", "slot", "oh", "vfat", "channel"]])
discard_list.append(
df.loc[
(~condition) & (~df["notReadout"]) & (~df["broken"]),
["fed", "slot", "oh", "vfat", "channel"],
]
)
discard_df = pd.concat(discard_list, ignore_index=False).sort_index().drop_duplicates()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment