def _sync(self, obj):

        for dbiso in obj.isotopes:
            r = dbiso.results[-1]
            uv = r.Iso
            ee = r.IsoEr

            bv = r.Bkgd
            be = r.BkgdEr

            key = dbiso.Label
            n = dbiso.NumCnts
            iso = Isotope(name=key, value=uv, error=ee, n=n)
            det =dbiso.detector
            iso.ic_factor=ufloat(det.ICFactor, det.ICFactorEr)
            iso.fit = r.fit.Label.lower()

            iso.baseline = Baseline(name=key,
                                    reverse_unpack=True,
                                    dbrecord=dbiso.baseline,
                                    unpack=True,
                                    unpacker=lambda x: x.PeakTimeBlob,
                                    error_type='SEM',
                                    fit='average')
            iso.baseline.set_filter_outliers_dict()

            iso.blank = Blank(name=key, value=bv, error=be)
            self.isotopes[key] = iso
Example #2
0
    def _sync(self, obj):
        for dbiso in obj.isotopes:
            r = dbiso.results[-1]
            uv = r.Iso
            ee = r.IsoEr

            bv = r.Bkgd
            be = r.BkgdEr

            key = dbiso.Label
            iso = Isotope(name=key, value=uv, error=ee)

            iso.baseline = Baseline(name=key,
                                    reverse_unpack=True,
                                    dbrecord=dbiso.baseline,
                                    unpacker=lambda x: x.PeakTimeBlob,
                                    fit='average_SEM')

            iso.blank = Blank(name=key, value=bv, error=be)
            self.isotopes[key] = iso
    def _sync(self, obj):

        arar = obj.araranalyses[-1]
        if arar:
            self.j = ufloat(arar.JVal, arar.JEr)
            self.age = arar.Age
            self.age_err = arar.ErrAge
            self.age_err_wo_j = arar.ErrAgeWOErInJ
            self.rad40_percent = ufloat(arar.PctRad, arar.PctRadEr)

        for dbiso in obj.isotopes:
            r = dbiso.results[-1]
            uv = r.Iso
            ee = r.IsoEr

            bv = r.Bkgd
            be = r.BkgdEr

            key = dbiso.Label
            n = dbiso.NumCnts
            iso = Isotope(name=key, value=uv, error=ee, n=n)
            det =dbiso.detector
            iso.ic_factor=ufloat(det.ICFactor, det.ICFactorEr)
            iso.fit = r.fit.Label.lower()

            iso.baseline = Baseline(name=key,
                                    reverse_unpack=True,
                                    dbrecord=dbiso.baseline,
                                    unpack=True,
                                    unpacker=lambda x: x.PeakTimeBlob,
                                    error_type='SEM',
                                    fit='average')
            iso.baseline.set_filter_outliers_dict()

            iso.blank = Blank(name=key, value=bv, error=be)
            self.isotopes[key] = iso