Skip to content
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

various fixes #993

Merged
merged 7 commits into from
Jul 1, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
# https://github.com/davidslusser/actions_python_ruff/issues/2

- run: pip install ruff
- run: |
ruff check .
- run: ruff check .

install-catalogs:
name: Install & cache databroker catalogs
Expand Down
17 changes: 14 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ describe future plans.
1.6.20
******

release expected by 2024-04-30
release expected by 2024-07-19

New Features
------------

* Add new APS PlanarUndulator device.

Maintenance
-----------

* Pin numpy<2 because upstream dask package needs a fix.
* Removed ApsUndulator and ApsUndulatorDual devices.

1.6.19
******
Expand All @@ -34,8 +45,8 @@ released 2024-04-23
New Features
------------

* Add new plan for edge alignment called edge_align
* Added a mesh grid scan plan that will collect until number of collection points is met
* Add new plan for edge alignment called edge_align.
* Added a mesh grid scan plan that will collect until number of collection points is met.

Fixes
-----
Expand Down
27 changes: 5 additions & 22 deletions apstools/devices/aps_undulator.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,25 @@
"""
APS undulator
+++++++++++++++++++++++++++++++++++++++
APS undulators
++++++++++++++

.. autosummary::

~ApsUndulator
~ApsUndulatorDual
~PlanarUndulator
"""

import logging
from enum import IntEnum

from ophyd import Component
from ophyd import DerivedSignal
from ophyd import Device
from ophyd import EpicsSignal
from ophyd import EpicsSignalRO
from ophyd import PVPositioner
from ophyd import Signal

from .tracking_signal import TrackingSignal

logger = logging.getLogger(__name__)


class DoneStatus(IntEnum):
MOVING = 0
DONE = 1


class BusyStatus(IntEnum):
DONE = 0
BUSY = 1


class MotorDriveStatus(IntEnum):
NOT_READY = 0
READY_TO_MOVE = 1
POSITIONER_DONE = 1


class UndulatorPositioner(PVPositioner):
Expand All @@ -53,7 +36,7 @@ class UndulatorPositioner(PVPositioner):
actuate = Component(DerivedSignal, derived_from="parent.start_button", kind="omitted")
stop_signal = Component(DerivedSignal, derived_from="parent.stop_button", kind="omitted")
done = Component(DerivedSignal, derived_from="parent.done", kind="omitted")
done_value = DoneStatus.DONE
done_value = POSITIONER_DONE


class PlanarUndulator(Device):
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- intake <=1
- matplotlib-base
- mongoquery >=1.3.6
- numpy <2
- openpyxl
- ophyd >=1.6.1
- pandas
Expand Down