> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atomscale.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Inspect Results

> Work with analysis outputs, time series data, and extracted frames

Use `client.get()` to fetch analysis results for items in the catalogue. The method returns result objects with time series data, extracted frames, pattern graphs, and more.

## Fetch analysed items

```python theme={null}
from atomscale import Client

client = Client(api_key="YOUR_API_KEY")

# Search for completed analyses
search_results = client.search(keywords="demo", data_type="rheed_stationary")

# Get analysis results
analysed = client.get(search_results["Data ID"].to_list())
```

Each item in `analysed` is a result object depending on the source data type: `RHEEDVideoResult`, `RHEEDImageResult`, `XPSResult`, `PhotoluminescenceResult`, `RamanResult`, `MetrologyResult`, or `OpticalResult`.

## Inspect time series data

For video results, access the `timeseries_data` attribute to get a DataFrame with per-frame metrics:

```python theme={null}
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.

## Work with extracted frames

Video results include snapshot images at key moments:

```python theme={null}
snapshot = video_item.snapshot_image_data[0]

# Get a matplotlib figure
figure = snapshot.get_plot()

# Access the detected diffraction pattern as a NetworkX graph
fingerprint = snapshot.pattern_graph

# Get a tidy table describing each spot
df = snapshot.get_pattern_dataframe()
```

The `pattern_graph` exposes the detected diffraction network, while `get_pattern_dataframe()` returns positions, intensities, and labels for each spot.

## Inspect spectroscopy results

For XPS, photoluminescence, and Raman results, access the spectral data and generate plots:

```python theme={null}
# XPS
xps_result = analysed[0]
print(xps_result.predicted_composition)   # dict of element → fraction
print(xps_result.detected_peaks)
figure = xps_result.get_plot()

# Photoluminescence
pl_result = analysed[0]
print(pl_result.energies)
print(pl_result.intensities)
figure = pl_result.get_plot()

# Raman
raman_result = analysed[0]
print(raman_result.raman_shift)
print(raman_result.intensities)
figure = raman_result.get_plot()
```

## Inspect metrology and optical results

Metrology and optical results provide timeseries data from instrument sensors and optical imaging:

```python theme={null}
# Metrology (pyrometer, pressure, etc.)
metrology_result = analysed[0]
print(metrology_result.timeseries_data.columns)
print(metrology_result.timeseries_data.tail())

# Optical imaging
optical_result = analysed[0]
print(optical_result.timeseries_data.columns)  # Edge Perimeter, Circularity, etc.

# Access optical snapshots
if optical_result.snapshot_image_data:
    snapshot = optical_result.snapshot_image_data[0]
    snapshot.processed_image.show()  # PIL Image
```

## Download processed videos

Save annotated MP4 videos to disk:

```python theme={null}
client.download_videos(
    data_ids=search_results["Data ID"].to_list(),
    dest_dir="processed/",
)
```

The files mirror what you see in the web UI.

## Download raw files

To download the original uploaded file instead of processed output:

```python theme={null}
client.download_videos(
    data_ids=search_results["Data ID"].to_list(),
    dest_dir="raw/",
    data_type="raw",
)
```

## Next steps

<CardGroup cols={2}>
  <Card title="Stream RHEED" icon="video" href="/sdk/stream-rheed">
    Push frames from your instrument in real time.
  </Card>

  <Card title="Poll Time Series" icon="clock" href="/sdk/poll-timeseries">
    Monitor streaming analysis updates.
  </Card>
</CardGroup>
