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 +