示例#1
0
        worker.intraSync()
        worker.sendrecv(totVoltage.induced_voltage, tracker.rf_voltage)
    else:
        if (approx == 0) or (approx == 2):
            totVoltage.induced_voltage_sum()
        elif (approx == 1) and (turn % n_turns_reduce == 0):
            totVoltage.induced_voltage_sum()
        tracker.pre_track()
        
    tracker.track_only()

    if (args['monitor'] > 0) and (turn % args['monitor'] == 0):
        beam.statistics()
        beam.gather_statistics()
        profile.fwhm_multibunch(n_bunches, bunch_spacing_buckets,
                                rf.t_rf[0, turn], bucket_tolerance=0,
                                shiftX=rf.phi_rf[0, turn]/rf.omega_rf[0, turn])
        if worker.isMaster:
            slicesMonitor.track(turn)

    worker.DLB(turn, beam)


beam.gather()
end_t = time.time()

timing.report(total_time=1e3*(end_t-start_t),
              out_dir=args['timedir'],
              out_file='worker-{}.csv'.format(worker.rank))

worker.finalize()
示例#2
0
                profile.bin_centers -= delta
                profile.cut_left -= delta
                profile.cut_right -= delta
                profile.edges -= delta

                # shift time_offset of phase loop as well, so that it starts at correct
                # bin_center corresponding to time_offset
                if phaseLoop.alpha != 0:
                    phaseLoop.time_offset -= delta

    if (args['monitor'] > 0) and (turn % args['monitor'] == 0):
        beam.statistics()
        beam.gather_statistics()
        profile.fwhm_multibunch(n_bunches,
                                bunch_spacing,
                                rf_station.t_rf[0, turn],
                                bucket_tolerance=0)
        # shiftX=rf_station.phi_rf[0, turn]/rf_station.omega_rf[0, turn])

        if worker.isMaster:
            # profile.fwhm()
            slicesMonitor.track(turn)

    worker.DLB(turn, beam)

beam.gather()
end_t = time.time()
mpiprint('Total time: ', end_t - start_t)

timing.report(total_time=1e3 * (end_t - start_t),
              out_dir=args['timedir'],
示例#3
0
                        tracker.rf_voltage)
    else:
        if (approx == 0) or (approx == 2):
            PS_longitudinal_intensity.induced_voltage_sum()
        elif (approx == 1) and (turn % n_turns_reduce == 0):
            PS_longitudinal_intensity.induced_voltage_sum()
        # PS_longitudinal_intensity.induced_voltage_sum()
        tracker.pre_track()

    tracker.track_only()

    if (args['monitor'] > 0) and (turn % args['monitor'] == 0):
        beam.statistics()
        beam.gather_statistics()
        profile.fwhm_multibunch(n_bunches,
                                bunch_spacing_buckets,
                                rf_params.t_rf[0, turn],
                                bucket_tolerance=0)
        # shiftX=rf_params.phi_rf[0, turn]/rf_params.omega_rf[0, turn])

        if worker.isMaster:
            # profile.fwhm()
            slicesMonitor.track(turn)

    worker.DLB(turn, beam)

beam.gather()
end_t = time.time()
timing.report(total_time=1e3 * (end_t - start_t),
              out_dir=args['timedir'],
              out_file='worker-{}.csv'.format(worker.rank))