Did I find the right examples for you? yes no

All Samples(19)  |  Call(11)  |  Derive(0)  |  Import(8)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/datafile.py   pyHMSA(Download)
 
# Local modules.
from pyhmsa.datafile import DataFile
 
from pyhmsa.fileformat.xmlhandler.header import HeaderXMLHandler
            self._update_status(0.1, 'Creating data file')
            if self.is_cancelled(): return
            datafile = DataFile(filepath, root.attrib['Version'])
 
            # Read

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/importer/importer.py   pyHMSA(Download)
 
# Local modules.
from pyhmsa.datafile import DataFile
from pyhmsa.util.monitorable import _Monitorable, _MonitorableThread
 
    def __init__(self, extra_datafile=None, search_home=True):
        _Monitorable.__init__(self)
 
        if extra_datafile is None:
            extra_datafile = DataFile()

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/importer/emsa.py   pyHMSA(Download)
from pyhmsa.fileformat.common.emsa import calculate_checksum
 
from pyhmsa.datafile import DataFile
from pyhmsa.spec.header import Header
from pyhmsa.spec.condition.probe import ProbeEM, ProbeTEM
 
            # Create data file
            datafile = DataFile()
 
            self._update_status(0.4, 'Extracting header')

src/p/y/pyHMSA-0.1/pyhmsa/test_datafile.py   pyHMSA(Download)
 
# Local modules.
from pyhmsa.datafile import DataFile
from pyhmsa.spec.datum.analysis import Analysis0D
from pyhmsa.spec.condition.elementalid import ElementalID
    def setUp(self):
        unittest.TestCase.setUp(self)
 
        self.datafile = DataFile()
 
    def testupdate(self):
        datafile = DataFile()
        datafile.header.title = 'Update'
        datafile.conditions['cond'] = ElementalID(13)
        datafile.data['datum'] = Analysis0D(1.0)

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/test_datafile.py   pyHMSA(Download)
from pyhmsa.fileformat.datafile import DataFileReader, DataFileWriter
 
from pyhmsa.datafile import DataFile
from pyhmsa.spec.datum.analysis import Analysis1D
from pyhmsa.spec.condition.instrument import Instrument
    def setUp(self):
        unittest.TestCase.setUp(self)
 
        self.datafile = DataFile()
        self.datafile.header.title = 'Breccia - EDS sum spectrum'

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/importer/test_importer.py   pyHMSA(Download)
# Local modules.
from pyhmsa.fileformat.importer.importer import _Importer, _ImporterThread
from pyhmsa.datafile import DataFile
 
# Globals and constants variables.
 
class ImporterThreadMock(_ImporterThread):
 
    def _run(self, filepath, *args, **kwargs):
        datafile = DataFile(filepath)
    def test_update_extra(self):
        extra_datafile = DataFile()
        extra_datafile.header.author = 'Me'
        imp = ImporterMock(extra_datafile, search_home=False)
 

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/exporter/test_exporter.py   pyHMSA(Download)
from pyhmsa.fileformat.exporter.exporter import _Exporter, _ExporterThread
 
from pyhmsa.datafile import DataFile
 
# Globals and constants variables.
    def testexport(self):
        filepath = os.path.join(self.tmpdir, 'test.abc')
        datafile = DataFile()
        datafile.header.title = 'test'
 

src/p/y/pyHMSA-0.1/pyhmsa/fileformat/exporter/test_emsa.py   pyHMSA(Download)
from pyhmsa.fileformat.exporter.emsa import ExporterEMSA
 
from pyhmsa.datafile import DataFile
from pyhmsa.spec.condition.detector import DetectorSpectrometerXEDS
from pyhmsa.spec.condition.calibration import CalibrationLinear
    def _create_datafile(self):
        datafile = DataFile()
 
        datafile.header.title = 'Breccia - EDS sum spectrum'
        datafile.header.date = datetime.date(2013, 7, 29)
        self.assertTrue(self.exp.can_export(datafile, filepath))
 
        datafile = DataFile()
        filepath = os.path.join(self.tmpdir, 'test.emsa')
        self.assertFalse(self.exp.can_export(datafile, filepath))