pyprobe.analysis.utils module#
Module for utilities for analysis classes.
- assemble_array(input_data, name)#
Assemble an array from a list of results.
- Parameters:
input_data (List[Result]) – A list of results.
name (str) – The name of the variable.
- Returns:
The assembled array.
- Return type:
NDArray
- pydantic model AnalysisValidator(*, input_data, required_columns)#
Bases:
BaseModel
A base class for analysis classes.
- Validators:
validate_required_columns
»all fields
- Parameters:
- Return type:
None
- field input_data: RawData | Procedure | Experiment | Cycle | Step | Result [Required]#
The input data to an analysis class.
- Validated by:
- field required_columns: List[str] [Required]#
The columns required to conduct the analysis.
- Validated by:
- validator validate_required_columns » all fields#
Check if the required columns are present in the input_data.
- Returns:
The validated instance.
- Return type:
- Raises:
ValueError – If any of the required columns are missing.
- property variables: Tuple[ndarray[Any, dtype[float64]], ...]#
Return the required columns in the input data as NDArrays.
- Returns:
The required columns as NDArrays.
- Return type:
Tuple[NDArray[np.float64], …]