analysis

analysis (qurry.qurrium.analysis)

analysis

Analysis Instance (qurry.qurrium.analysis)

class qurry.qurrium.analysis.analysis.AnalysisPrototype(*, serial: int, log: dict[str, Any] | None = None, datatime: str | None = None, **other_kwargs)[source]

The instance for the analysis of :cls:`QurryExperiment`.

content: _RC

The content of the analysis.

property content_instance: Type[_RC]

The content instance of the analysis.

abstract classmethod content_type() Type[_RC][source]

The content type of the analysis.

datetime: str

Written time of analysis.

classmethod deprecated_fields_converts(main: dict[str, Any], side: dict[str, Any]) tuple[dict[str, Any], dict[str, Any]][source]

Convert deprecated fields to new fields.

This method should be implemented in the subclass if there are deprecated fields that need to be converted.

Parameters:
  • main (dict[str, Any]) – The main product dict.

  • side (dict[str, Any]) – The side product dict.

Returns:

The converted main and side product dicts.

Return type:

tuple[dict[str, Any], dict[str, Any]]

export(jsonable: bool = False) tuple[dict[str, Any], dict[str, Any]][source]

Export the analysis as main and side product dict.

Parameters:

jsonable (bool, optional) – If True, export as jsonable dict. Defaults to True. If False, export as normal dict.

Returns:

main and side product dict.

Return type:

tuple[dict[str, Any], dict[str, Any]]

input: _RI

The input of the analysis.

property input_instance: Type[_RI]

The input instance of the analysis.

abstract classmethod input_type() Type[_RI][source]

The input type of the analysis.

classmethod load(main: dict[str, Any], side: dict[str, Any])[source]

Read the analysis from main and side product dict.

Parameters:
  • main (dict[str, Any]) – The main product dict.

  • side (dict[str, Any]) – The side product dict.

Returns:

The analysis instance.

Return type:

AnalysisPrototype

log: dict[str, Any]

Other info will be recorded.

classmethod read(file_index: dict[str, str], save_location: Path)[source]

Read the analysis from file index.

Parameters:
  • file_index (dict[str, str]) – The file index.

  • save_location (Path) – The save location.

Returns:

The analysis instances in dictionary.

Return type:

dict[str, AnalysisPrototype]

serial: int

Serial Number of analysis.

abstract property side_product_fields: Iterable[str]

The fields that will be stored as side product.

statesheet(hoshi: bool = False) Hoshi[source]

Generate the state sheet of the analysis.

Parameters:

hoshi (bool, optional) – If True, show Hoshi name in statesheet. Defaults to False.

Returns:

The state sheet of the analysis.

Return type:

Hoshi