Пример #1
0
class proc_FitTable(Base, BaseMixin):
    history_id = foreignkey('proc_FitHistoryTable')
    isotope_id = foreignkey('meas_IsotopeTable')

    fit = stringcolumn()
    error_type = stringcolumn(default='SD')
    filter_outliers = Column(Boolean)
    filter_outlier_iterations = Column(Integer, default=1)
    filter_outlier_std_devs = Column(Integer, default=1)
    include_baseline_error = Column(Boolean)
    time_zero_offset = Column(Float)
    use_standard_deviation_filtering = False
    truncate = False

    @property
    def isotope_label(self):
        name = self.isotope.molecular_weight.name
        if self.isotope.kind == 'baseline':
            name = '{}bs'.format(name)
        return name

    def make_summary(self):
        f = self.fit[:1].upper()
        name = self.isotope_label
        s = '{}{}'.format(name, f)
        return s
Пример #2
0
class meas_ExtractionTable(Base, BaseMixin):
    #    position = Column(Integer)
    extract_value = Column(Float)
    extract_duration = Column(Float)
    cleanup_duration = Column(Float)

    extract_units = stringcolumn(5)

    #    experiment_blob = Column(BLOB)
    weight = Column(Float)
    sensitivity_multiplier = Column(Float)
    is_degas = Column(Boolean)

    beam_diameter = Column(Float)
    pattern = stringcolumn(100)
    ramp_rate = Column(Float)
    ramp_duration = Column(Float)

    mask_position = Column(Float)
    mask_name = stringcolumn(100)
    attenuator = Column(Float)
    reprate = Column(Float)

    sensitivity_id = foreignkey('gen_SensitivityTable')
    extract_device_id = foreignkey('gen_ExtractionDeviceTable')
    script_id = foreignkey('meas_ScriptTable')
    experiment_blob_id = foreignkey('meas_ScriptTable')
    image_id = foreignkey('med_ImageTable')

    analyses = relationship('meas_AnalysisTable', backref='extraction')
    positions = relationship('meas_PositionTable', backref='extraction')
    snapshots = relationship('med_SnapshotTable', backref='extraction')
Пример #3
0
class irrad_LevelTable(Base, NameMixin):
    z = Column(Float)
    holder_id = foreignkey('irrad_HolderTable')
    irradiation_id = foreignkey('irrad_IrradiationTable')
    production_id = foreignkey('irrad_ProductionTable')

    positions = relationship('irrad_PositionTable', backref='level')
Пример #4
0
class proc_DetectorParamTable(Base, BaseMixin):
    history_id = foreignkey('proc_DetectorParamHistoryTable')
    disc = Column(Float)
    disc_error = Column(Float)
    detector_id = foreignkey('gen_DetectorTable')

    #@todo: add refmass to detector param table
    refmass = 35.9675
Пример #5
0
class proc_FigureAnalysisTable(Base, BaseMixin):
    figure_id = foreignkey('proc_FigureTable')
    analysis_id = foreignkey('meas_AnalysisTable')
    status = Column(Integer)
    graph = Column(Integer)
    group = Column(Integer)

    analysis = relationship('meas_AnalysisTable', uselist=False)
Пример #6
0
class proc_DetectorIntercalibrationTable(Base, BaseMixin):
    history_id = foreignkey('proc_DetectorIntercalibrationHistoryTable')
    detector_id = foreignkey('gen_DetectorTable')
    user_value = Column(Float)
    user_error = Column(Float)
    fit = stringcolumn()
    error_type = stringcolumn(default='SD')
    set_id = Column(Integer)
Пример #7
0
class meas_IsotopeTable(Base, BaseMixin):
    molecular_weight_id = foreignkey('gen_MolecularWeightTable')
    analysis_id = foreignkey('meas_AnalysisTable')
    detector_id = foreignkey('gen_DetectorTable')
    kind = stringcolumn()

    signal = relationship('meas_SignalTable', backref='isotope', uselist=False)

    fits = relationship('proc_FitTable', backref='isotope')
    results = relationship('proc_IsotopeResultsTable', backref='isotope')
