pwassist.io.catalog.DataFile#
- class pwassist.io.catalog.DataFile(path, frame)[source]#
Bases:
ResultsFileData file containing the number of events, efficiency, and bin edges.
Identified by ‘events’, ‘efficiency’, ‘m_low’, and ‘m_high’ columns.
- Parameters:
path (Path)
frame (DataFrame)
- frame: DataFrame#
- classmethod from_path(path)#
Create an instance of the ResultsFile from a path.
Some files (like NormIntFile) require special handling, so this method can be overridden in subclasses
Note
- This method reads the entire CSV file into memory, which may be
inefficient for large files. Use with caution.
- Return type:
Self- Parameters:
path (Path)
- classmethod identify(path)[source]#
Determine if this file is of this type. Override in subclasses.
- Return type:
bool- Parameters:
path (Path)
- classmethod matches(columns)#
Check if the required columns are present.
- Return type:
bool- Parameters:
columns (Iterable[str])
- path: Path#
- required_columns: ClassVar[frozenset[str]] = frozenset({'events', 'm_high', 'm_low'})#