示例#1
0
 def _run_beam(self):
     cmd = ['mcvine instruments sequoia mod2sample']
     keys = ['ncount']
     cmd += self._buildCmdFromInventory(keys)
     # buffer_size
     buffer_size = self.inventory.buffer_size
     if not buffer_size:
         buffer_size = int(self.inventory.ncount / 10)
     cmd += ['--buffer_size=%s' % buffer_size]
     # output-dir
     cmd.append('--output-dir=%s' % self.m2sout)
     from mcvine import resources as res
     moddat = os.path.join(
         res.instrument('SEQUOIA'),
         'moderator',
         'source_sct521_bu_17_1.dat',
     )
     cmd += ['-mod.S_filename=%s' % moddat]
     # mpi nodes
     from mcni.pyre_support.MpiApplication import mpi_launcher_choice
     if self.inventory.nodes:
         cmd += [
             '--%s.nodes=%s' % (mpi_launcher_choice, self.inventory.nodes)
         ]
     cmd = ' '.join(cmd)
     open('run-m2s.sh', 'wt').write(cmd)  # save the running command
     bpp._exec(cmd)
     return
示例#2
0
文件: Beam.py 项目: mcvine/mcvine
 def _run_sequoia_m2s(self):
     cmd = ["mcvine instruments sequoia m2s"]
     keys = ["fermi_chopper", "fermi_nu", "T0_nu", "E", "emission_time"]
     cmd += self._buildCmdFromInventory(keys)
     cmd += ["--- -dump-pml=yes", "-h"]  # , '>sequoia-m2s.log']
     cmd = " ".join(cmd)
     print "Generating pml for sequoia beam instrument..."
     bpp._exec(cmd)
     print "done."
     time.sleep(1)
     return
示例#3
0
 def _run_sequoia_m2s(self):
     cmd = ['mcvine instruments sequoia m2s']
     keys = [
         'fermi_chopper',
         'fermi_nu',
         'T0_nu',
         'E',
         'emission_time',
     ]
     cmd += self._buildCmdFromInventory(keys)
     cmd += ['--- -dump-pml=yes', '-h']  # , '>sequoia-m2s.log']
     cmd = ' '.join(cmd)
     print('Generating pml for sequoia beam instrument...')
     bpp._exec(cmd)
     print('done.')
     time.sleep(1)
     return
示例#4
0
文件: Beam.py 项目: mcvine/mcvine
    def _run_beam(self):
        cmd = ["mcvine instruments sequoia mod2sample"]
        keys = ["ncount"]
        cmd += self._buildCmdFromInventory(keys)
        cmd += ["-buffer_size=%s" % int(self.inventory.ncount / 10)]
        cmd.append("--output-dir=%s" % self.m2sout)
        from mcvine import resources as res

        moddat = os.path.join(res.instrument("SEQUOIA"), "moderator", "source_sct521_bu_17_1.dat")
        cmd += ["-mod.S_filename=%s" % moddat]
        # mpi nodes
        from mcni.pyre_support.MpiApplication import mpi_launcher_choice

        if self.inventory.nodes:
            cmd += ["--%s.nodes=%s" % (mpi_launcher_choice, self.inventory.nodes)]
        cmd = " ".join(cmd)
        open("run-m2s.sh", "wt").write(cmd)  # save the running command
        bpp._exec(cmd)
        return