Skip to main content

Imaging example

This standalone job automatically selects a target, submits a Capture Request, waits for delivery, and fetches the verified Product into tenant storage. It requires no callback server or GPU processing.

Prepare​

The workload machine account needs camera.capture.write, camera.request.read, and camera.product.read. Grant orbit.passes.read for predicted pass ordering. The catalog includes additional land and island targets to improve the chance of finding an earlier pass; a shorter wait is not guaranteed. Targets are searched in batches of at most 100. Without orbit predictions, the job tries the built-in target catalog in order. Predictions do not guarantee admission or delivery.

Uplink the updated script before submitting a new run:

dphi> storage uplink default docs/examples/imaging/capture.py examples/imaging/capture.py
dphi> run create docs/examples/imaging/workload.yaml --idempotency-key imaging-v2
dphi> run logs YOUR_RUN_ID --component-name imaging-capture

Check the [wait-estimate] line for the selected target's predicted pass and approximate wait in mission time. Scheduling and product processing add time; the simulation clock may advance faster or slower than wall time. If planning is still running, request the logs again. Then wait for completion:

dphi> run wait YOUR_RUN_ID --timeout 86400

Use a fresh idempotency key for each intentional run. Camera-service chooses an admissible pass within its two-hour mission-time horizon. The job polls every five seconds and has a 24-hour wall-clock deadline across attempts. It tries another target after geometric admission refusals or scheduler rejection. Other terminal failures stop the job with the service reason.

Optional settings​

Set both TARGET_LAT and TARGET_LON to pin one target; TARGET_NAME names it. ACCESS_HORIZON_SECONDS defaults to 7200; CAPTURE_TIMEOUT_SECONDS defaults to 86400. MIN_WINDOW_SECONDS sets duration_s (default 2); the reserved pointing window is longer by about two seconds of margin. The job refreshes its workload token as needed. Cancellation attempts to withdraw the outstanding Capture Request.

Retrieve results​

After Succeeded, inspect the exact paths printed in the logs:

dphi> storage files default results/imaging
dphi> storage downlink default results/imaging/access-plan.json ./access-plan.json
dphi> storage downlink default results/imaging/capture.json ./capture.json
dphi> storage downlink default results/imaging/capture.tif ./capture.tif

The product is a 16-bit TIFF (image/tiff); the saved extension follows content_type (typically .tif). Use the filename printed in the logs. access-plan.json contains the latest orbit prediction response or fallback explanation. capture.json records the selected target, final Capture Request status, and Product metadata (including acquired_at in mission time and delivered_at in wall-clock time). Image size and SHA-256 must match before the image is saved atomically. A blank simulated frame can still be a valid Product; success does not prove live imagery was acquired.

Pixel content is simulated from Sentinel-2 L2A (stitched tiles may not be temporally consistent; high-resolution PAN uses super-resolution and is not scientifically valid). See Simulated image data.

See Use the imaging capability for the Capture Request API, download path (asset/read?download=true), and how duration_s relates to the reserved pointing window.

Use the example only in an operator-approved OmniCloud test environment. Retrieve results promptly: the OmniCloud test environment is a volatile test environment.