Esempio n. 1
0
    def __init__(self,
                 name=None,
                 template=None,
                 parameters=None,
                 conditions=None,
                 uids=None,
                 tags=None,
                 notes=None,
                 file_links=None):
        BaseObject.__init__(self,
                            name=name,
                            uids=uids,
                            tags=tags,
                            notes=notes,
                            file_links=file_links)
        HasParameters.__init__(self, parameters=parameters)
        HasConditions.__init__(self, conditions=conditions)

        self._ingredients = []

        # By default, a ProcessSpec is not linked to any MaterialSpec.
        # If a MaterialSpec is linked to this ProcessSpec,
        # then the field self._output_material will be automatically populated
        self._output_material = None

        HasTemplate.__init__(self, template=template)
Esempio n. 2
0
    def __init__(self,
                 name=None,
                 spec=None,
                 conditions=None,
                 parameters=None,
                 uids=None,
                 tags=None,
                 notes=None,
                 file_links=None,
                 source=None):
        BaseObject.__init__(self,
                            name=name,
                            uids=uids,
                            tags=tags,
                            notes=notes,
                            file_links=file_links)
        HasConditions.__init__(self, conditions)
        HasParameters.__init__(self, parameters)
        HasSource.__init__(self, source)

        self._ingredients = []

        self._spec = None
        self.spec = spec
        self._output_material = None
Esempio n. 3
0
    def __init__(self, material=None, process=None, name=None, labels=None,
                 mass_fraction=None, volume_fraction=None, number_fraction=None,
                 absolute_quantity=None,
                 spec=None, uids=None, tags=None, notes=None, file_links=None):
        BaseObject.__init__(self, name=name, uids=uids, tags=tags,
                            notes=notes, file_links=file_links)
        HasQuantities.__init__(self, mass_fraction, volume_fraction, number_fraction,
                               absolute_quantity)
        if name is not None:
            warnings.warn("The 'name' argument for ingredient runs is deprecated. "
                          "It may be overwritten by the name of this object's spec.",
                          DeprecationWarning)
        if labels is not None:
            warnings.warn("The 'labels' argument for ingredient runs is deprecated. "
                          "It may be overwritten by the labels of this object's spec.",
                          DeprecationWarning)
        self._material = None
        self._process = None
        self._spec = None
        self._labels = None

        self.material = material
        self.process = process
        self.labels = labels
        # this may overwrite name/labels
        self.spec = spec
Esempio n. 4
0
    def __init__(self,
                 name=None,
                 spec=None,
                 material=None,
                 properties=None,
                 conditions=None,
                 parameters=None,
                 uids=None,
                 tags=None,
                 notes=None,
                 file_links=None,
                 source=None):
        BaseObject.__init__(self,
                            name=name,
                            uids=uids,
                            tags=tags,
                            notes=notes,
                            file_links=file_links)
        HasProperties.__init__(self, properties)
        HasConditions.__init__(self, conditions)
        HasParameters.__init__(self, parameters)
        HasSource.__init__(self, source)

        self._material = None
        self.material = material
        self._spec = None
        self.spec = spec
Esempio n. 5
0
 def __init__(self, name=None, template=None,
              properties=None, process=None, uids=None, tags=None,
              notes=None, file_links=None):
     BaseObject.__init__(self, name=name, uids=uids, tags=tags, notes=notes,
                         file_links=file_links)
     self._properties = None
     self.properties = properties
     self._process = None
     self.process = process
     HasTemplate.__init__(self, template)
Esempio n. 6
0
    def __init__(self, material=None, process=None, name=None, labels=None,
                 mass_fraction=None, volume_fraction=None, number_fraction=None,
                 absolute_quantity=None,
                 spec=None, uids=None, tags=None, notes=None, file_links=None):
        BaseObject.__init__(self, name, uids, tags, notes=notes, file_links=file_links)
        HasQuantities.__init__(self, mass_fraction, volume_fraction, number_fraction,
                               absolute_quantity)

        self._material = None
        self._process = None
        self._spec = None
        self._labels = None

        self.material = material
        self.process = process
        self.spec = spec
        self.labels = labels
Esempio n. 7
0
 def __init__(self,
              name=None,
              template=None,
              parameters=None,
              conditions=None,
              uids=None,
              tags=None,
              notes=None,
              file_links=None):
     BaseObject.__init__(self,
                         name=name,
                         uids=uids,
                         tags=tags,
                         notes=notes,
                         file_links=file_links)
     HasParameters.__init__(self, parameters=parameters)
     HasConditions.__init__(self, conditions=conditions)
     HasTemplate.__init__(self, template=template)
Esempio n. 8
0
    def __init__(self,
                 material=None,
                 process=None,
                 name=None,
                 labels=None,
                 mass_fraction=None,
                 volume_fraction=None,
                 number_fraction=None,
                 absolute_quantity=None,
                 uids=None,
                 tags=None,
                 notes=None,
                 file_links=None):
        """
        Create an IngredientSpec object.

        Assigns a unique_label and other descriptive labels to a material used as an ingredient
        :param material: MaterialSpec that is being used as the ingredient
        :param process: ProcessSpec that uses this ingredient
        :param name: of the ingredient as used in the process, i.e. "the peanut butter"
        :param labels: that this ingredient belongs to, e.g. "spread" or "solvent"
        :param mass_fraction: fraction of the ingredients that is this input ingredient, by mass
        :param volume_fraction: fraction of the ingredients that is this ingredient, by volume
        :param number_fraction: fraction of the ingredients that is this ingredient, by number
        :param absolute_quantity: quantity of this ingredient in an absolute sense, e.g. 2 cups
        """
        BaseObject.__init__(self,
                            name,
                            uids,
                            tags,
                            notes=notes,
                            file_links=file_links)
        HasQuantities.__init__(self, mass_fraction, volume_fraction,
                               number_fraction, absolute_quantity)

        self._material = None
        self._process = None
        self._labels = None

        self.material = material
        self.process = process
        self.labels = labels
Esempio n. 9
0
    def __init__(self,
                 name=None,
                 spec=None,
                 process=None,
                 sample_type="unknown",
                 uids=None,
                 tags=None,
                 notes=None,
                 file_links=None):
        BaseObject.__init__(self,
                            name=name,
                            uids=uids,
                            tags=tags,
                            notes=notes,
                            file_links=file_links)
        self._process = None
        self._measurements = []
        self._sample_type = None
        self._spec = None

        self.spec = spec
        self.process = process
        self.sample_type = sample_type