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

Some general questions & thoughts on first use #177

Open
tlambert03 opened this issue Mar 7, 2024 · 1 comment
Open

Some general questions & thoughts on first use #177

tlambert03 opened this issue Mar 7, 2024 · 1 comment
Assignees

Comments

@tlambert03
Copy link
Contributor

tlambert03 commented Mar 7, 2024

Hi All, I'm excited to be digging into acquire a bit more!

I wrote down a couple thoughts during my first experiments and would be curious to get your insights.

  • Is there a runtime singleton? acquire.Runtime() is acquire.Runtime() returns False, and it's clear that different return values are not interchangeable.
    • Is the user expected to manage the lifetime of the runtime?
    • What happens if the runtime is garbage collected? (do you maintain an internal reference to the runtime that the user could retrieve?)
    • How do physical devices handle being managed multiple runtimes (for example, if two different end-users both tried to use acquire at the same time)
  • Is there a device_manager singleton? runtime.device_manager() is runtime.device_manager() returns False
    • are the identifiers returned by dm.select tied to a specific device_manager, or to the runtime?
  • where does one look (in the docs or in the source code) to find all the valid strings for dm.select? For example, how do I know that "simulated: radial sin" is a valid value (outside of reading it in the getting started docs)?
  • Relatedly (see below) it would be great if an invalid name raised an exception sooner than the Failed acquire api status check that you get when starting the runtime (also not sure how I hit this the first time, this time I got device_manager_select_inner_(): Device not found: Camera asdfds)
  • I think the term CameraProperties.offset is potentially confusing, could be conflated with camera amplifier offset rather than the ROI offset (when I think of "camera offset" I definitely think of the amplifier, not the ROI)
  • enums like SampleType should be proper enum objects; or at least have a __members__ attribute for introspection, a __getitem__ method for reverse lookup, and a __call__ method for conversion. (It should be easier to cast names to enums and know what enums are available programmatically)
  • RuntimeError: Failed acquire api status check: It would be great if this error was much more informative. I ran into it multiple times, and each time had to guess at what I was doing wrong. (Such as not having a storage, or having a typo in the second argument to dm.select())
  • I find it a bit confusing that you set camera.settings.shape with (width, height) but you receive it back from available data as (height, width)
@tlambert03 tlambert03 changed the title Some general thoughts on first use Some general questions & thoughts on first use Mar 7, 2024
@tlambert03
Copy link
Contributor Author

answering my own question for one of them here:

where does one look (in the docs or in the source code) to find all the valid strings for dm.select?

[x.name for x in acquire.Runtime().device_manager().devices()]

@aliddell aliddell moved this from Backlog to Priority Backlog in Image Acquisition Team Board Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Priority Backlog
Development

No branches or pull requests

2 participants