Did I find the right examples for you? yes no

All Samples(16)  |  Call(10)  |  Derive(0)  |  Import(6)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/specimen.py   pyHMSA(Download)
from pyhmsa.spec.condition.specimen import \
    Specimen, SpecimenMultilayer, SpecimenLayer
from pyhmsa.spec.condition.composition import CompositionElemental
from pyhmsa.fileformat.xmlhandler.xmlhandler import _XMLHandler
from pyhmsa.fileformat.xmlhandler.condition.composition import CompositionElementalXMLHandler
    def _parse_composition(self, element):
        subelement = element.find('Composition')
        if subelement is None:
            return CompositionElemental("wt%")
        return self._handler_composition.parse(subelement)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/composition.py   pyHMSA(Download)
 
# Local modules.
from pyhmsa.spec.condition.composition import CompositionElemental
from pyhmsa.fileformat.xmlhandler.xmlhandler import _XMLHandler
 
        unit = list(units)[0]
 
        composition = CompositionElemental(unit)
        composition.update(tmpcomposition)
        return composition

src/p/y/pyHMSA-0.1/pyhmsa/spec/condition/test_composition.py   pyHMSA(Download)
 
# Local modules.
from pyhmsa.spec.condition.composition import CompositionElemental
 
# Globals and constants variables.
    def setUp(self):
        unittest.TestCase.setUp(self)
 
        self.comp = CompositionElemental('atoms', {11: 3})
        self.comp[13] = 1

src/p/y/pyHMSA-0.1/pyhmsa/spec/condition/test_specimen.py   pyHMSA(Download)
from pyhmsa.spec.condition.specimen import \
    Specimen, SpecimenLayer, SpecimenMultilayer
from pyhmsa.spec.condition.composition import CompositionElemental
 
# Globals and constants variables.
    def testcomposition(self):
        comp = CompositionElemental('atoms')
        comp[11] = 3
        comp[13] = 1
        comp[9] = 6
    def testpickle(self):
        self.spc.description = 'Natural cryolite standard'
        self.spc.origin = 'Kitaa, Greenland'
        self.spc.formula = 'Na3AlF6'
        comp = CompositionElemental('atoms')
    def testcomposition(self):
        comp = CompositionElemental('wt%')
        comp[6] = 100.0
        self.layer.composition = comp
        self.assertAlmostEqual(100.0, self.layer.composition[6], 4)
    def testpickle(self):
        self.layer.name = 'Carbon coat'
        self.layer.thickness = 50.0
        self.layer.formula = 'C'
        comp = CompositionElemental('wt%')

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/test_specimen.py   pyHMSA(Download)
     SpecimenXMLHandler, SpecimenMultilayerXMLHandler
from pyhmsa.spec.condition.specimen import Specimen, SpecimenMultilayer
from pyhmsa.spec.condition.composition import CompositionElemental
 
# Globals and constants variables.
        self.h = SpecimenXMLHandler(1.0)
 
        comp = CompositionElemental('atoms')
        comp.update({11: 3, 13: 1, 9: 6})
        self.obj = Specimen('Cryolite', 'Natural cryolite standard',
                            'Kitaa, Greenland', 'Na3AlF6')
 
        comp = CompositionElemental('wt%')
        comp.update({6: 100.0})
        self.obj.append_layer('Carbon coat', 50.0, 'C', comp)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/test_composition.py   pyHMSA(Download)
# Local modules.
from pyhmsa.fileformat.xmlhandler.condition.composition import CompositionElementalXMLHandler
from pyhmsa.spec.condition.composition import CompositionElemental
 
# Globals and constants variables.
        self.h = CompositionElementalXMLHandler(1.0)
 
        self.obj = CompositionElemental('atoms')
        self.obj[11] = 3
        self.obj[13] = 1