atomscale.similarity.provider#
Classes
|
- class atomscale.similarity.provider.SimilarityTrajectoryProvider[source]
Bases:
TimeseriesProvider[SimilarityTrajectoryResult]- fetch_raw(client: BaseClient, data_id: str, **kwargs: Any) Any[source]
Fetch similarity trajectory data from the API.
- Parameters:
client (
BaseClient) – The API client.data_id (
str) – The source ID for the similarity query.**kwargs (
Any) – Must include ‘workflow’ (required). Optional parameters: window_span, reference_ids, softmax_mode, reference_n_values.
- Return type:
Any- Returns:
Raw API response payload.
- Raises:
KeyError – If ‘workflow’ is not provided in kwargs.
- to_dataframe(raw: Any) DataFrame[source]
Convert raw payload to a tidy DataFrame with domain-specific renames/index.
- Parameters:
raw (
Any)- Return type:
DataFrame
- build_result(client: BaseClient, data_id: str, data_type: str, ts_df: DataFrame, *, workflow: str = '', window_span: float = 0.0, source_data_ids: Sequence[UUID | str] | None = None) SimilarityTrajectoryResult[source]
Build time series result object
- Parameters:
client (
BaseClient)data_id (
str)data_type (
str)ts_df (
DataFrame)workflow (
str)window_span (
float)source_data_ids (
Sequence[UUID|str] |None)
- Return type:
SimilarityTrajectoryResult