Пример #8
0
class meas_MeasurementTable(Base, BaseMixin):
    mass_spectrometer_id = foreignkey('gen_MassSpectrometerTable')
    analysis_type_id = foreignkey('gen_AnalysisTypeTable')
    spectrometer_parameters_id = foreignkey('meas_SpectrometerParametersTable')
    script_id = foreignkey('meas_ScriptTable')
    #    spectrometer_parameters = relationship('meas_SpectrometerParametersTable',
    #                                         backref='measurement',
    #                                         uselist=False
    #                                         )
    analyses = relationship('meas_AnalysisTable', backref='measurement')
    deflections = relationship('meas_SpectrometerDeflectionsTable',
                               backref='measurement')
Пример #9
0
class irrad_LevelTable(Base, NameMixin):
    z = Column(Float)
    note = Column(BLOB)

    holder_id = foreignkey('irrad_HolderTable')
    irradiation_id = foreignkey('irrad_IrradiationTable')
    production_id = foreignkey('irrad_ProductionTable')

    positions = relationship('irrad_PositionTable', backref='level')
    create_date = Column(DateTime, default=func.now())

    last_modified = Column(DateTime, onupdate=func.now())
Пример #10
0
class gen_LabTable(Base, BaseMixin):
    identifier = stringcolumn()
    #    aliquot = Column(Integer)
    sample_id = foreignkey('gen_SampleTable')

    irradiation_id = foreignkey('irrad_PositionTable')
    selected_flux_id = foreignkey('flux_HistoryTable')
    selected_interpreted_age_id = foreignkey('proc_InterpretedAgeHistoryTable')
    note = stringcolumn(140)

    analyses = relationship('meas_AnalysisTable', backref='labnumber')

    figures = relationship('proc_FigureLabTable', backref='labnumber')
Пример #11
0
class proc_FitTable(Base, BaseMixin):
    history_id = foreignkey('proc_FitHistoryTable')
    isotope_id = foreignkey('meas_IsotopeTable')

    fit = stringcolumn()
    error_type=stringcolumn(default='SD')
    filter_outliers = Column(Boolean)
    filter_outlier_iterations = Column(Integer, default=1)
    filter_outlier_std_devs = Column(Integer, default=1)


    def make_summary(self):
        f = self.fit[:1].upper()
        s = '{}{}'.format(self.isotope.molecular_weight.name, f)
        return s
Пример #12
0
class gen_SampleTable(Base, NameMixin):
    material_id = foreignkey('gen_MaterialTable')
    project_id = foreignkey('gen_ProjectTable')
    labnumbers = relationship('gen_LabTable', backref='sample')
    monitors = relationship('flux_MonitorTable', backref='sample')

    igsn = Column(CHAR(9))
    location = stringcolumn(80)
    lat = Column(Float)
    long = Column(Float)
    elevation = Column(Float)
    note = Column(BLOB)

    alt_name = stringcolumn(80)
    lithology = stringcolumn(80)
Пример #13
0
class proc_InterpretedAgeGroupHistoryTable(Base, BaseMixin):
    project_id = foreignkey('gen_ProjectTable')
    name = stringcolumn(80)
    create_date = Column(DateTime, default=func.now())

    interpreted_ages = relationship('proc_InterpretedAgeGroupSetTable',
                                    backref='group')
Пример #14
0
class flux_HistoryTable(Base, BaseMixin):
    irradiation_position_id = foreignkey('irrad_PositionTable')
    selected = relationship('gen_LabTable',
                            backref='selected_flux_history',
                            uselist=False)
    flux = relationship('flux_FluxTable', backref='history', uselist=False)
    create_date = Column(DateTime, default=func.now())
Пример #15
0
class proc_ArArTable(Base, BaseMixin):
    history_id = foreignkey('proc_ArArHistoryTable')
    age = Column(Float)
    age_err = Column(Float)
    age_err_wo_j = Column(Float)

    k39 = Column(Float)
    k39_err = Column(Float)
    ca37 = Column(Float)
    ca37_err = Column(Float)
    cl36 = Column(Float)
    cl36_err = Column(Float)

    Ar40 = Column(Float)
    Ar40_err = Column(Float)
    Ar39 = Column(Float)
    Ar39_err = Column(Float)
    Ar38 = Column(Float)
    Ar38_err = Column(Float)
    Ar37 = Column(Float)
    Ar37_err = Column(Float)
    Ar36 = Column(Float)
    Ar36_err = Column(Float)

    rad40 = Column(Float)
    rad40_err = Column(Float)
Пример #16
0
class proc_FitHistoryTable(Base, HistoryMixin):
    action_id = foreignkey('proc_ActionTable')
    fits = relationship('proc_FitTable', backref='history')
    results = relationship('proc_IsotopeResultsTable', backref='history')
    selected = relationship('proc_SelectedHistoriesTable',
                            backref='selected_fits',
                            uselist=False)
