Did I find the right examples for you? yes no

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/acquisition.py   pyHMSA(Download)
        value = np.uint32(len(obj.positions))
        attrib = type('MockAttribute', (object,), {'xmlname': 'PointCount'})
        subelements = self._convert_numerical_attribute(value, attrib)
        element.extend(subelements)
 

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/detector.py   pyHMSA(Download)
            value = layer.thickness
            attrib = type('MockAttribute', (object,), {'xmlname': 'Layer'})
            subelement = self._convert_numerical_attribute(value, attrib)[0]
            subelement.set('Material', layer.material)
            element.append(subelement)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/datum/datum.py   pyHMSA(Download)
    def _convert_data_offset(self, obj):
        attrib = type('MockAttribute', (object,), {'xmlname': 'DataOffset'})
        value = np.int64(self._hmsa_file.tell())
        return self._convert_numerical_attribute(value, attrib)
 
    def _convert_data_length(self, obj):
        attrib = type('MockAttribute', (object,), {'xmlname': 'DataLength'})
        value = np.int64(obj.size * obj.itemsize)
        return self._convert_numerical_attribute(value, attrib)
 
        attrib = type('MockAttribute', (object,), {'xmlname': 'Dimension'})
        for name, value in obj.datum_dimensions.items():
            subelement = self._convert_numerical_attribute(value, attrib)[0]
            subelement.set('Name', name)
            element.append(subelement)
        attrib = type('MockAttribute', (object,), {'xmlname': 'Dimension'})
        for name, value in obj.collection_dimensions.items():
            subelement = self._convert_numerical_attribute(value, attrib)[0]
            subelement.set('Name', name)
            element.append(subelement)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/region.py   pyHMSA(Download)
        value = obj.start_channel
        attrib = type('MockAttribute', (object,), {'xmlname': 'StartChannel'})
        subelements = self._convert_numerical_attribute(value, attrib)
        element.extend(subelements)
 
        value = obj.end_channel
        attrib = type('MockAttribute', (object,), {'xmlname': 'EndChannel'})
        subelements = self._convert_numerical_attribute(value, attrib)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/xmlhandler/condition/composition.py   pyHMSA(Download)
        attrib = type('MockAttribute', (object,), {'xmlname': 'Element'})
        for z, fraction in obj.items():
            subelement = self._convert_numerical_attribute(fraction, attrib)[0]
            subelement.set('Unit', obj.unit)
            subelement.set('Z', str(z))