Skip to content

Commit

Permalink
#21 Add docstring for QCDict
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Nov 29, 2024
1 parent f2ac760 commit 884346b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pcpostprocess/hergQC.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@


class QCDict:
"""
Stores the results from QC checks.
Each entry is a label -> [(bool, value),...] mapping.
The bool in each tuple indicates whether the QC passed,
and the value is the result that was checked (e.g. the SNR value).
The list can contain multiple tuples if the QC checks multiple values, as
QC1 does, or if the checks are run multiple times e.g. once per sweep.
"""

labels = [
"qc1.rseal",
Expand All @@ -31,7 +40,9 @@ class QCDict:
]

def __init__(self):
self._dict = OrderedDict([(label, [(False, None)]) for label in QCDict.labels])
self._dict = OrderedDict(
[(label, [(False, None)]) for label in QCDict.labels]
)

def __str__(self):
return self._dict.__str__()
Expand Down

0 comments on commit 884346b

Please sign in to comment.