Skip to content

Commit bab629c

Browse files
Rename PGM to PlaneGratingMonochromator (#1676)
1 parent c4df0a0 commit bab629c

File tree

14 files changed

+55
-38
lines changed

14 files changed

+55
-38
lines changed
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
from dodal.common.beamlines.beamline_utils import device_factory
22
from dodal.devices.i05.enums import Grating
3-
from dodal.devices.pgm import PGM
3+
from dodal.devices.pgm import PlaneGratingMonochromator
44
from dodal.utils import BeamlinePrefix
55

66
PREFIX = BeamlinePrefix("i05", "I")
77

88

99
@device_factory()
10-
def pgm() -> PGM:
11-
return PGM(prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:", grating=Grating)
10+
def pgm() -> PlaneGratingMonochromator:
11+
return PlaneGratingMonochromator(
12+
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
13+
grating=Grating,
14+
)

src/dodal/beamlines/b07.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from dodal.devices.b07 import Grating, LensMode, PsuMode
66
from dodal.devices.electron_analyser import EnergySource
77
from dodal.devices.electron_analyser.specs import SpecsDetector
8-
from dodal.devices.pgm import PGM
8+
from dodal.devices.pgm import PlaneGratingMonochromator
99
from dodal.devices.synchrotron import Synchrotron
1010
from dodal.log import set_beamline as set_log_beamline
1111
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -22,8 +22,11 @@ def synchrotron() -> Synchrotron:
2222

2323

2424
@device_factory()
25-
def pgm() -> PGM:
26-
return PGM(prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:", grating=Grating)
25+
def pgm() -> PlaneGratingMonochromator:
26+
return PlaneGratingMonochromator(
27+
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
28+
grating=Grating,
29+
)
2730

2831

2932
@device_factory()

src/dodal/beamlines/b07_1.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
)
99
from dodal.devices.electron_analyser import EnergySource
1010
from dodal.devices.electron_analyser.specs import SpecsDetector
11-
from dodal.devices.pgm import PGM
11+
from dodal.devices.pgm import PlaneGratingMonochromator
1212
from dodal.devices.synchrotron import Synchrotron
1313
from dodal.log import set_beamline as set_log_beamline
1414
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -25,8 +25,11 @@ def synchrotron() -> Synchrotron:
2525

2626

2727
@device_factory()
28-
def pgm() -> PGM:
29-
return PGM(prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:", grating=Grating)
28+
def pgm() -> PlaneGratingMonochromator:
29+
return PlaneGratingMonochromator(
30+
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
31+
grating=Grating,
32+
)
3033

3134

3235
# Connect will work again after this work completed

src/dodal/beamlines/i05.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from dodal.beamline_specific_utils.i05_shared import pgm as i05_pgm
22
from dodal.common.beamlines.beamline_utils import device_factory
33
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
4-
from dodal.devices.pgm import PGM
4+
from dodal.devices.pgm import PlaneGratingMonochromator
55
from dodal.devices.synchrotron import Synchrotron
66
from dodal.log import set_beamline as set_log_beamline
77
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -18,5 +18,5 @@ def synchrotron() -> Synchrotron:
1818

1919

2020
@device_factory()
21-
def pgm() -> PGM:
21+
def pgm() -> PlaneGratingMonochromator:
2222
return i05_pgm()

src/dodal/beamlines/i05_1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from dodal.beamline_specific_utils.i05_shared import pgm as i05_pgm
22
from dodal.common.beamlines.beamline_utils import device_factory
33
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
4-
from dodal.devices.pgm import PGM
4+
from dodal.devices.pgm import PlaneGratingMonochromator
55
from dodal.devices.synchrotron import Synchrotron
66
from dodal.log import set_beamline as set_log_beamline
77
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -13,7 +13,7 @@
1313

1414

1515
@device_factory()
16-
def pgm() -> PGM:
16+
def pgm() -> PlaneGratingMonochromator:
1717
return i05_pgm()
1818

1919

src/dodal/beamlines/i09.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from dodal.devices.electron_analyser import DualEnergySource
1111
from dodal.devices.electron_analyser.vgscienta import VGScientaDetector
1212
from dodal.devices.i09 import Grating, LensMode, PassEnergy, PsuMode
13-
from dodal.devices.pgm import PGM
13+
from dodal.devices.pgm import PlaneGratingMonochromator
1414
from dodal.devices.synchrotron import Synchrotron
1515
from dodal.log import set_beamline as set_log_beamline
1616
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -27,8 +27,8 @@ def synchrotron() -> Synchrotron:
2727

2828

2929
@device_factory()
30-
def pgm() -> PGM:
31-
return PGM(
30+
def pgm() -> PlaneGratingMonochromator:
31+
return PlaneGratingMonochromator(
3232
prefix=f"{BeamlinePrefix(BL, suffix='J').beamline_prefix}-MO-PGM-01:",
3333
grating=Grating,
3434
)

src/dodal/beamlines/i09_2.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
UndulatorPhaseAxes,
99
)
1010
from dodal.devices.i09.enums import Grating
11-
from dodal.devices.pgm import PGM
11+
from dodal.devices.pgm import PlaneGratingMonochromator
1212
from dodal.devices.synchrotron import Synchrotron
1313
from dodal.log import set_beamline as set_log_beamline
1414
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -25,8 +25,11 @@ def synchrotron() -> Synchrotron:
2525

2626

2727
@device_factory()
28-
def pgm() -> PGM:
29-
return PGM(prefix=f"{PREFIX.beamline_prefix}-MO-PGM-01:", grating=Grating)
28+
def pgm() -> PlaneGratingMonochromator:
29+
return PlaneGratingMonochromator(
30+
prefix=f"{PREFIX.beamline_prefix}-MO-PGM-01:",
31+
grating=Grating,
32+
)
3033

3134

3235
@device_factory()

src/dodal/beamlines/i10_optics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
# Imports taken from i10 while we work out how to deal with split end stations
3434
from dodal.devices.i10.i10_setting_data import I10Grating
35-
from dodal.devices.pgm import PGM
35+
from dodal.devices.pgm import PlaneGratingMonochromator
3636
from dodal.devices.synchrotron import Synchrotron
3737
from dodal.log import set_beamline as set_log_beamline
3838
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -59,9 +59,9 @@ def first_mirror() -> PiezoMirror:
5959

6060

6161
@device_factory()
62-
def pgm() -> PGM:
62+
def pgm() -> PlaneGratingMonochromator:
6363
"I10 Plane Grating Monochromator, it can change energy via pgm.energy.set(<energy>)"
64-
return PGM(
64+
return PlaneGratingMonochromator(
6565
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
6666
grating=I10Grating,
6767
grating_pv="NLINES2",

src/dodal/beamlines/i17.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
UndulatorPhaseAxes,
1818
)
1919
from dodal.devices.i17.i17_apple2 import I17Apple2Controller
20-
from dodal.devices.pgm import PGM
20+
from dodal.devices.pgm import PlaneGratingMonochromator
2121
from dodal.devices.synchrotron import Synchrotron
2222
from dodal.log import set_beamline as set_log_beamline
2323
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -39,8 +39,8 @@ def synchrotron() -> Synchrotron:
3939

4040

4141
@device_factory(skip=True)
42-
def pgm() -> PGM:
43-
return PGM(
42+
def pgm() -> PlaneGratingMonochromator:
43+
return PlaneGratingMonochromator(
4444
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
4545
grating=I17Grating,
4646
grating_pv="NLINES2",

src/dodal/beamlines/i21.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
UndulatorPhaseAxes,
99
)
1010
from dodal.devices.i21 import Grating
11-
from dodal.devices.pgm import PGM
11+
from dodal.devices.pgm import PlaneGratingMonochromator
1212
from dodal.devices.synchrotron import Synchrotron
1313
from dodal.log import set_beamline as set_log_beamline
1414
from dodal.utils import BeamlinePrefix, get_beamline_name
@@ -25,8 +25,8 @@ def synchrotron() -> Synchrotron:
2525

2626

2727
@device_factory()
28-
def pgm() -> PGM:
29-
return PGM(
28+
def pgm() -> PlaneGratingMonochromator:
29+
return PlaneGratingMonochromator(
3030
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
3131
grating=Grating,
3232
)

0 commit comments

Comments
 (0)