Skip to content

Some general questions & thoughts on first use #177

@tlambert03

Description

@tlambert03

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Priority Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions