opatio.load.load module¶
- opatio.load.load.load_data_card(b: bytes) DataCard [source]¶
Load a DataCard from bytes.
- Parameters:
b (bytes) – The bytes to load into a DataCard.
- Returns:
The loaded DataCard object.
- Return type:
Examples
>>> with open("example.datacard", "rb") as f: ... data = f.read() >>> card = loadDataCard(data) >>> print(card.header)
Notes
This function parses the header and tables from the provided bytes. This is not intended to be used by the end user; rather, this is a utility function used by load_opat.
- opatio.load.load.read_opat(filename: str) OPAT [source]¶
Load an OPAT file.
- Parameters:
filename (str) – The name of the file to load.
- Returns:
The loaded OPAT object.
- Return type:
Examples
>>> opat = read_opat("example.opat") >>> print(opat.header)
Notes
This function reads the header, catalog, and data cards from the OPAT file.