示例#1
0
class ExperimentalPlan(db.Model):
    __tablename__ = 'ExperimentalPlan'

    experimentalPlanId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(db.String(255))
    numberOfRepetitions = db.Column(
        db.Integer, info='for micro-fluidic, jet, tape but not for chip')
    period = db.Column(db.Float,
                       info='seconds but unknown/self adjusting for chip')
    masterTriggerId = db.Column(db.ForeignKey('MasterTrigger.masterTriggerId'),
                                index=True)
    repeatedSequenceId = db.Column(
        db.ForeignKey('RepeatedSequence.repeatedSequenceId'),
        nullable=False,
        index=True)

    MasterTrigger = db.relationship(
        'MasterTrigger',
        primaryjoin=
        'ExperimentalPlan.masterTriggerId == MasterTrigger.masterTriggerId')
    RepeatedSequence = db.relationship(
        'RepeatedSequence',
        primaryjoin=
        'ExperimentalPlan.repeatedSequenceId == RepeatedSequence.repeatedSequenceId'
    )
示例#2
0
class TimedExcitation(db.Model):
    __tablename__ = 'TimedExcitation'

    timedExcitationId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(db.String(255))
    repeatedSequenceId = db.Column(
        db.ForeignKey('RepeatedSequence.repeatedSequenceId'), index=True)
    eventTrainId = db.Column(db.ForeignKey('EventTrain.eventTrainId'),
                             index=True)
    ssxExcitation = db.Column(db.String(255))

    EventTrain = db.relationship(
        'EventTrain',
        primaryjoin='TimedExcitation.eventTrainId == EventTrain.eventTrainId')
    RepeatedSequence = db.relationship(
        'RepeatedSequence',
        primaryjoin=
        'TimedExcitation.repeatedSequenceId == RepeatedSequence.repeatedSequenceId'
    )
示例#3
0
class TimedXrayExposure(db.Model):
    __tablename__ = 'TimedXrayExposure'

    timedXrayExposureId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(db.String(255))
    repeatedSequenceId = db.Column(
        db.ForeignKey('RepeatedSequence.repeatedSequenceId'), index=True)
    eventTrainId = db.Column(db.ForeignKey('EventTrain.eventTrainId'),
                             index=True)
    timedBunches = db.Column(db.String(255))
    shutter = db.Column(db.String(255))

    EventTrain = db.relationship(
        'EventTrain',
        primaryjoin='TimedXrayExposure.eventTrainId == EventTrain.eventTrainId'
    )
    RepeatedSequence = db.relationship(
        'RepeatedSequence',
        primaryjoin=
        'TimedXrayExposure.repeatedSequenceId == RepeatedSequence.repeatedSequenceId'
    )
示例#4
0
class TimedXrayDetection(db.Model):
    __tablename__ = 'TimedXrayDetection'

    timedXrayDetectionId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(db.String(255))
    repeatedSequenceId = db.Column(
        db.ForeignKey('RepeatedSequence.repeatedSequenceId'), index=True)
    eventTrainId = db.Column(db.ForeignKey('EventTrain.eventTrainId'),
                             index=True)
    numberOfInternalTriggers = db.Column(db.Integer)
    internalTriggerPeriod = db.Column(db.Integer)
    internalGateDuration = db.Column(db.Integer)

    EventTrain = db.relationship(
        'EventTrain',
        primaryjoin='TimedXrayDetection.eventTrainId == EventTrain.eventTrainId'
    )
    RepeatedSequence = db.relationship(
        'RepeatedSequence',
        primaryjoin=
        'TimedXrayDetection.repeatedSequenceId == RepeatedSequence.repeatedSequenceId'
    )
示例#5
0
class LoadedSample(db.Model):
    __tablename__ = 'LoadedSample'

    loadedSampleId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(
        db.String(255),
        info='to be used as part of the image and processing file names')
    sampleStockId = db.Column(db.ForeignKey('SampleStock.sampleStockId'),
                              index=True)
    sampleDeliveryDeviceId = db.Column(
        db.ForeignKey('SampleDeliveryDevice.sampleDeliveryDeviceId'),
        index=True)
    loadingPattern = db.Column(db.Integer)
    descriptionJson = db.Column(db.JSON)

    SampleDeliveryDevice = db.relationship(
        'SampleDeliveryDevice',
        primaryjoin=
        'LoadedSample.sampleDeliveryDeviceId == SampleDeliveryDevice.sampleDeliveryDeviceId'
    )
    SampleStock = db.relationship(
        'SampleStock',
        primaryjoin='LoadedSample.sampleStockId == SampleStock.sampleStockId')
