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()
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 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[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 usesearch() 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 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
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 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[dict]
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
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.