docs: add ADR 0021 on micrograph preview image ingestion and serving#232
Open
vredchenko wants to merge 2 commits into
Open
docs: add ADR 0021 on micrograph preview image ingestion and serving#232vredchenko wants to merge 2 commits into
vredchenko wants to merge 2 commits into
Conversation
The micrograph (exposure) leaf of the spatial hierarchy has no image endpoint, so FoilholeDetail renders the most scientifically meaningful image as a grey placeholder. Serving the stored high_res_path is wrong: it is the raw multi-GB movie stack, which fails to encode as a 2D image and reproduces the atlas-page OOM. Record the decision to ingest the motion-corrected artefacts cryoem-services already produces (2D MRC + downscaled JPEG snapshot), carried through SmartEM's existing motion_correction/completed contract, and serve them JPEG-first / MRC-fallback / 404 via a new micrograph_image endpoint. This re-scopes smartem-decisions #308.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ADR 0021 — Micrograph Motion-Corrected Preview Image Ingestion and Serving (Status: Proposed).
The micrograph (exposure) leaf of the Atlas -> Grid Square -> Foil Hole -> Micrograph hierarchy has no image endpoint, so
smartem-frontend'sFoilholeDetail.tsxrenders the most scientifically meaningful image as a grey placeholder. This is tracked assmartem-decisions#308.Decision
high_res_path(the naive reading of #308): it is the raw multi-GB dose-fractionated movie stack — a 3D arrayPIL.Image.fromarraycannot encode, and loading it reproduces the atlas-page OOM. Unprocessed rows carryhigh_res_path = '.'(the agent's unsetPath(""))..mrcand a ready downscaled.jpegsnapshot — carried through SmartEM's existingPOST /micrographs/{uuid}/motion_correction/completedcontract (additive, backward-compatible). SmartEM does not consume cryoem-services'spa.*Zocalo messages; this reuses a contract SmartEM already owns.GET /micrographs/{uuid}/micrograph_image: JPEG-first (FileResponse, zero-render, structurally OOM-immune) -> MRC-fallback (existing_render_image_png, samex,y,w,hcrop asatlas_image) ->404.Follow-ups (filed as issues)
This ADR re-scopes
smartem-decisions#308 (serving endpoint, gated) and spawns two tracking issues: the schema-migration + contract-extension + consumer-persistence work, and a separate cryoem-services adapter coordination item.Compatible with any resolution of the deferred frontend image-serving/zoom decision (
smartem-frontend#111); no frontend change is required by the ADR.