Ejemplo n.º 1
0
 def start(self, doc):
     super(SmartScalarPlot, self).start(doc)
     self.clear()
     indeps = fs.get_indeps(doc, exclude={"time"})
     if len(indeps) == 1:
         self.callback = LivePlot(self.y, x=indeps.pop(), ax=self.ax, **self.kwargs)
     elif len(indeps) == 2:
         self.callback = LiveScatter(indeps.pop(), indeps.pop(), self.y, ax=self.ax, **self.kwargs)
     else:
         self.callback = LivePlot(self.y, ax=self.ax, **self.kwargs)
     self.callback.start(doc)
Ejemplo n.º 2
0
 def start(self, doc, _md=None):
     self.cache = dict()
     self.cache["start"] = doc
     self.cache["ai"] = from_start.query_ai(
         doc, calibration_md_key=self.config.calibration_md_key)
     self.cache["bt_info"] = from_start.query_bt_info(
         doc,
         composition_key=self.config.composition_key,
         wavelength_key=self.config.wavelength_key,
         default_composition="Ni")
     self.cache["indeps"] = from_start.get_indeps(doc, exclude={"time"})
     new_start = dict(**doc, an_config=self.config.to_dict())
     super(AnalysisStream, self).start(new_start)
Ejemplo n.º 3
0
 def start(self, doc, _md=None):
     self.cache = dict()
     self.cache["start"] = doc
     self.cache["ai"] = from_start.query_ai(
         doc, calibration_md_key=self.config.calibration_md_key)
     self.cache["bt_info"] = from_start.query_bt_info(
         doc,
         composition_key=self.config.composition_key,
         wavelength_key=self.config.wavelength_key,
         default_composition="Ni")
     self.cache["indeps"] = from_start.get_indeps(doc, exclude={"time"})
     # load user config
     user_config = UserConfig(allow_no_value=True)
     user_config.read_start_doc(doc)
     self.cache["user_config"] = user_config
     # create new start
     new_start = dict(**doc,
                      an_config=self.config.to_dict(),
                      pdfstream_version=pdfstream.__version__)
     super(AnalysisStream, self).start(new_start)
Ejemplo n.º 4
0
 def start(self, doc):
     self.start_doc = doc
     self._indeps = fs.get_indeps(doc, exclude={"time"})
     super(ArrayExporter, self).start(doc)
Ejemplo n.º 5
0
 def start(self, doc):
     self._indeps = fs.get_indeps(doc, exclude={"time"})
     return super(MyTiffSerializer, self).start(doc)