From a0c98014c4262f6f09c6f10977d5d886805e0487 Mon Sep 17 00:00:00 2001 From: Dimitri Yatsenko Date: Tue, 11 Aug 2026 12:36:24 -0500 Subject: [PATCH] docs: restyle intro pipeline figure to dj.Diagram notation (adaptive) Redraw the intro-page pipeline figure in the modernized dj.Diagram notation: muted tier palette with colored strokes, ovals for Imported/Computed and rectangles for Manual/Lookup, thick/thin edges encoding cardinality, and a master-part entity cluster. Activity is now a Part of Segmentation, with the cell_mask and trace object-store attributes on the part and a make() that inserts into Segmentation.Activity. The SVG is theme-adaptive (auto): light by default, dark via prefers-color-scheme so it reads on both docs themes. --- src/images/pipeline.svg | 239 ++++++++++++++++++++++++---------------- 1 file changed, 143 insertions(+), 96 deletions(-) diff --git a/src/images/pipeline.svg b/src/images/pipeline.svg index 94154a0c..8c2cb600 100644 --- a/src/images/pipeline.svg +++ b/src/images/pipeline.svg @@ -1,118 +1,165 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - Subject + + Subject - - Session + + Session - - Scan + + Scan - - AverageFrame + + AverageFrame - - SegmentationParams - - - - Segmentation - - - - Activity - - - - - - + + SegmentationParams + + + + Segmentation - - + + + Activity - + + + + + + + + - @schema - class Segmentation(dj.Computed): - definition = """ - -> AverageFrame - -> SegmentationParams - --- - num_cells: int32 - cell_masks : <blob@> - """ - def make(self, key): - frame = (AverageFrame & key).fetch1('frame') - params = (SegmentationParams & key).fetch1() - masks, n = segment(frame, **params) - self.insert1(dict(key, num_cells=n, cell_masks=masks)) + font-size="16" fill="#24292e"> + @schema + class Segmentation(dj.Computed): + definition = """ + -> AverageFrame + -> SegmentationParams + --- + num_cells : int32 + """ + + class Activity(dj.Part): + definition = """ + -> master + roi_id : int32 + --- + cell_mask : <blob@> + trace : <blob@> + """ + + def make(self, key): + frame = (AverageFrame & key).fetch1('frame') + params = (SegmentationParams & key).fetch1() + masks, traces = segment(frame, **params) + self.insert1(dict(key, num_cells=len(masks))) + self.Activity.insert( + dict(key, roi_id=i, cell_mask=m, trace=t) + for i, (m, t) in enumerate(zip(masks, traces))) - - database link - - - table name - - - dependency - - - object-store attribute - - - computation - + + database link + + + table name + + + dependency + + + part table + + + object-store attribute + + + computation +