def compileFile(self, filename):
        category = self.category
        if not category:
            self.help()
            print
            print "** Error: component category was not specified."
            return

        from mcstas2 import wrapcomponent
        wrapcomponent(filename, category)
        return
示例#2
0
 def test4(self):
     'wrapcomponent'
     componentname = 'E_monitor'
     componentfile = '%s.comp' % componentname
     category = 'monitors'
     mcstas2.wrapcomponent( componentfile, category )
     from mcstas2.components import componentfactory
     emonfac = componentfactory( category, componentname )
     emon = emonfac(
         'emon',
         nchan=20, filename="e.dat",
         xmin=-0.2, xmax=0.2,
         ymin=-0.2, ymax=0.2,
         Emin=50., Emax=60.)
     if interactive:
         help( emonfac )
     return
示例#3
0
 def test4(self):
     'wrapcomponent'
     componentname = 'E_monitor'
     componentfile = '%s.comp' % componentname
     category = 'monitors'
     mcstas2.wrapcomponent(componentfile, category)
     from mcstas2.components import componentfactory
     emonfac = componentfactory(category, componentname)
     emon = emonfac('emon',
                    nchan=20,
                    filename="e.dat",
                    xmin=-0.2,
                    xmax=0.2,
                    ymin=-0.2,
                    ymax=0.2,
                    Emin=50.,
                    Emax=60.)
     if interactive:
         help(emonfac)
     return
示例#4
0
def compileFile(filename, category):

    from mcstas2 import wrapcomponent
    wrapcomponent(filename, category)
    return
示例#5
0
def compileFile(filename, category):

    from mcstas2 import wrapcomponent
    wrapcomponent(filename, category)
    return