Skip to content
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
Binary file modified tests/config/tl2/tl2.mat
Binary file not shown.
32 changes: 16 additions & 16 deletions tests/config/tl2/tl2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,63 +88,63 @@ devices:
name: CH1
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch1/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH2
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch2/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH3
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch3/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH4
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch4/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH5
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch5/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH6
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch6/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH7
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch7/Current
- class: pyaml.magnet.hcorrector.HCorrector
name: CH8
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/ch8/Current
Expand All @@ -153,63 +153,63 @@ devices:
name: CV0
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv0/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV1
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv1/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV3
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv3/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV4
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv4/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV5
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv5/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV6
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv6/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV7
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv7/Current
- class: pyaml.magnet.vcorrector.VCorrector
name: CV8
model:
class: pyaml.magnet.linear_model.LinearMagnetModel
calibration_factor: 161e-6
calibration_factor: 3.222e-3
unit: 1/m
hardware_unit: A
powerconverter: tl2/ps-c1/cv8/Current
8 changes: 4 additions & 4 deletions tests/tuning_tools/test_transfer_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def test_transfer_line():
orm_v = mat[9:, 8:]

assert numpy.allclose(
orm_h[8, :], [1.49746082, 3.11487458, 10.60522905, -0.84014865, -19.27774502, -14.92314963, 1.29287711, 1.60223207]
orm_h[8, :], [1.49217029, 3.11318219, 10.60494678, -0.82242986, -19.2814236, -14.92682822, 1.28503979, 1.60584401]
)
assert numpy.allclose(
orm_v[8, :], [10.95115436, 10.56436269, 16.43975007, 32.48697172, 12.7218589, 10.31009581, 10.46821268, 2.60568252]
orm_v[8, :], [10.95203344, 10.56524176, 16.43659334, 32.50321299, 12.72373742, 10.3122307, 10.47365958, 2.61214668]
)

tl2.design.tool.orm.save("tl2.json")
Expand All @@ -37,11 +37,11 @@ def test_transfer_line():
vcorr.strengths.set(vcorr.strengths.get() + std_kick * numpy.random.normal(size=len(vcorr)))

orbit = tl2.design.diagnostic.bpms.get("BPMS").positions
assert numpy.allclose(numpy.std(orbit.get(), axis=0), [1.78601145e-05, 3.57671504e-05])
assert numpy.allclose(numpy.std(orbit.get(), axis=0), [1.78288459e-05, 3.57986943e-05])

tl2.design.tool.orbit.correct()
tl2.design.tool.orbit.correct()

assert numpy.allclose(numpy.std(orbit.get(), axis=0), [7.50786048e-07, 7.26005222e-07])
assert numpy.allclose(numpy.std(orbit.get(), axis=0), [7.51291713e-07, 7.24545959e-07])

assert numpy.allclose(orbit.get()[2], tl2.design.diagnostic.bpm.get("BPM_QD5").positions.get())
Loading