示例#6
0
class SsxDataAcquisition(db.Model):
    __tablename__ = 'SsxDataAcquisition'

    ssxDataAcquisitionId = db.Column(db.Integer, primary_key=True, unique=True)
    loadedSampleId = db.Column(db.ForeignKey('LoadedSample.loadedSampleId'),
                               nullable=False,
                               index=True)
    dataCollectionId = db.Column(
        db.Integer,
        nullable=False,
        info='reference to DataCollection.dataCollectionId')
    experimentalPlanId = db.Column(
        db.ForeignKey('ExperimentalPlan.experimentalPlanId'),
        nullable=False,
        index=True)
    eventLogFilename = db.Column(db.String(255),
                                 nullable=False,
                                 info='url to shorlist file')
    dataSetId = db.Column(db.ForeignKey('DataSet.dataSetId'),
                          nullable=False,
                          index=True)
    autoprocessingProgrammId = db.Column(
        db.Integer, info='reference to AutoProcProgram.autoProcProgramId')

    DataSet = db.relationship(
        'DataSet',
        primaryjoin='SsxDataAcquisition.dataSetId == DataSet.dataSetId')
    ExperimentalPlan = db.relationship(
        'ExperimentalPlan',
        primaryjoin=
        'SsxDataAcquisition.experimentalPlanId == ExperimentalPlan.experimentalPlanId'
    )
    LoadedSample = db.relationship(
        'LoadedSample',
        primaryjoin=
        'SsxDataAcquisition.loadedSampleId == LoadedSample.loadedSampleId')
示例#7
0
class CrystalSlurryHasCrystal(db.Model):
    __tablename__ = 'CrystalSlurry_has_Crystal'

    CrystalSlurryHasCrystalId = db.Column(db.Integer,
                                          primary_key=True,
                                          unique=True)
    crystalSlurryId = db.Column(db.ForeignKey('CrystalSlurry.crystalSlurryId'),
                                nullable=False,
                                index=True)
    crystalId = db.Column(db.Integer, nullable=False)

    CrystalSlurry = db.relationship(
        'CrystalSlurry',
        primaryjoin=
        'CrystalSlurryHasCrystal.crystalSlurryId == CrystalSlurry.crystalSlurryId'
    )
示例#8
0
class CrystalSlurry(db.Model):
    __tablename__ = 'CrystalSlurry'

    crystalSlurryId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(db.String(255))
    crystalSizeDistributionId = db.Column(
        db.ForeignKey('CrystalSizeDistribution.crystalSizeDistributionId'),
        index=True)
    crystalDensity = db.Column(db.Float, info='1/mm3')
    bufferId = db.Column(db.Float, info='reference to Buffer.bufferId')

    CrystalSizeDistribution = db.relationship(
        'CrystalSizeDistribution',
        primaryjoin=
        'CrystalSlurry.crystalSizeDistributionId == CrystalSizeDistribution.crystalSizeDistributionId'
    )
示例#9
0
class Micrograph(db.Model):
    __tablename__ = 'Micrograph'

    micrographId = db.Column(db.Integer, primary_key=True, unique=True)
    crystalSlurryId = db.Column(db.ForeignKey('CrystalSlurry.crystalSlurryId'),
                                nullable=False,
                                index=True)
    url = db.Column(db.String(255))
    objectSidePixelSize = db.Column(db.String(255),
                                    info='comma separated two floats')
    descriptionJson = db.Column(db.JSON)

    CrystalSlurry = db.relationship(
        'CrystalSlurry',
        primaryjoin=
        'Micrograph.crystalSlurryId == CrystalSlurry.crystalSlurryId')
示例#10
0
class SampleStock(db.Model):
    __tablename__ = 'SampleStock'

    sampleStockId = db.Column(db.Integer, primary_key=True, unique=True)
    name = db.Column(db.String(255), nullable=False)
    crystalSlurryId = db.Column(db.ForeignKey('CrystalSlurry.crystalSlurryId'),
                                nullable=False,
                                index=True)
    concentrationFactor = db.Column(db.Float, nullable=False)
    crystalDensity = db.Column(db.Float, nullable=False)
    additiveId = db.Column(db.Integer, info='reference to Additive.additiveId')
    note = db.Column(db.String(255))

    CrystalSlurry = db.relationship(
        'CrystalSlurry',
        primaryjoin=
        'SampleStock.crystalSlurryId == CrystalSlurry.crystalSlurryId')