Comments (8)
@olliesilvester Somewhere, I can't find it, you outlined a nice compositional idea where you build a DCM object out of a bunch of modules, so we can cope with design differences etc.
@coretl RE: finding a better solution than relying on DAQ to tell you if the PVs are correct. I think you should be relying on CI rather than DAQ, I think any solution that relies on CI to tell DAQ and/or controls if the PVs are wrong is a huge improvement on the status quo. We were hoping #507 would provide at least some of that, but open to other ideas.
from dodal.
I have a broader question - is the expectation, with the current developments to dodal, ophyd, and blusky, etc, that PV names across Diamond will adopt common naming conventions for devices?
I'm not criticising, but just highlighting that there is currently no action plan on the controls side that I'm aware of to make this happen.
Including @coretl on this thread.
Thanks,
James
from dodal.
Hi James, currently we've been doing it ad-hoc. When we encounter a discrepancy between two beamlines, we try asking the relevant controls engineer to change the PV names. This is quite nice and agile, and it means we don't need a giant work package to rename all PVs across Diamond simultaneously, just that the level of standardisation that is needed for DAQ purposes should creep in over time. I'll defer to @coretl though as I know he has opinions.
from dodal.
I'm not a big fan of the current approach of "make som PV names, and rely on DAQ to tell us if they're right", so I'm keen to find a better solution.
One possibility discussed with @gilesknap was that we make some DLS record alias templates that live in a single support module that we can include for existing beamlines. This could point to dodal as the canonical description of what PV names are required for which type of device.
from dodal.
As of #652, we also have an i24 DCM. So the DCM base class now should contain common PV's between i03, i22 and i24. And I guess any PV's which only differ in syntax should be renamed to a common name
from dodal.
@olliesilvester Somewhere, I can't find it, you outlined a nice compositional idea where you build a DCM object out of a bunch of modules, so we can cope with design differences etc.
I think I found the email you were referring to
'we have decided to decompose our current bluesky plans into common building blocks for any MX beamline to use. A beamline can then construct its specific implementation by building up these smaller generic plans. These generic plans will be stored in the mx_bluesky repo. We will also look into using bluesky's 'prepare' command for device setup.'
So yeah, same idea works for devices
from dodal.
Hello, I'm not familiar with dodal and friends at all so the following suggestion is with full ignorance:
Could the code not hold variables which are populated with the particular naming implementation?
eg for a DCM:
base_pv = BL03I-MO-DCM-01
bragg_suffix = :BRAGG
first_xtal_roll = :ROLL
second_xtal_roll = None
first_crystal_pitch = :PITCH
second_crystal_pitch = None
etc
from dodal.
@JamesOHeaDLS Yes, good suggestion, I think this covers at least some of the use cases. It requires there to be a consistent superstate of all DCMs, i.e. something that could hold all of the variables without conflicts. That does make it harder to tell how the DCM works just from reading the code though. For instance, if I03's DCM has a second_crystal_pitch = Motor("BL03I-MO-ETC")
and I22's has second_crystal_pitch = None
, you have to look it up somewhere. And every piece of code that access it has to check if it's None
or not.
It would be nicer if I22's DCM simply didn't have a second_crystal_pitch
attribute in the first place. Then it's immediately obvious and the code that uses it gets simpler.
Maybe something more like this?
# i22.py
def dcm() -> DCMBase:
return DCMBase(
"BL22I-MO-DCM-01",
crystals=[
DCMCrystalRollOnly("BL22I-MO-DCM-01:XTSAL1"),
DCMCrystalRollAndPitch("BL22I-MO-DCM-01:XTSAL2"),
]
)
# i03.py
def dcm() -> DCMBase:
return DCMBase(
"BL03I-MO-DCM-01",
crystals=[
DCMCrystalRollAndPitch("BL03I-MO-DCM-01:XTSAL1"),
DCMCrystalRollAndPitch("BL03I-MO-DCM-01:XTSAL2"),
]
)
from dodal.
Related Issues (20)
- Convert to ophyd-async: fluorescence_detector_motion
- Convert to ophyd-async: ipin
- Convert to ophyd-async: qbpm1
- Convert to ophyd-async: scintillator
- Convert to ophyd-async: detector_motion HOT 1
- Write an ophyd-async device against the fastcs eiger HOT 2
- Make Undulator gap writeable - i18 HOT 8
- Add ViSR (b01-1) as a beamline with devices
- Make i18 - beamlines files
- Remove XBPMFeedbackI04
- Convert the OAV to ophyd-async
- Remove conversion from string to DetectorSizeConstants in DetectorParams
- i18 KB mirror devices
- Create an ophyd device for Applet2 undulator HOT 4
- Ophyd-async area detector for Pressure Jump Cell
- Make useful scripts into a dodal utility
- Make a redis lookup table caching device HOT 1
- Raise an error when wrong device name HOT 2
- Update copier template to include SLF001
- Decide what to do about B008
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dodal.