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

Cryostream ophyd #402

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion config_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class OnMountAvailOptions(Enum):
DEWAR_SECTORS = {'amx':8, 'fmx':8, 'nyx':8}
PUCKS_PER_DEWAR_SECTOR = {'amx':3, 'fmx':3, 'nyx':3}

cryostreamTempPV = {"amx": "XF:17IDB-ES:AMX{CS:1}SAMPLE_TEMP_RBV", "fmx": "FMX:cs700:gasT-I", "nyx":"XF:19ID2:CS700:TEMP"}
cryostreamTempPV = {"amx": "XF:17ID1:CS700:TEMP", "fmx": "FMX:cs700:gasT-I", "nyx":"XF:19ID2:CS700:TEMP"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these names correct? In particular the FMX one is hideous, but the other two don't follow best practices either (not your fault of course).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NYX PV is correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FMX one, I confirmed is incorrect. It follows the AMX, NYX formats. Fixed


VALID_EXP_TIMES = {
"amx": {"min": 0.005, "max": 1, "digits": 3},
Expand Down
19 changes: 17 additions & 2 deletions mxbluesky/devices/generic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from ophyd import Component as Cpt
from ophyd import Device, EpicsMotor, EpicsSignal
from ophyd import Device, EpicsMotor, EpicsSignal, EpicsSignalRO, PVPositionerIsClose
from mxbluesky.devices import standardize_readback
from enum import IntEnum, unique

class WorkPositions(Device):
gx = Cpt(EpicsSignal, "{Gov:Robot-Dev:gx}Pos:Work-Pos")
Expand Down Expand Up @@ -33,4 +34,18 @@ def __init__(self, *args, **kwargs):
self.cy = self.py
self.z = self.pz
self.cz = self.pz
self.omega = self.o
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be a removed line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, was a mistake


@unique
class CryoStreamCmd(IntEnum):
START_RAMP = 1
STOP_RAMP = 0


class CryoStream(PVPositionerIsClose):
readback = Cpt(EpicsSignalRO, 'TEMP')
setpoint = Cpt(EpicsSignal, 'RTEMP')
actuate = Cpt(EpicsSignal, "RAMP.PROC")
actuate_value = CryoStreamCmd.START_RAMP
stop_signal = Cpt(EpicsSignal, "RAMP.PROC")
stop_value = CryoStreamCmd.STOP_RAMP

5 changes: 4 additions & 1 deletion start_bs.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class SampleXYZ(Device):
if (beamline=="amx"):
from mxbluesky.devices import (WorkPositions, TwoClickLowMag, LoopDetector, MountPositions,
TopAlignerFast, TopAlignerSlow, GoniometerStack)
from mxbluesky.devices.generic import CryoStream
mercury = ABBIXMercury('XF:17IDB-ES:AMX{Det:Mer}', name='mercury')
mercury.read_attrs = ['mca.spectrum', 'mca.preset_live_time', 'mca.rois.roi0.count',
'mca.rois.roi1.count', 'mca.rois.roi2.count', 'mca.rois.roi3.count']
Expand Down Expand Up @@ -144,11 +145,12 @@ class SampleXYZ(Device):
loop_detector = LoopDetector(name="loop_detector")
top_aligner_fast = TopAlignerFast(name="top_aligner_fast", gov_robot=gov_robot)
top_aligner_slow = TopAlignerSlow(name="top_aligner_slow")

cs700 = CryoStream("XF:17ID1:CS700:", name="cs700", atol=0.1)

elif beamline == "fmx":
from mxbluesky.devices import (WorkPositions, TwoClickLowMag, LoopDetector, MountPositions,
TopAlignerFast, TopAlignerSlow, GoniometerStack)
from mxbluesky.devices.generic import CryoStream
mercury = ABBIXMercury('XF:17IDC-ES:FMX{Det:Mer}', name='mercury')
mercury.read_attrs = ['mca.spectrum', 'mca.preset_live_time', 'mca.rois.roi0.count',
'mca.rois.roi1.count', 'mca.rois.roi2.count', 'mca.rois.roi3.count']
Expand Down Expand Up @@ -181,6 +183,7 @@ class SampleXYZ(Device):
top_aligner_slow = TopAlignerSlow(name="top_aligner_slow")

import setenergy_lsdc
cs700 = CryoStream("XF:17ID2:CS700:", name="cs700", atol=0.1)

elif beamline=="nyx":
from mxbluesky.devices.md2 import LightDevice, BeamstopDevice, MD2SimpleHVDevice, MD2Device, ShutterDevice
Expand Down