Comments (2)
Hi Garth,
I agree that the user_detectors, default_detectors is very counterintuative. I am struggling for a good way to configure this? Any thoughts on what we can do to clean this all up?
Best wishes,
Stuart
From: gjwillms <[email protected]mailto:[email protected]>
Reply-To: NSLS-II/ophyd <[email protected]mailto:[email protected]>
Date: Tuesday, March 17, 2015 at 6:29 AM
To: NSLS-II/ophyd <[email protected]mailto:[email protected]>
Subject: [ophyd] Scan.detectors is not what a naive user thinks it is (#83)
I think that there's a semantic problem with the detectors property in that it is intrinsically read-only. A user will be likely to attempt to add a new detector with, e.g., Count.detectors.append([my_detector)], rather than adding it to the user_detectors list. I offer up a few possible changes (in order of reversed personal preference):
- move this property name to _detectors so that a user has some warning that you don't intend to have this changed outside of the class methods,
- provide a setter that raises "AttributeError", indicating that appending to this list is not supported, or
- provide a setter that transparently adds the provided detector list to the user_detectors list.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/83.
from ophyd.
It's probably not helpful, but I'm actually glad to hear this. I'm thinking about the issue. If I'm honest, I'm tempted to say that we should eliminate the pair and return to just having a detector list. I'm not sure that I have a detector that is so useful that I expect to find it in every scan I perform, so default_detectors is a little strange to me. One of the things I may try tomorrow is creating a dict in the start-up files that represents a standard set of detectors for scans in each hutch and standard experiment configuration. That, in conjunction with a helper function to set/unset detectors and summarize known configurations, might work.
from ophyd.
Related Issues (20)
- Add a __contains__ to AndStatus
- Expose `MRES` in the EpicsMotor HOT 6
- SubscriptionStatus that waits for state to be stable
- Allow setting FileStoreBase formatter, so that write_path_template, read_path_template can use non-strftime formats HOT 3
- v2: BUG: No error raised upon casting array data from np.int64 to np.int32 HOT 1
- FileStoreBase write_path_template cannot be "." if read_path_template is None
- Codecoverage tool fails easily; some lines accidentally covered HOT 3
- v2: Should we handle errors from signals that don't handle `CancelledError` HOT 3
- v2: Devices with a mixture of timing-out and erroring signals throw some exceptions away
- v2: ValueChecker needs a default value for _last_value
- Idea: Add a human-readable "display name" to Ophyd Objects to supplement name HOT 19
- setuptools issue
- Docs: Reintroduce overview of architecture + explanations of "hints", "components" HOT 1
- pip installation does not have all required dependencies HOT 3
- Improve `__repr__` of AsyncStatus HOT 1
- Race condition in StableSubscriptionStatus
- Option to force "number" rather than "integer" in Signal
- read_configuration executes a second reading of the signal? HOT 1
- `PositionerBase` move command, bug or intended?
- More informative debug logs on callbacks from monitored EpicsSignal
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 ophyd.