Getting started

This chapter assumes that both Zgoubi and Zgoubidoo have been successfully installed. Furthermore, we recommend to follow this brief getting started guide using an interactive session, for example through iPython or Jupyter, as detailed in the installation guide.

A simple FODO cell

Creating the elements

2
3
4
import zgoubidoo
from zgoubidoo.commands import *

Generating the Zgoubi input

6
7
8
9
QF = Quadrupole()
QD = Quadrupole
D = Drift()

Running Zgoubi with Zgoubidoo

Complete code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Typical imports
import zgoubidoo
from zgoubidoo.commands import *

# Element definitions
QF = Quadrupole()
QD = Quadrupole
D = Drift()

# Input creation


# Running Zgoubi


# Processing results