Esempio n. 1
0
 def test_unif_charge_slicer(self):
     '''Tests whether the charges are equally distributed between
     the charges. Only works if nslices divides macroparticlenumber
     '''
     unif_charge_slicer = UniformChargeSlicer(n_slices=self.nslices,
                                              z_cuts=self.z_cuts)
     slice_set = unif_charge_slicer.slice(self.bunch)
     p_per_slice = slice_set.n_macroparticles_per_slice
     if (self.macroparticlenumber % self.nslices == 0):
         self.assertTrue(check_elements_equal(p_per_slice),
                         'slices in UniformChargeSlicer don\'t have' +
                         'the same number of macroparticles in them')
     else :
         print('test_unif_charge_slicer() not run because ' +
               'uniform charge distribution is impossible ' +
               '(nparticles[' + str(self.macroparticlenumber) +
               '] % nslices[' + str(self.nslices) + '] != 0)')
Esempio n. 2
0
 def test_unif_charge_slicer(self):
     '''Tests whether the charges are equally distributed between
     the charges. Only works if nslices divides macroparticlenumber
     '''
     unif_charge_slicer = UniformChargeSlicer(n_slices=self.nslices,
                                              z_cuts=self.z_cuts)
     slice_set = unif_charge_slicer.slice(self.bunch)
     p_per_slice = slice_set.n_macroparticles_per_slice
     if (self.macroparticlenumber % self.nslices == 0):
         self.assertTrue(
             check_elements_equal(p_per_slice),
             'slices in UniformChargeSlicer don\'t have' +
             'the same number of macroparticles in them')
     else:
         print('test_unif_charge_slicer() not run because ' +
               'uniform charge distribution is impossible ' +
               '(nparticles[' + str(self.macroparticlenumber) +
               '] % nslices[' + str(self.nslices) + '] != 0)')
Esempio n. 3
0
 def test_sliceset_macroparticles(self):
     '''Tests whether the sum of all particles per slice
     is equal to the specified number of macroparticles when specifying
     z_cuts which lie outside of the bunch
     '''
     #create a bunch and a slice set encompassing the whole bunch
     z_min, z_max = -2., 2.
     bunch = self.create_bunch(zmin=z_min, zmax=z_max)
     z_cuts = (z_min - 1, z_max + 1)
     slice_set = UniformChargeSlicer(n_slices=self.nslices,
                                     z_cuts=z_cuts).slice(bunch)
     n_particles = sum(slice_set.n_macroparticles_per_slice)
     self.assertEqual(self.macroparticlenumber, n_particles,
                      'the SliceSet lost/added some particles')
Esempio n. 4
0
def run():
    #HELPERS
    def test_particle_indices_of_slice(bunch, slice_set):
        '''Get particle_indices_of_slice for specific slice index. Apply
        'inverse function' slice_index_of_particle to get back slice_index
        if everything works correctly.
        '''
        all_pass = True
        for i in xrange(slice_set.n_slices):
            pix_slice = slice_set.particle_indices_of_slice(i)
            six_pix = slice_set.slice_index_of_particle[pix_slice]
            if (six_pix != i).any():
                all_pass = False
        if not all_pass:
            print(
                '  Particle_indices_of_slice and slice_index_of_particle FAILED'
            )

    def slice_check_statistics(slice_set):
        '''Test if statistics functions are executable. No value
        checking
        '''
        slice_set.mean_x
        slice_set.sigma_x
        slice_set.epsn_x
        slice_set.mean_y
        slice_set.sigma_y
        slice_set.epsn_y
        slice_set.mean_z
        slice_set.sigma_z
        slice_set.epsn_z
        slice_set.mean_xp
        slice_set.mean_yp
        slice_set.mean_dp
        slice_set.sigma_dp

    def call_slice_set_attributes(bunch, slice_set, line_density_testing=True):
        # Call all the properties / attributes / methods.
        slice_set.z_cut_head
        slice_set.z_cut_tail
        slice_set.z_centers
        slice_set.n_slices
        slice_set.slice_widths
        slice_set.slice_positions
        slice_set.n_macroparticles_per_slice
        slice_set.particles_within_cuts
        slice_set.particle_indices_by_slice

        # if line_density_testing:
        #     slice_set.line_density_derivative_gauss()
        #     slice_set.line_density_derivative()

    def call_slicer_attributes():
        pass

    def clean_bunch(bunch):
        bunch.clean_slices()


