diff --git a/utils/opatio/src/opatio/opat/opat.py b/utils/opatio/src/opatio/opat/opat.py index 278b62a..8e3cc83 100644 --- a/utils/opatio/src/opatio/opat/opat.py +++ b/utils/opatio/src/opatio/opat/opat.py @@ -48,18 +48,23 @@ class OPATTable: logT: Iterable[float] #< Logarithm of T values logKappa: Iterable[Iterable[float]] #< Logarithm of Kappa values -defaultHeader = Header( - magic="OPAT", - version=1, - numTables=0, - headerSize=256, - indexOffset=0, - creationDate=datetime.now().strftime("%b %d, %Y"), - sourceInfo="no source provided by user", - comment="default header", - numIndex=2, - reserved=b"\x00" * 24 -) +def make_default_header() -> Header: + """ + @brief Create a default header for an OPAT file. + @return The default header. + """ + return Header( + magic="OPAT", + version=1, + numTables=0, + headerSize=256, + indexOffset=0, + creationDate=datetime.now().strftime("%b %d, %Y"), + sourceInfo="no source provided by user", + comment="default header", + numIndex=2, + reserved=b"\x00" * 24 + ) class OpatIO: """ @@ -103,7 +108,7 @@ class OpatIO: Save the OPAT file as a binary file. """ def __init__(self): - self.header: Header = defaultHeader + self.header: Header = make_default_header() self.tables: List[Tuple[Tuple[float, float], OPATTable]] = [] @staticmethod