Пример #17
0
class proc_ActionTable(Base, BaseMixin):
    create_date = Column(DateTime, default=func.now())
    session = stringcolumn()
    user_id = foreignkey('gen_UserTable')
    action = Column(BLOB)
    blank_histories = relationship('proc_BlanksHistoryTable', backref='action')
    fit_histories = relationship('proc_FitHistoryTable', backref='action')
Пример #18
0
class proc_SelectedHistoriesTable(Base, BaseMixin):
    analysis_id = foreignkey('meas_AnalysisTable')
    selected_blanks_id = foreignkey('proc_BlanksHistoryTable')
    selected_backgrounds_id = foreignkey('proc_BackgroundsHistoryTable')
    selected_det_intercal_id = foreignkey('proc_DetectorIntercalibrationHistoryTable')
    selected_fits_id = foreignkey('proc_FitHistoryTable')
    selected_arar_id = foreignkey('proc_ArArHistoryTable')
    selected_det_param_id = foreignkey('proc_DetectorParamHistoryTable')
    selected_sensitivity_id = foreignkey('proc_SensitivityHistoryTable')
Пример #19
0
class loading_PositionsTable(Base, BaseMixin):
    load_identifier = Column(String(80), ForeignKey('loading_LoadTable.name'))
    lab_identifier = foreignkey('gen_LabTable')

    # lab_identifier = Column(Integer, ForeignKey('gen_LabTable.id'))
    position = Column(Integer)
    weight = Column(Float)
    note = Column(BLOB)
Пример #20
0
class proc_DataReductionTagTable(Base, BaseMixin):
    name = stringcolumn(140)
    create_date = Column(TIMESTAMP, default=func.now())
    comment = Column(BLOB)
    user_id = foreignkey('gen_UserTable')

    analyses = relationship('proc_DataReductionTagSetTable', backref='tag')
    analysis = relationship('meas_AnalysisTable', backref='data_reduction_tag')
Пример #21
0
class gen_SensitivityTable(Base, BaseMixin):
    mass_spectrometer_id = foreignkey('gen_MassSpectrometerTable')
    sensitivity = Column(Float(32))
    create_date = Column(DateTime, default=func.now())
    user = stringcolumn()
    note = Column(BLOB)

    extractions = relationship('meas_ExtractionTable', backref='sensitivity')
Пример #22
0
class proc_InterpretedAgeTable(Base, BaseMixin):
    history_id = foreignkey('proc_InterpretedAgeHistoryTable')
    age_kind = stringcolumn(32)
    age = Column(Float)
    age_err = Column(Float)
    wtd_kca = Column(Float)
    wtd_kca_err = Column(Float)
    mswd = Column(Float)
    sets = relationship('proc_InterpretedAgeSetTable', backref='analyses')
Пример #23
0
class irrad_PositionTable(Base, BaseMixin):
    labnumber = relationship('gen_LabTable',
                             backref='irradiation_position',
                             uselist=False)
    flux_histories = relationship('flux_HistoryTable', backref='position')

    level_id = foreignkey('irrad_LevelTable')
    position = Column(Integer)
    weight = Column(Float)
Пример #24
0
class proc_FigureTable(Base, NameMixin):
    create_date = Column(DateTime, default=func.now())
    user = stringcolumn()
    project_id = foreignkey('gen_ProjectTable')

    labnumbers = relationship('proc_FigureLabTable', backref='figure')
    analyses = relationship('proc_FigureAnalysisTable', backref='figure')
    preference = relationship('proc_FigurePrefTable', backref='figure',
                              uselist=False)
Пример #25
0
class proc_BackgroundsTable(Base, BaseMixin):
    history_id = foreignkey('proc_BackgroundsHistoryTable')
    user_value = Column(Float)
    user_error = Column(Float)
    use_set = Column(Boolean)
    isotope = stringcolumn()
    fit = stringcolumn()
    error_type = stringcolumn(default='SD')
    set_id = Column(Integer)
Пример #26
0
class meas_PositionTable(Base, BaseMixin):
    position = Column(Integer)
    x = Column(Float)
    y = Column(Float)
    z = Column(Float)

    is_degas = Column(Boolean)
    extraction_id = foreignkey('meas_ExtractionTable')
    load_identifier = Column(String(80), ForeignKey('loading_LoadTable.name'))
