Inspect Analysis Results#

general_use.ipynb demonstrates how to work with objects returned by atomscale.client.Client.get(). This guide walks through the same workflow in a linear format.

Fetch analysed items#

from atomscale.client import Client

client = Client(api_key="YOUR_API_KEY")
search_results = client.search(keywords="demo", data_type="rheed_stationary")

analysed = client.get(search_results["Data ID"].to_list())

Each item in analysed is a subclass of atomscale.results.RHEEDVideoResult or atomscale.results.RHEEDImageResult, depending on the source data.

Note

The get() call fetches metadata and analysis artefacts for each ID. For large result sets, consider batching or filtering first.

Inspect time series data#

video_item = analysed[0]
timeseries = video_item.timeseries_data
print(timeseries.columns)
print(timeseries.tail())

The timeseries frame contains specular intensity, strain metrics, cluster IDs, and other summary features for every frame in the video.

Common timeseries columns#

Column

Description

timestamp

Frame timestamp in seconds

specular_intensity

Specular spot brightness

strain

Computed strain metric

cluster_id

Pattern cluster assignment

Work with extracted frames#

snapshot = video_item.snapshot_image_data[0]
figure = snapshot.get_plot()  # Matplotlib figure
fingerprint = snapshot.pattern_graph
df = snapshot.get_pattern_dataframe()

pattern_graph exposes the detected diffraction network as a NetworkX graph, while get_pattern_dataframe() returns a tidy table describing each spot.

Tip

Use figure.savefig("snapshot.png") to export plots for reports or publications.

Download processed videos#

client.download_videos(
    data_ids=search_results["Data ID"].to_list(),
    dest_dir="processed/",
)

The files are saved as MP4 (one per data ID) and mirror what you see in the UI.

Caution

Downloaded videos can be large. Ensure you have sufficient disk space and consider filtering to only the IDs you need.

See also