Skip to main content
The RHEEDStreamer class lets you push RHEED frames directly from your instrument to Atomscale for live analysis. Choose between two streaming modes:
  • Callback / push mode - The camera or SDK hands you fresh frames and you upload each chunk immediately
  • Generator / pull mode - You already have frames buffered and want the helper to pace the upload for you

Prerequisites

  • numpy installed
  • RHEED frames as uint8 arrays shaped (N, H, W) or (H, W)
  • A stable clock so you can honor the capture cadence

Create a streamer

Optional keyword arguments tune chunking and logging. Set verbosity=4 for detailed progress output.

Callback / push mode

Use this variant when frames arrive live from the instrument. The outer loop is your acquisition callback: once a chunk is ready, send it to the API and wait just long enough to match the capture cadence.

Generator / pull mode

Use this form when frames are already buffered (from disk, memory, or a simulated source). Provide an iterator that yields chunks and the helper handles pacing and retry logic.

Best practices

Always call finalize() even if the upload fails part-way. This signals the server to clean up resources and mark the stream appropriately.
Pass physical_sample to initialize() to link the stream to an existing sample. Names are matched case-insensitively, or a new sample is created if no match is found. You can also pass project_id to associate the stream with a project, which adds the sample to that project’s tracking list and marks it as the active tracking sample for growth monitoring. tags accepts tag names or UUIDs. Names are matched case-insensitively against your organization’s tags, and unknown names create new tags.

Next steps

Poll Time Series

Monitor streaming analysis in real time.

Streaming Reference

Full RHEEDStreamer API documentation.