Skip to content

Plotting Tests Improvements #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/tests/test-plots/plotting.mad
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ ref_file:close()
-- Change this for all plots to be changed
local plot_template = plot {
exec = false,
xrange = {-0.1, 3.6},
yrange = {-2.125, 2.125},
xrange = {-0.5, 4},
yrange = {-1.125, 1.125},
y2range = {-1e-14, 1e-14},
layonly = false,
wsizex = 1080,
Expand Down Expand Up @@ -217,6 +217,7 @@ local function run_test (cfg)

if ng_conv then
local dkd_x, dkd_y, ref_x, ref_y
create_seq(cfg)
repeat
-- Run track in TKT and DKD
local dkd_tr, _ = trk_ref { model = "DKD" }
Expand Down
17 changes: 9 additions & 8 deletions tests/tests/test-plots/test-plots.mad
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ local ref_cfg = object "ref" {
local function testQUAD (x_coord, y_coord)
local cfg = ref_cfg "quad" {
elm = [[
elm: QUADRUPOLE, at=0.75, l=1.5, k1= ${bdir}*0.5, fringe=0;
elm2: QUADRUPOLE, at=2.75, l=1.5, k1=-1*${bdir}*0.5, fringe=0;
elm: QUADRUPOLE, at=0.75, l=1.5, k1= ${bdir}*0.5, k1s= ${bdir}*0.05, fringe=0;
elm2: QUADRUPOLE, at=2.75, l=1.5, k1=-1*${bdir}*0.5, k1s=-1*${bdir}*0.05, fringe=0;
]],

seql = 3.5,
Expand All @@ -62,16 +62,16 @@ end
local function testSBEND (x_coord, y_coord)
local cfg = ref_cfg "sbend" {
elm = [[
elm: SBEND, at=0.75, l=1.5, angle= ${tdir}*pi/100, k0= ${bdir}*pi/100/1.5, kill_ent_fringe=true, kill_exi_fringe=true;
elm2: SBEND, at=2.75, l=1.5, angle=-1*${tdir}*pi/100, k0=-1*${bdir}*pi/100/1.5, kill_ent_fringe=true, kill_exi_fringe=true;
elm: SBEND, at=0.75, l=1.5, angle= ${tdir}*pi/25, k0= ${bdir}*pi/25/1.5, kill_ent_fringe=true, kill_exi_fringe=true;
elm2: SBEND, at=2.75, l=1.5, angle=-1*${tdir}*pi/25, k0=-1*${bdir}*pi/25/1.5, kill_ent_fringe=true, kill_exi_fringe=true;
]],

seql = 3.5,

tol = 1e2,
energy = 1,
nslice = 25,

max_nslice = 4e3,
plot_info = {
title = "Two SBENDs",
x_coord = x_coord,
Expand Down Expand Up @@ -185,8 +185,8 @@ end
local function testRBEND(x_coord, y_coord)
local cfg = ref_cfg "rbend" {
elm = [[
elm: RBEND, at=0.75, l=1.5, angle= ${tdir}*pi/100, k0= ${bdir}*pi/100/1.5, kill_ent_fringe=true, kill_exi_fringe=true, truerbend=true, ptcrbend=true, k2 = ${bdir}*0.2;
elm2: RBEND, at=2.75, l=1.5, angle=-1*${tdir}*pi/100, k0=-1*${bdir}*pi/100/1.5, kill_ent_fringe=true, kill_exi_fringe=true, truerbend=true, ptcrbend=true, k2 = -1*${bdir}*0.2;
elm: RBEND, at=0.75, l=1.5, angle= ${tdir}*pi/100, k0= ${bdir}*pi/100/1.5, kill_ent_fringe=true, kill_exi_fringe=true, true_rbend=true, k2 = ${bdir}*0.2;
elm2: RBEND, at=2.75, l=1.5, angle=-1*${tdir}*pi/100, k0=-1*${bdir}*pi/100/1.5, kill_ent_fringe=true, kill_exi_fringe=true, true_rbend=true, k2 = -1*${bdir}*0.2;
]],

seql = 3.5,
Expand Down Expand Up @@ -364,7 +364,8 @@ elm2: ELSEPARATOR, at=2.75, l=1.5, ex=-1*${bdir}*4, ey =-1*${bdir}*4, fringe=0;
]],

seql = 3.5,
ng_conv = false, -- Only one model for elsep
ng_conv = false, -- Only one model for else
ng_vs_ptc = false, -- PTC can't slice elseparators

tol = 1e2,
energy = 1,
Expand Down