Ejemplo n.º 1
0
 def _run_beam(self):
     cmd = ['mcvine instruments arcs 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)
     # moderator file
     from mcvine import resources
     moddat = os.path.join(
         resources.instrument('ARCS'), 'moderator',
         'source_sct521_bu_17_1.dat',
         )
     cmd += ['--moderator.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
Ejemplo n.º 2
0
 def _run_arcs_m2s(self):
     cmd = ['mcvine instruments arcs m2s']
     keys = [
         'fermi_chopper',
         'fermi_nu',
         'T0_nu',
         'E',
         'emission_time',
         'with_moderator_angling',
         ]
     cmd += self._buildCmdFromInventory(keys)
     cmd += ['--- -dump-pml=yes', '-h'] # , '>arcs-m2s.log']
     cmd = ' '.join(cmd)
     print('Generating pml for arcs beam instrument...')
     bpp._exec(cmd)
     print('done.')
     time.sleep(1)
     return
Ejemplo n.º 3
0
 def _run_arcs_m2s(self):
     cmd = ['mcvine instruments arcs m2s']
     keys = [
         'fermi_chopper',
         'fermi_nu',
         'T0_nu',
         'E',
         'emission_time',
         'with_moderator_angling',
         ]
     cmd += self._buildCmdFromInventory(keys)
     cmd += ['--- -dump-pml=yes', '-h'] # , '>arcs-m2s.log']
     cmd = ' '.join(cmd)
     print 'Generating pml for arcs beam instrument...'
     bpp._exec(cmd)
     print 'done.'
     time.sleep(1)
     return
Ejemplo n.º 4
0
 def _run_beam(self):
     cmd = ['mcvine instruments arcs 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
     moddat = os.path.join(
         resources.instrument('ARCS'), 'moderator',
         'source_sct521_bu_17_1.dat',
         )
     cmd += ['--moderator.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