# In[4]:
# Basic parameters.

    n_macroparticles = 500

    Q_x = 64.28
    Q_y = 59.31
    Q_s = 0.0020443

    C = 26658.883
    R = C / (2. * np.pi)

    alpha_x_inj = 0.
    alpha_y_inj = 0.
    beta_x_inj = 66.0064
    beta_y_inj = 71.5376
    alpha_0 = [0.0003225]

    # In[5]:

    # general simulation parameters
    n_particles = 10000

    # machine parameters
    circumference = 157.
    inj_alpha_x = 0
    inj_alpha_y = 0
    inj_beta_x = 5.9  # in [m]
    inj_beta_y = 5.7  # in [m]
    Qx = 5.1
    Qy = 6.1
    gamma_tr = 4.05
    alpha_c_array = [gamma_tr**-2]
    V_rf = 8e3  # in [V]
    harmonic = 1
    phi_offset = 0  # measured from aligned focussing phase (0 or pi)
    pipe_radius = 5e-2

    # beam parameters
    Ekin = 1.4e9  # in [eV]
    intensity = 1.684e12
    epsn_x = 2.5e-6  # in [m*rad]
    epsn_y = 2.5e-6  # in [m*rad]
    epsn_z = 1.2  # 4pi*sig_z*sig_dp (*p0/e) in [eVs]

    # calculations
    gamma = 1 + ee * Ekin / (m_p * c**2)
    beta = np.sqrt(1 - gamma**-2)
    eta = alpha_c_array[0] - gamma**-2
    if eta < 0:
        phi_offset = np.pi - phi_offset
    Etot = gamma * m_p * c**2 / ee
    p0 = np.sqrt(gamma**2 - 1) * m_p * c
    Q_s = np.sqrt(np.abs(eta) * V_rf / (2 * np.pi * beta**2 * Etot))
    beta_z = np.abs(eta) * circumference / (2 * np.pi * Q_s)
    turn_period = circumference / (beta * c)

    bunch = generators.generate_Gaussian6DTwiss(  # implicitly tests Gaussian and Gaussian2DTwiss as well
        n_particles,
        intensity,
        ee,
        m_p,
        circumference,
        gamma=gamma,
        alpha_x=inj_alpha_x,
        beta_x=inj_beta_x,
        epsn_x=epsn_x,
        alpha_y=inj_alpha_y,
        beta_y=inj_beta_y,
        epsn_y=epsn_y,
        beta_z=beta_z,
        epsn_z=epsn_z)

    # In[6]:

    # Uniform bin slicer
    n_slices = 10
    n_sigma_z = 2
    uniform_bin_slicer = UniformBinSlicer(n_slices, n_sigma_z)

    # Request slice_set from bunch with the uniform_bin_slicer config.
    bunch._slice_sets
    uniform_bin_slice_set = bunch.get_slices(uniform_bin_slicer,
                                             statistics=True)
    bunch._slice_sets

    uniform_bin_slicer.config
    call_slice_set_attributes(bunch, uniform_bin_slice_set)
    #call_slicer_attributes(uniform_bin_slice_set)

    # Let bunch remove the slice_set.
    bunch.clean_slices()
    bunch._slice_sets

    # In[7]:

    # Uniform charge slicer
    n_slices = 10
    n_sigma_z = 2

    clean_bunch(bunch)

    uniform_charge_slicer = UniformChargeSlicer(n_slices, n_sigma_z)
    uniform_charge_slice_set = bunch.get_slices(uniform_charge_slicer,
                                                statistics=True)
    uniform_charge_slice_set.mode
    uniform_charge_slicer.config
    call_slice_set_attributes(bunch,
                              uniform_charge_slice_set,
                              line_density_testing=False)

    try:
        call_slice_set_attributes(bunch,
                                  uniform_charge_slice_set,
                                  line_density_testing=True)
    except ModeIsNotUniformBin as e:
        pass

    # In[8]:

    # Other cases. When are slicers equal?
    n_slices = 10
    n_sigma_z = 2
    uniform_bin_slicer = UniformBinSlicer(n_slices, n_sigma_z)
    uniform_charge_slicer = UniformChargeSlicer(n_slices, n_sigma_z)

    # In[9]:

    # Other cases. When are slicers equal?
    n_slices = 10
    n_sigma_z = 2
    uniform_bin_slicer = UniformBinSlicer(n_slices, n_sigma_z)
    uniform_bin_slicer_2 = UniformBinSlicer(n_slices, n_sigma_z)

    # In[10]:

    # Does bunch slice_set management work?
    n_slices = 10
    n_sigma_z = 2

    clean_bunch(bunch)

    uniform_charge_slicer = UniformChargeSlicer(n_slices, n_sigma_z)
    uniform_bin_slicer = UniformBinSlicer(n_slices, n_sigma_z)

    uniform_charge_slice_set = bunch.get_slices(uniform_charge_slicer)
    uniform_bin_slice_set = bunch.get_slices(uniform_bin_slicer)
    uniform_charge_slice_set = bunch.get_slices(uniform_charge_slicer)

    bunch.clean_slices()

    # In[11]:

    # Old method update_slices should give RuntimeError.
    n_slices = 10
    n_sigma_z = 2

    clean_bunch(bunch)
    uniform_charge_slicer = UniformChargeSlicer(n_slices, n_sigma_z)

    # In[12]:

    # beam parameters attached to SliceSet?
    n_slices = 10
    n_sigma_z = 2

    clean_bunch(bunch)

    slicer = UniformBinSlicer(n_slices, n_sigma_z)
    slices = bunch.get_slices(slicer)

    beam_parameters = slicer.extract_beam_parameters(bunch)

    for p_name, p_value in beam_parameters.iteritems():
        pass

    # In[14]:

    # CASE I
    # UniformBinSlicer, no longitudinal cut.
    n_slices = 10
    n_sigma_z = None
    uniform_bin_slicer = UniformBinSlicer(n_slices, n_sigma_z)

    clean_bunch(bunch)

    bunch._slice_sets

    # Request slice_set from bunch with the uniform_bin_slicer config.
    uniform_bin_slice_set = bunch.get_slices(uniform_bin_slicer)
    bunch._slice_sets

    # In[15]:

    # CASE II
    # UniformBinSlicer, n_sigma_z = 1
    n_slices = 10
    n_sigma_z = 1
    uniform_bin_slicer = UniformBinSlicer(n_slices, n_sigma_z)

    clean_bunch(bunch)

    bunch._slice_sets

    # Request slice_set from bunch with the uniform_bin_slicer config.
    uniform_bin_slice_set = bunch.get_slices(uniform_bin_slicer)
    bunch._slice_sets

    # In[16]:

    # CASE II b.
    # UniformBinSlicer, set z_cuts
    n_slices = 10
    z_cuts = (-0.05, 0.15)
    uniform_bin_slicer = UniformBinSlicer(n_slices, z_cuts=z_cuts)

    clean_bunch(bunch)

    bunch._slice_sets

    # Request slice_set from bunch with the uniform_bin_slicer config.
    uniform_bin_slice_set = bunch.get_slices(uniform_bin_slicer)
    bunch._slice_sets

    # In[18]:

    # CASE III
    # UniformChargeSlicer, no longitudinal cut.
    n_slices = 10
    n_sigma_z = None
    uniform_charge_slicer = UniformChargeSlicer(n_slices, n_sigma_z)

    clean_bunch(bunch)

    bunch._slice_sets

    # Request slice_set from bunch with the uniform_charge_slicer config.
    bunch.get_slices(uniform_charge_slicer)
    bunch._slice_sets
