pwassist.io.catalog.RandomizedFile#

class pwassist.io.catalog.RandomizedFile(path, frame)[source]#

Bases: ResultsFile

Fits from randomized starting values, used to explore the likelihood landscape.

Identified by ‘likelihood’, ‘eMatrixStatus’ and ‘intensity’ columns, similar to FitFile, but also checks that the ‘random’ is contained somewhere in the file path.

Todo

  • Ideally would prefer to identify by content alone, as in other ResultsFile

types, but currently no unique content-based identifier exists that distinguishes it from a BootstrapFile or FitFile.

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({'eMatrixStatus', 'file', 'intensity', 'likelihood'})#