Synrad tutorial: adding lattice functions
=
[BXY file documentation](https://molflow.web.cern.ch/node/119)
Reminder on lattice formulas:
![](https://codimd.web.cern.ch/uploads/upload_7acdab37f5b8a3dc559b459c467e04b4.png =x300)
![](https://codimd.web.cern.ch/uploads/upload_99120d9ce7f084830bfb96bc1abc1624.png)
# Adding BXY file to Region 1
This example modifies the gradient dipole from the [previous example](https://codimd.web.cern.ch/s/9D7mLLzNO).
Instead of ideal beam, change the parameters to the following:
- Emittance=6E-8cm (**attention: units are in cm**)
- V/H coupling: 20%
- BXY file: create and refer to it by its filename
![](https://codimd.web.cern.ch/uploads/upload_5cf5fd9487d0d5b1c46cfb05566537fa.png)
The BXY file is below:
![](https://codimd.web.cern.ch/uploads/upload_074ca93c93a115c239714346d94cc4ae.png)
`Z` means beam lattice functions are referenced by the Z coordinate
The following lines are all in `Z_coord BetaX(cm) BetaY(cm)` format, Synrad linearly interpolates between them. First and last values are kept outside the defined region (so the first line `0 100 100` is not necessary.)
The region below shows an increased beam size, as expected, at Z=30 and Z=50 (middle of first bend and middle of straight section)
![](https://codimd.web.cern.ch/uploads/upload_c341d63ce8a0c38ed43b3acbe8032438.png)