Esempio n. 5
0
def run():
    def track_n_save(bunch, map_):
        mean_x = np.empty(n_turns)
        mean_y = np.empty(n_turns)
        sigma_z = np.empty(n_turns)

        for i in xrange(n_turns):
            mean_x[i] = bunch.mean_x()
            mean_y[i] = bunch.mean_y()
            sigma_z[i] = bunch.sigma_z()

            for m_ in map_:
                m_.track(bunch)

        return mean_x, mean_y, sigma_z

    def my_fft(data):
        t = np.arange(len(data))
        fft = np.fft.rfft(data)
        fft_freq = np.fft.rfftfreq(t.shape[-1])

        return fft_freq, np.abs(fft.real)

    def generate_bunch(n_macroparticles, alpha_x, alpha_y, beta_x, beta_y,
                       linear_map):

        intensity = 1.05e11
        sigma_z = 0.059958
        gamma = 3730.26
        p0 = np.sqrt(gamma**2 - 1) * m_p * c

        beta_z = (linear_map.eta(dp=0, gamma=gamma) *
                  linear_map.circumference / (2 * np.pi * linear_map.Q_s))

        epsn_x = 3.75e-6  # [m rad]
        epsn_y = 3.75e-6  # [m rad]
        epsn_z = 4 * np.pi * sigma_z**2 * p0 / (beta_z * e)

        bunch = generators.generate_Gaussian6DTwiss(
            macroparticlenumber=n_macroparticles,
            intensity=intensity,
            charge=e,
            gamma=gamma,
            mass=m_p,
            circumference=C,
            alpha_x=alpha_x,
            beta_x=beta_x,
            epsn_x=epsn_x,
            alpha_y=alpha_y,
            beta_y=beta_y,
            epsn_y=epsn_y,
            beta_z=beta_z,
            epsn_z=epsn_z)
        # print ('bunch sigma_z=' + bunch.sigma_z())

        return bunch

    def track_n_show(bunch, slicer, map_woWakes, wake_field):
        fig, ((ax1, ax2)) = plt.subplots(2, 1, figsize=(16, 16))

        xp_diff = np.zeros(n_macroparticles)

        for i in xrange(n_turns):
            for m_ in map_woWakes:
                m_.track(bunch)

            # Dipole X kick.
            if i == (n_turns - 1):
                xp_old = bunch.xp.copy()
            wake_field.track(bunch)

            if i == (n_turns - 1):
                xp_diff[:] = bunch.xp[:] - xp_old[:]

        # Plot bunch.z vs. slice index of particle. Mark particles within
        # z cuts in green.
        nsigmaz_lbl = ' (nsigmaz =' + str(n_sigma_z) + ')'

        slice_set = bunch.get_slices(slicer)
        pidx = slice_set.particles_within_cuts
        slidx = slice_set.slice_index_of_particle

        z_cut_tail, z_cut_head = slice_set.z_cut_tail, slice_set.z_cut_head

    # In[4]:
    # Basic parameters.
    n_turns = 10
    n_segments = 1
    n_macroparticles = 50

    Q_x = 64.28
    Q_y = 59.31
    Q_s = 0.0020443

    C = 26658.883
    R = C / (2. * np.pi)

    alpha_x_inj = 0.
    alpha_y_inj = 0.
    beta_x_inj = 66.0064
    beta_y_inj = 71.5376
    alpha_0 = [0.0003225]

    #waketable filename
    fn = os.path.join(os.path.dirname(__file__), 'wake_table.dat')
    # In[5]:

    # Parameters for transverse map.
    s = np.arange(0, n_segments + 1) * C / n_segments

    alpha_x = alpha_x_inj * np.ones(n_segments)
    beta_x = beta_x_inj * np.ones(n_segments)
    D_x = np.zeros(n_segments)

    alpha_y = alpha_y_inj * np.ones(n_segments)
    beta_y = beta_y_inj * np.ones(n_segments)
    D_y = np.zeros(n_segments)

    # In[6]:

    # In[7]:

    # In[8]:

    # CASE TEST SETUP
    trans_map = TransverseMap(s, alpha_x, beta_x, D_x, alpha_y, beta_y, D_y,
                              Q_x, Q_y)
    long_map = LinearMap(alpha_0, C, Q_s)

    bunch = generate_bunch(n_macroparticles, alpha_x_inj, alpha_y_inj,
                           beta_x_inj, beta_y_inj, long_map)

    # In[9]:

    # CASE I
    # Transverse and long. tracking (linear), and wakes from WakeTable source.
    # DIPOLE X, UniformBinSlicer

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    wake_file_columns = [
        'time', 'dipole_x', 'no_dipole_y', 'no_quadrupole_x',
        'no_quadrupole_y', 'no_dipole_xy', 'no_dipole_yx'
    ]
    table = WakeTable(fn,
                      wake_file_columns,
                      printer=SilentPrinter(),
                      warningprinter=SilentPrinter())
    wake_field = WakeField(uniform_bin_slicer, table)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[10]:

    # CASE II
    # Transverse and long. tracking (linear), and wakes from WakeTable source.
    # DIPOLE X, UniformChargeSlicer

    n_sigma_z = 2
    n_slices = 15
    uniform_charge_slicer = UniformChargeSlicer(n_slices=n_slices,
                                                n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    wake_file_columns = [
        'time', 'dipole_x', 'no_dipole_y', 'no_quadrupole_x',
        'no_quadrupole_y', 'no_dipole_xy', 'no_dipole_yx'
    ]
    table = WakeTable(fn,
                      wake_file_columns,
                      printer=SilentPrinter(),
                      warningprinter=SilentPrinter())
    wake_field = WakeField(uniform_charge_slicer, table)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[11]:

    # CASE III
    # Transverse and long. tracking (linear), and wakes from WakeTable source.
    # Quadrupole X, UniformChargeSlicer

    n_sigma_z = 2
    n_slices = 15
    uniform_charge_slicer = UniformChargeSlicer(n_slices=n_slices,
                                                n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    wake_file_columns = [
        'time', 'no_dipole_x', 'no_dipole_y', 'quadrupole_x',
        'no_quadrupole_y', 'no_dipole_xy', 'no_dipole_yx'
    ]
    table = WakeTable(fn,
                      wake_file_columns,
                      printer=SilentPrinter(),
                      warningprinter=SilentPrinter())
    wake_field = WakeField(uniform_charge_slicer, table)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[12]:

    # CASE IV
    # Transverse and long. tracking (linear), and wakes from WakeTable source.
    # Quadrupole X, UniformBinSlicer

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    wake_file_columns = [
        'time', 'no_dipole_x', 'no_dipole_y', 'quadrupole_x',
        'no_quadrupole_y', 'no_dipole_xy', 'no_dipole_yx'
    ]
    table = WakeTable(fn,
                      wake_file_columns,
                      printer=SilentPrinter(),
                      warningprinter=SilentPrinter())
    wake_field = WakeField(uniform_bin_slicer, table)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[15]:

    # CASE V
    # Transverse and long. tracking (linear),
    # Resonator circular

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    reson_circ = CircularResonator(R_shunt=1e6, frequency=1e8, Q=1)
    wake_field = WakeField(uniform_bin_slicer, reson_circ)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[16]:

    # CASE V b.
    # Transverse and long. tracking (linear),
    # Several Resonators circular

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    reson_circ = CircularResonator(R_shunt=1e6, frequency=1e8, Q=1)
    reson_circ2 = CircularResonator(R_shunt=1e6, frequency=1e9, Q=0.8)
    reson_circ3 = CircularResonator(R_shunt=5e6, frequency=1e6, Q=0.2)

    wake_field = WakeField(uniform_bin_slicer, reson_circ, reson_circ2,
                           reson_circ3)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[17]:

    # CASE V c.
    # Transverse and long. tracking (linear),
    # Resonator parallel_plates

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    reson_para = ParallelPlatesResonator(R_shunt=1e6, frequency=1e8, Q=1)
    wake_field = WakeField(uniform_bin_slicer, reson_para)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[18]:

    # CASE V d.
    # Transverse and long. tracking (linear),
    # Resonator w. longitudinal wake

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    reson = Resonator(R_shunt=1e6,
                      frequency=1e8,
                      Q=1,
                      Yokoya_X1=1,
                      Yokoya_X2=1,
                      Yokoya_Y1=1,
                      Yokoya_Y2=1,
                      switch_Z=True)
    wake_field = WakeField(uniform_bin_slicer, reson)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[19]:

    # CASE VI
    # Transverse and long. tracking (linear),
    # ResistiveWall circular

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    resis_circ = CircularResistiveWall(pipe_radius=5e-2,
                                       resistive_wall_length=C,
                                       conductivity=1e6,
                                       dt_min=1e-3)
    wake_field = WakeField(uniform_bin_slicer, resis_circ)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[20]:

    # CASE VI b.
    # Transverse and long. tracking (linear),
    # ResistiveWall parallel_plates

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    resis_para = ParallelPlatesResistiveWall(pipe_radius=5e-2,
                                             resistive_wall_length=C,
                                             conductivity=1e6,
                                             dt_min=1e-3)
    wake_field = WakeField(uniform_bin_slicer, resis_para)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)

    # In[21]:

    # CASE VII.
    # Transverse and long. tracking (linear),
    # Pass mixture of WakeSources to define WakeField.

    n_sigma_z = 2
    n_slices = 15
    uniform_bin_slicer = UniformBinSlicer(n_slices=n_slices,
                                          n_sigma_z=n_sigma_z)

    # Definition of WakeField as a composition of different sources.
    resis_circ = CircularResistiveWall(pipe_radius=5e-2,
                                       resistive_wall_length=C,
                                       conductivity=1e6,
                                       dt_min=1e-3)
    reson_para = ParallelPlatesResonator(R_shunt=1e6, frequency=1e8, Q=1)
    wake_file_columns = [
        'time', 'dipole_x', 'dipole_y', 'quadrupole_x', 'quadrupole_y',
        'dipole_xy', 'dipole_yx'
    ]
    table = WakeTable(fn,
                      wake_file_columns,
                      printer=SilentPrinter(),
                      warningprinter=SilentPrinter())

    wake_field = WakeField(uniform_bin_slicer, resis_circ, reson_para, table)

    trans_map = [m for m in trans_map]
    map_woWakes = trans_map + [long_map]

    track_n_save(bunch, map_woWakes)