Client class is your entry point to the Atomscale API. It provides methods for searching the catalogue, fetching analysis results, uploading files, and downloading processed videos.
Constructor
API key for authentication. If not provided, reads from the
AS_API_KEY environment variable.Root API endpoint. Can be overridden with the
AS_API_ENDPOINT environment variable.Whether to suppress progress bars. Set to
True for non-interactive environments like CI
pipelines.search()
Search and filter items in the data catalogue.Parameters
Keyword or list of keywords to search all catalogue fields. Applied after other explicit filters.
Whether to include catalogue entries from other users in your organization.
Filter to specific data IDs.
Filter by physical sample IDs.
Filter by project IDs.
Filter by data type.
| Value | Description |
|---|---|
rheed_image | Single RHEED image |
rheed_stationary | Stationary RHEED video |
rheed_rotating | Rotating RHEED video |
xps | XPS spectrum |
photoluminescence | Photoluminescence spectrum |
pl | Alias for photoluminescence |
raman | Raman spectrum |
all | All types |
Filter by pipeline status.
| Value | Description |
|---|---|
success | Analysis completed |
pending | Queued for processing |
running | Currently processing |
error | Analysis failed |
stream_active | Streaming in progress |
stream_interrupted | Stream was interrupted |
stream_finalizing | Stream finishing |
stream_error | Streaming failed |
all | All statuses |
Filter by growth length in seconds. Tuple of
(min, max) with None for open bounds.Filter by upload timestamp. Tuple of
(min, max) with None for open bounds.Filter by last accessed timestamp. Tuple of
(min, max) with None for open bounds.Returns
DataFrame with columns:
| Column | Description |
|---|---|
Data ID | Unique identifier |
Upload Datetime | When the file was uploaded |
Last Accessed Datetime | Last access time |
Type | Data type (rheed_image, rheed_stationary, etc.) |
File Name | Original filename |
Status | Pipeline status |
File Type | File extension/format |
Instrument Source | Source instrument |
Sample Name | Associated sample name |
Growth Length | Duration in seconds (for videos) |
Physical Sample ID | Linked physical sample |
Physical Sample Name | Physical sample name |
Sample Notes | Associated notes |
Owner | Uploader’s name |
Workspaces | Associated workspaces |
Example
get()
Fetch analysis results for one or more data IDs.Parameters
Data ID or list of data IDs from the catalogue.
Returns
results
list[RHEEDVideoResult | RHEEDImageResult | XPSResult | PhotoluminescenceResult | RamanResult | MetrologyResult | OpticalResult | UnknownResult]
List of result objects. The type depends on the source data:RHEEDVideoResult (for rheed_stationary, rheed_rotating):
timeseries_data- DataFrame with per-frame metricssnapshot_image_data- List of extracted frame snapshots
processed_image- Processed image as a PIL Imagemask- Binary segmentation mask (numpy array)pattern_graph- NetworkX graph of the diffraction patternget_pattern_dataframe()- Tidy table of spot positionsget_plot()- Matplotlib figure (params:show_mask,show_spot_nodes,symmetrize,alpha)
binding_energies- Array of binding energy valuesintensities- Array of intensity valuespredicted_composition- Dict mapping element symbols to fractional compositiondetected_peaks- Detected peak positionsget_plot()- Matplotlib figure
energies- Energy axis valuesintensities- Intensity valuesdetected_peaks- Peak labels and positionsget_plot()- Matplotlib figure
raman_shift- Raman shift axis valuesintensities- Intensity valuesdetected_peaks- Peak labels and positionsget_plot()- Matplotlib figure
timeseries_data- DataFrame with instrument readings (pyrometer, pressure, etc.)
timeseries_data- DataFrame with per-frame metrics (edge perimeter, circularity, etc.)snapshot_image_data- List of extracted frame snapshots
data_type- Type stringcatalogue_entry- Raw catalogue metadata
Example
upload()
Upload files for analysis.Parameters
List of file paths (strings) or open file handles (BinaryIO objects).
Returns
None. Files are uploaded and queued for analysis. Check the web UI or usesearch() to monitor progress.
Example
download_videos()
Download processed or raw videos to disk.Parameters
One or more data IDs from the catalogue.
Directory to write files to. Defaults to current working directory.
Whether to download
raw or processed data.Returns
None. Files are saved to the destination directory.Example
list_physical_samples()
List all physical samples accessible to your account.Returns
DataFrame of physical sample records with columns including Physical Sample ID, Physical Sample Name, Project ID, Project Name, Target Material, and Owner.
list_projects()
List all projects accessible to your account.Returns
DataFrame of project records with columns including Project ID, Project Name, Physical Sample Count, Project Notes, and Owner.
get_physical_sample()
Get all data associated with a physical sample.Parameters
The physical sample ID.
Whether to include data from other users in your organization.
Whether to time-align data from multiple sources. Pass
True for outer join, or a string like "inner" to control the join strategy.Returns
Result object with attributes:
physical_sample_id- Sample identifierphysical_sample_name- Sample namedata_results- List of all result objects for this samplealigned_timeseries- Aligned DataFrame ifalignwas set, otherwiseNone
get_project()
Get all data associated with a project.Parameters
The project ID.
Whether to include data from other users in your organization.
Whether to time-align data from multiple sources. Pass
True for outer join, or a string like "inner" to control the join strategy.Returns
Result object with attributes:
project_id- Project identifierproject_name- Project namesamples- List ofPhysicalSampleResultobjects for each sample in the projectaligned_timeseries- Project-level aligned DataFrame ifalignwas set, otherwiseNone
list_growth_instruments()
List all growth instruments accessible to your account.Returns
List of instrument records. Each dict contains:
synth_source_id- Unique instrument ID (int)source_name- Display namesynth_source_type- Instrument type (mbe, cvd, etc.)source_manufacturer- Manufacturer namesource_model- Model name
create_growth_instrument()
Register a new growth instrument.Parameters
Display name for the instrument (e.g., “Main MBE”).
Manufacturer and model (e.g., “Veeco GEN10”).
Type of growth instrument.
| Value | Description |
|---|---|
mbe | Molecular beam epitaxy |
cvd | Chemical vapor deposition |
pvd | Physical vapor deposition |
sputter | Sputtering |
ald | Atomic layer deposition |
pld | Pulsed laser deposition |
Optional serial number or identifier.
Returns
The ID of the newly created instrument.
delete_growth_instrument()
Delete a growth instrument.Parameters
ID of the instrument to delete.