Skip to content

Commit

Permalink
Merge branch 'master' into ppm
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLLentz authored Oct 11, 2024
2 parents 77ade8e + 021191d commit 40577e7
Show file tree
Hide file tree
Showing 11 changed files with 359 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
1274 Adding base class for hxr diffractometer.
#################

API Breaks
----------
- N/A

Library Features
----------------
- N/A

Device Features
---------------
- N/A

New Devices
-----------
- Adding base class for hxr diffractometer, this class needs the base prefix to be passed in e.g. HXR:GON:MMS. The stage suffixes are hardcoded.

Bugfixes
--------
- N/A

Maintenance
-----------
- N/A

Contributors
------------
- c-tsoi
31 changes: 31 additions & 0 deletions docs/source/upcoming_release_notes/1291-fix_smarpod_ui_name.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
1291 fix_smarpod_ui_name
#################

API Breaks
----------
- N/A

Library Features
----------------
- N/A

Device Features
---------------
- N/A

New Devices
-----------
- N/A

Bugfixes
--------
- Rename ``Smarpod.detailed.ui`` to ``SmarPod.detailed.ui`` so that it will be
properly discovered by ``typhos`` for the `SmarPod` class.

Maintenance
-----------
- N/A

Contributors
------------
- zllentz
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
1292 recoving sp1k4-att targets
#################

API Breaks
----------
- N/A

Library Features
----------------
- N/A

Device Features
---------------
- recover sp1k4 attenuator targets number from 3 to 5

New Devices
-----------
- N/A

Bugfixes
--------
- N/A

Maintenance
-----------
- N/A

Contributors
------------
- tongju12
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
1293 enh_tmo_mpod_apalis_hotfix
###############################

API Breaks
----------
- N/A

Library Features
----------------
- N/A

Device Features
---------------
- Add the ``desc``, ``last_voltage_set``, and ``is_trip`` component signals to
`MPODApalisChannel`. These have been helpful during operations at TMO.
``last_voltage_set`` will also get a ``voltage_setpoint`` alias, which is the
original name as used in TMO's scripts.
- Add proper control limits to `MPODApalisChannel.voltage` and `MPODApalisChannel.current`.
This will give useful errors when someone tries to put values outside of the
channel's supported range.

New Devices
-----------
- N/A

Bugfixes
--------
- Fix an issue where arbitrarily large negative values were permitted to be
passed during the `MPODApalisChannel.set_voltage` method, and where
small values passed to a negative-polarity channel would jump to the
most negative value. Now, this function will clamp all values between
zero and the maximum channel voltage.

Maintenance
-----------
- Added unit tests to cover the `MPODApalisChannel` changes.

Contributors
------------
- zllentz
31 changes: 31 additions & 0 deletions docs/source/upcoming_release_notes/1295-ffmirror-states.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
1295 ffmirror-states
#################

API Breaks
----------
- N/A

Library Features
----------------
- N/A

Device Features
---------------
- `FFMirror` gets `coating` a `TwinCATMirrorStripe`
- `FFMirrorZ` inherits these and sets them `None`

New Devices
-----------
- N/A

Bugfixes
--------
- N/A

Maintenance
-----------
- N/A

Contributors
------------
- nrwslac
28 changes: 27 additions & 1 deletion pcdsdevices/gon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import logging

import numpy as np
from ophyd import Device
from ophyd import FormattedComponent as FCpt
from ophyd.device import Component as Cpt
from ophyd.status import DeviceStatus
from prettytable import PrettyTable

from .device import GroupDevice
from .epics_motor import IMS
from .epics_motor import IMS, BeckhoffAxis
from .interface import BaseInterface
from .pseudopos import (PseudoPositioner, PseudoSingleInterface,
pseudo_position_argument, real_position_argument)
Expand Down Expand Up @@ -657,6 +658,31 @@ def format_status_info(self, status_info):
"""


class HxrDiffractometer(BaseInterface, Device):
"""
Class for diffractometer.
Parameters
----------
name : str
A name to refer to the device
prefix_base : str
The EPICS base PV of the diffractometer stages
"""

base_h = Cpt(BeckhoffAxis, 'BASE_H', kind='normal')
base_v = Cpt(BeckhoffAxis, 'BASE_V', kind='normal')
th = Cpt(BeckhoffAxis, 'TH', kind='normal')
tth = Cpt(BeckhoffAxis, 'TTH', kind='normal')
chi = Cpt(BeckhoffAxis, 'CHI', kind='normal')

tab_component_names = True

def __init__(self, prefix, name, **kwargs):
super().__init__(prefix, name=name, **kwargs)


class SimSampleStage(KappaXYZStage):
x = Cpt(FastMotor, limits=(-100, 100))
y = Cpt(FastMotor, limits=(-100, 100))
Expand Down
10 changes: 10 additions & 0 deletions pcdsdevices/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,8 @@ class FFMirror(BaseInterface, GroupDevice, LightpathMixin):
1st gen Toyama designs with LCLS-II Beckhoff motion architecture.
MR2K2
Parameters
----------
prefix : str
Expand All @@ -1175,6 +1177,10 @@ class FFMirror(BaseInterface, GroupDevice, LightpathMixin):
# UI representation
_icon = 'fa.minus-square'

# 2 Coating State Selection 1 axis with PMPS
coating = Cpt(TwinCATMirrorStripe, ':COATING:STATE', kind='hinted',
doc='Control of the coating states via saved positions.')

# Motor components: can read/write positions
x = Cpt(BeckhoffAxisNoOffset, ':MMS:X', kind='hinted')
y = Cpt(BeckhoffAxisNoOffset, ':MMS:Y', kind='hinted')
Expand Down Expand Up @@ -1281,6 +1287,8 @@ class FFMirrorZ(FFMirror):
1st gen Toyama designs with LCLS-II Beckhoff motion architecture.
MR4/5K4
Parameters
----------
prefix : str
Expand All @@ -1289,6 +1297,8 @@ class FFMirrorZ(FFMirror):
name : str
Alias for the device.
"""
# Coating States not implemented yet.
coating = None
# Motor components: can read/write positions
z = Cpt(BeckhoffAxisNoOffset, ':MMS:Z', kind='hinted')

Expand Down
Loading

0 comments on commit 40577e7

Please sign in to comment.