def __init__(self, an): self.tabular_adapter = DetectorICTabularAdapter() self.record_id = an.record_id isotopes = [an.isotopes[k] for k in an.isotope_keys if k.startswith(self._isotope_key)] detcols = get_columns(isotopes) self.tabular_adapter.columns = [('', 'name'), ('Intensity', 'intensity'), (PLUSMINUS_ONE_SIGMA, 'intensity_err')] + detcols # self.items = items self.items = make_items(an.isotopes)
def _calculate(self): if not self.lhs_runid: return db = self.dvc.db if self.rhs_runid: rhs_an = self._get_analysis(self.rhs_runid) self.rhs_items = make_items(rhs_an.isotopes) lhs_an = self._get_analysis(self.lhs_runid) self.lhs_items = make_items(lhs_an.isotopes) isotopes = [lhs_an.isotopes[k] for k in lhs_an.isotope_keys if k.startswith(self._isotope_key)] detcols = get_columns(isotopes) self.tabular_adapter.columns = [('', 'name'), ('Intensity', 'intensity')] + detcols self._make_results()
def _calculate(self): if not self.lhs_runid: return db = self.dvc.db with db.session_ctx(): if self.rhs_runid: rhs_an = self._get_analysis(self.rhs_runid) self.rhs_items = make_items(rhs_an.isotopes) lhs_an = self._get_analysis(self.lhs_runid) self.lhs_items = make_items(lhs_an.isotopes) isotopes = [lhs_an.isotopes[k] for k in lhs_an.isotope_keys if k.startswith(self._isotope_key)] detcols = get_columns(isotopes) self.tabular_adapter.columns = [('', 'name'), ('Intensity', 'intensity')] + detcols self._make_results()