Пример #27
0
class proc_SelectedHistoriesTable(Base, BaseMixin):
    analysis_id = foreignkey('meas_AnalysisTable')
    selected_blanks_id = foreignkey('proc_BlanksHistoryTable')
    selected_backgrounds_id = foreignkey('proc_BackgroundsHistoryTable')
    selected_det_intercal_id = foreignkey('proc_DetectorIntercalibrationHistoryTable')
    selected_fits_id = foreignkey('proc_FitHistoryTable')
    selected_arar_id = foreignkey('proc_ArArHistoryTable')
    selected_det_param_id = foreignkey('proc_DetectorParamHistoryTable')
    selected_sensitivity_id = foreignkey('proc_SensitivityHistoryTable')

    dr_sets = relationship('proc_DataReductionTagSetTable', backref='selected_histories')
Пример #28
0
class meas_MonitorTable(Base, NameMixin):
    data = Column(BLOB)

    parameter = stringcolumn()
    criterion = stringcolumn()
    comparator = stringcolumn()
    action = stringcolumn()
    tripped = Column(Boolean)

    analysis_id = foreignkey('meas_AnalysisTable')
Пример #29
0
class proc_BlanksTable(Base, BaseMixin):
    history_id = foreignkey('proc_BlanksHistoryTable')
    user_value = Column(Float)
    user_error = Column(Float)
    use_set = Column(Boolean)
    isotope = stringcolumn()

    fit = stringcolumn()
    error_type = stringcolumn(default='SD')

    set_id = Column(String(40), ForeignKey('proc_BlanksSetTable.set_id'))
    # set_id = Column(Integer, ForeignKey('proc_BlanksSetTable.set_id'))
    # set_id = Column(Integer)
    # set_id = foreignkey('proc_BlanksSetTable')
    preceding_id = foreignkey('meas_AnalysisTable')

    analysis_set = relationship(
        'proc_BlanksSetTable',
        primaryjoin='proc_BlanksTable.set_id==proc_BlanksSetTable.set_id',
        backref='blanks',
        uselist=True)

    # analysis_set = relationship('proc_BlanksSetTable')
    value_set = relationship('proc_BlanksSetValueTable', backref='blank')

    def make_summary(self):
        s = 'Pr'
        f = self.fit
        if f:
            if not f in INTERPOLATE_TYPES:
                f = f[:1].upper()

            s = '{}{}'.format(self.isotope, f)

        if self.preceding_id:
            p = self.preceding_analysis
            rid = make_runid(p.labnumber.identifier, p.aliquot, p.step)
            s = '{} ({})'.format(s, rid)

        return s
Пример #30
0
class meas_ExtractionTable(Base, BaseMixin):
    # extract_value = deferred(Column(Float))
    # extract_duration = deferred(Column(Float))
    # cleanup_duration = deferred(Column(Float))

    # extract_units = deferred(stringcolumn(5))

    extract_value = Column(Float)
    extract_duration = Column(Float)
    cleanup_duration = Column(Float)

    extract_units = stringcolumn(5)

    weight = deferred(Column(Float))
    sensitivity_multiplier = deferred(Column(Float))
    is_degas = deferred(Column(Boolean))

    beam_diameter = Column(Float)
    pattern = stringcolumn(100)
    ramp_rate = Column(Float)
    ramp_duration = Column(Float)

    mask_position = deferred(Column(Float))
    mask_name = deferred(stringcolumn(100))
    attenuator = deferred(Column(Float))
    reprate = deferred(Column(Float))
    response_blob = deferred(Column(BLOB))
    output_blob = deferred(Column(BLOB))

    sensitivity_id = foreignkey('gen_SensitivityTable')
    extract_device_id = foreignkey('gen_ExtractionDeviceTable')
    script_id = foreignkey('meas_ScriptTable')
    experiment_blob_id = foreignkey('meas_ScriptTable')
    image_id = foreignkey('med_ImageTable')

    analysis = relationship('meas_AnalysisTable',
                            uselist=False,
                            backref='extraction')
    positions = relationship('meas_PositionTable', backref='extraction')
    snapshots = relationship('med_SnapshotTable', backref='extraction')
Пример #31
0
 def analysis_id(self):
     return foreignkey('meas_AnalysisTable')
Пример #32
0
 def user_id(self):
     return foreignkey('gen_UserTable')