Created
April 26, 2021 04:12
-
-
Save chrisroat/711008e2a482c73d789e47c93b0cf0d5 to your computer and use it in GitHub Desktop.
This file contains 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
# When acquisition is inserted, the number of images is known | |
# and all metadata can be inserted. | |
class Acquisition(dj.Computed): | |
definition = """ | |
acq_name: varchar(32) | |
""" | |
class ImageMetadata(dj.Part): | |
definition = """ | |
-> Acquisition | |
-> image_index: int | |
""" | |
# Image seems like it should each be a Part table, but it is inserted | |
# independently when data comes available. | |
class Image(dj.Manual): | |
definition = """ | |
-> Acquisition.ImageMetadata | |
""" | |
class ProcessImage(dj.Computed): | |
definition = """ | |
-> Image | |
-> Params # not shown here | |
""" | |
# Need to manually spell out the key here, as there is no | |
# correct upstream table to reference. I'd also like it | |
# to be deleted whenever any ProcessImage gets removed. | |
class ProcessingComplete(): | |
definition = """ | |
-> Acquisition | |
-> Params | |
""" | |
def make(...): | |
if num_metadata == num_processed: | |
self.insert1() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment