コード例 #1
0
ファイル: __init__.py プロジェクト: McStasMcXtrace/MCViNE
def componentinfo(type, category=None, supplier=None):
    from mcni._find_component import find
    type, category, supplier = find(type, category=category, supplier=supplier)
    from mcni import componentinfo
    return componentinfo(type=type, category=category, supplier=supplier)
コード例 #2
0
 def test(self):
     'mcni: component factory'
     from mcni import componentfactory, componentinfo
     print 'mcni, sources, MonochromaticSource',  componentfactory( 'sources', 'MonochromaticSource'), componentinfo( 'sources', 'MonochromaticSource' )
     print 'mcni, sources, MonochromaticSource',  componentfactory( 'sources', 'MonochromaticSource', 'mcni'), componentinfo( 'sources', 'MonochromaticSource', 'mcni' )
     print 'mcstas2, sources, Source_simple',  componentfactory( 'sources', 'Source_simple', 'mcstas2'), componentinfo( 'sources', 'Source_simple', 'mcstas2' )
     return
コード例 #3
0
 def test(self):
     'mcni: component factory'
     print 'mcni, sources, MonochromaticSource',  componentfactory( 'sources', 'MonochromaticSource'), componentinfo( 'sources', 'MonochromaticSource' )
     print 'mcni, sources, MonochromaticSource',  componentfactory( 'sources', 'MonochromaticSource', 'mcni'), componentinfo( 'sources', 'MonochromaticSource', 'mcni' )
     return
コード例 #4
0
 def test2(self):
     'mcni: component factory for mcstas components'
     import mcstas2
     print 'mcstas2, sources, Source_simple',  componentfactory( 'sources', 'Source_simple', 'mcstas2'), componentinfo( 'sources', 'Source_simple', 'mcstas2' )
     return
コード例 #5
0
ファイル: __init__.py プロジェクト: mcvine/mcvine
def componentinfo(type, category=None, supplier=None):
    from mcni._find_component import find
    type, category, supplier = find(type, category=category, supplier=supplier)
    from mcni import componentinfo
    return  componentinfo(type=type, category=category, supplier=supplier)