Skip to main content
The 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

str | None
default:"None"
API key for authentication. If not provided, reads from the AS_API_KEY environment variable.
str
default:"https://api.atomscale.ai/"
Root API endpoint. Can be overridden with the AS_API_ENDPOINT environment variable.
bool
default:"False"
Whether to suppress progress bars. Set to True for non-interactive environments like CI pipelines.

Search and filter items in the data catalogue.

Parameters

str | list[str] | None
default:"None"
Keyword or list of keywords to search all catalogue fields. Applied after other explicit filters.
bool
default:"True"
Whether to include catalogue entries from other users in your organization.
str | list[str] | None
default:"None"
Filter to specific data IDs.
str | list[str] | None
default:"None"
Filter by physical sample IDs.
str | list[str] | None
default:"None"
Filter by project IDs.
str
default:"all"
Filter by data type.
str
default:"all"
Filter by pipeline status.
tuple[int | None, int | None]
default:"(None, None)"
Filter by growth length in seconds. Tuple of (min, max) with None for open bounds.
tuple[datetime | None, datetime | None]
default:"(None, None)"
Filter by upload timestamp. Tuple of (min, max) with None for open bounds.
tuple[datetime | None, datetime | None]
default:"(None, None)"
Filter by last accessed timestamp. Tuple of (min, max) with None for open bounds.

Returns

pandas.DataFrame
DataFrame with columns:

Example


get()

Fetch analysis results for one or more data IDs.

Parameters

str | list[str]
required
Data ID or list of data IDs from the catalogue.

Returns

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 metrics
  • snapshot_image_data - List of extracted frame snapshots
RHEEDImageResult (for rheed_image):
  • processed_image - Processed image as a PIL Image
  • mask - Binary segmentation mask (numpy array)
  • pattern_graph - NetworkX graph of the diffraction pattern
  • get_pattern_dataframe() - Tidy table of spot positions
  • get_plot() - Matplotlib figure (params: show_mask, show_spot_nodes, symmetrize, alpha)
XPSResult (for xps):
  • binding_energies - Array of binding energy values
  • intensities - Array of intensity values
  • predicted_composition - Dict mapping element symbols to fractional composition
  • detected_peaks - Detected peak positions
  • get_plot() - Matplotlib figure
PhotoluminescenceResult (for photoluminescence):
  • energies - Energy axis values
  • intensities - Intensity values
  • detected_peaks - Peak labels and positions
  • get_plot() - Matplotlib figure
RamanResult (for raman):
  • raman_shift - Raman shift axis values
  • intensities - Intensity values
  • detected_peaks - Peak labels and positions
  • get_plot() - Matplotlib figure
MetrologyResult (for metrology/instrument data):
  • timeseries_data - DataFrame with instrument readings (pyrometer, pressure, etc.)
OpticalResult (for optical imaging):
  • timeseries_data - DataFrame with per-frame metrics (edge perimeter, circularity, etc.)
  • snapshot_image_data - List of extracted frame snapshots
UnknownResult (fallback for unsupported types):
  • data_type - Type string
  • catalogue_entry - Raw catalogue metadata

Example


upload()

Upload files for analysis.

Parameters

list[str | BinaryIO]
required
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 use search() to monitor progress.

Example


download_videos()

Download processed or raw videos to disk.

Parameters

str | list[str]
required
One or more data IDs from the catalogue.
str | Path | None
default:"None"
Directory to write files to. Defaults to current working directory.
str
default:"processed"
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

pandas.DataFrame
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

pandas.DataFrame
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

str
required
The physical sample ID.
bool
default:"True"
Whether to include data from other users in your organization.
bool | str
default:"False"
Whether to time-align data from multiple sources. Pass True for outer join, or a string like "inner" to control the join strategy.

Returns

PhysicalSampleResult
Result object with attributes:
  • physical_sample_id - Sample identifier
  • physical_sample_name - Sample name
  • data_results - List of all result objects for this sample
  • aligned_timeseries - Aligned DataFrame if align was set, otherwise None

get_project()

Get all data associated with a project.

Parameters

str
required
The project ID.
bool
default:"True"
Whether to include data from other users in your organization.
bool | str
default:"False"
Whether to time-align data from multiple sources. Pass True for outer join, or a string like "inner" to control the join strategy.

Returns

ProjectResult
Result object with attributes:
  • project_id - Project identifier
  • project_name - Project name
  • samples - List of PhysicalSampleResult objects for each sample in the project
  • aligned_timeseries - Project-level aligned DataFrame if align was set, otherwise None

list_growth_instruments()

List all growth instruments accessible to your account.

Returns

list[dict]
List of instrument records. Each dict contains:
  • synth_source_id - Unique instrument ID (int)
  • source_name - Display name
  • synth_source_type - Instrument type (mbe, cvd, etc.)
  • source_manufacturer - Manufacturer name
  • source_model - Model name

create_growth_instrument()

Register a new growth instrument.

Parameters

str
required
Display name for the instrument (e.g., “Main MBE”).
str
required
Manufacturer and model (e.g., “Veeco GEN10”).
str
required
Type of growth instrument.
str | None
default:"None"
Optional serial number or identifier.

Returns

int
The ID of the newly created instrument.

delete_growth_instrument()

Delete a growth instrument.

Parameters

int
required
ID of the instrument to delete.

Returns

None.