You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per ADR 0021 — Micrograph Motion-Corrected Preview Image Ingestion and Serving (smartem-devtools, Proposed). This is the ingestion/persistence prerequisite that gates the serving endpoint (#308).
The scientifically meaningful micrograph image is the motion-corrected artefact cryoem-services already produces (a 2D .mrc and a downscaled .jpeg snapshot). SmartEM does not consume cryoem-services' spa.* Zocalo messages; instead it owns the POST /micrographs/{uuid}/motion_correction/completed contract, which is the seam to carry the paths in. We must not serve the stored high_res_path (raw multi-GB movie stack; 3D-array encode failure + OOM).
Scope (ADR items 1-2)
1. Persist two nullable paths on the micrograph
Add two nullable columns via an Alembic migration (no backfill; existing/dump rows stay null):
motion_corrected_image_path: str | None — the motion-corrected 2D average .mrc (cryoem-services mc_path / ISPyB micrograph_full_path).
Existing callers that omit them keep working (backward-compatible). Extend handle_motion_correction_complete (consumer.py:408) to persist whichever paths are present onto the micrograph row (it currently touches only QualityMetricStatistics and updated_at).
The cryoem-services -> SmartEM adapter that supplies these paths is a separate coordination item.
Validation is by unit test: the current prod dump predates any processed-image path (all numeric metrics are also null), so it exercises the null/404 path only.
On completion a new release is warranted (schema migration + contract fields).
Per ADR 0021 — Micrograph Motion-Corrected Preview Image Ingestion and Serving (smartem-devtools, Proposed). This is the ingestion/persistence prerequisite that gates the serving endpoint (#308).
The scientifically meaningful micrograph image is the motion-corrected artefact cryoem-services already produces (a 2D
.mrcand a downscaled.jpegsnapshot). SmartEM does not consume cryoem-services'spa.*Zocalo messages; instead it owns thePOST /micrographs/{uuid}/motion_correction/completedcontract, which is the seam to carry the paths in. We must not serve the storedhigh_res_path(raw multi-GB movie stack; 3D-array encode failure + OOM).Scope (ADR items 1-2)
1. Persist two nullable paths on the micrograph
Add two nullable columns via an Alembic migration (no backfill; existing/dump rows stay null):
motion_corrected_image_path: str | None— the motion-corrected 2D average.mrc(cryoem-servicesmc_path/ ISPyBmicrograph_full_path).motion_corrected_snapshot_path: str | None— the downscaled.jpegsnapshot (ISPyBmicrograph_snapshot_full_path).2. Extend the processing-feedback contract additively
Add both fields as optional (nullable, default
None) to:MotionCorrectionCompletedRequest(HTTP request model,api_server.py:1380)MotionCorrectionCompleteBody(RabbitMQ body,model/mq_event.py:330)Existing callers that omit them keep working (backward-compatible). Extend
handle_motion_correction_complete(consumer.py:408) to persist whichever paths are present onto the micrograph row (it currently touches onlyQualityMetricStatisticsandupdated_at).Notes
micrograph_imageendpoint) is tracked separately in feat(api): serve motion-corrected micrograph preview image (ADR 0021) #308, gated behind this issue.