Пример #1
0
def create_base_files(scaling, changes=None):
    framework = Framework('basefiles_' + str(scaling), overwrite=True)
    framework.loadSettings('FEBE_Single_L01.def')
    if not os.name == 'nt':
        framework.defineASTRACommand(scaling=scaling)
    framework.generator.number_of_particles = 2**(3 * scaling)
    if not changes is None:
        framework.load_changes_file(changes)
    framework.track()
Пример #2
0
def create_base_files(scaling, changes=None):
    framework = Framework('basefiles_' + str(scaling), overwrite=True)
    framework.loadSettings('afterglow.def')
    framework.generator.number_of_particles = 2**(3 * scaling)
    if not changes is None:
        framework.load_changes_file(changes)
    framework['S02'].prefix = '../../CLARA/basefiles_' + str(
        int(scaling)) + '/'
    framework.track(startfile='S02')
import os
import sys
sys.path.append(os.path.abspath(__file__ + '/../../../../'))
from SimulationFramework.Framework import *

ncpu = 20

framework = Framework('Short-240_Combined', clean=True)
framework.loadSettings('./Short-240_Combined.def')
framework.load_changes_file([
    './Elegant_Genesis/Short-240/nelder_mead_best_changes.yaml',
    './Elegant_Genesis/Short-240/transverse_best_changes.yaml'
])
framework.change_Lattice_Code('All', 'elegant')
# framework['S02'].prefix = '../basefiles_6/'
framework['S02'].sample_interval = 2**(1 * 3)
framework.save_changes_file(filename=framework.subdirectory + '/changes.yaml')
framework.track(startfile='S02', endfile='S07')

framework = Framework('Short-240_Separated', clean=True)
framework.loadSettings('./Short-240_Separated.def')
framework.load_changes_file([
    './Elegant_Genesis/Short-240/nelder_mead_best_changes.yaml',
    './Elegant_Genesis/Short-240/transverse_best_changes.yaml'
])
framework.change_Lattice_Code('All', 'elegant')
# framework['S02'].prefix = '../basefiles_6/'
framework['S02'].sample_interval = 2**(1 * 3)
framework.save_changes_file(filename=framework.subdirectory + '/changes.yaml')
framework.track(startfile='S02', endfile='S07')