Open auspicacious opened 1 week ago
Some notes on third-party libraries:
Wow, there are a lot of Python libraries related to scientific units.
We should avoid using these.
We should avoid using these.
These might be useful.
Pint seems to have the most features and the most complete documentation. It's also actively maintained. It doesn't have type safety (all quantities are the same class) but the many features it offers, including optional NumPy and pandas integration, seem to make it the only viable choice at this point in time.
Length
or Area
, gets its own class. This is ideal, but unfortunately the library does not appear to have sufficient features or maturity to use.Discovered yet another library that supports Thorlabs APT devices and supports a connection abstraction so it's possible to use, for instance, serial over Ethernet: https://instrumentkit.readthedocs.io/en/latest/
I'm not sure if everything works 100% for the APT protocol, as the library was originally mostly built for SCPI, I think. However, it has a nice object model for building messages (each APT packet is an object). It also uses Pint to make sure that values have units wherever possible.
While I would like to consider using this library, it's AGPL licensed. Using it in PnPQ would effectively require us to license PnPQ as AGPL (or GPL, I think) as well, as well as any further dependent testbed repositories we publish. This warrants a much broader team discussion and I am unsure of the outcome.
I'm convinced that implementing a usable interface that can handle things like status updates will require either threading or asyncio, and I'm working through the details now.
We want to support motorized polarization controllers such as the Thorlabs MPC320.
This is a good chance for us to see if we can successfully implement an abstract base class as described in https://github.com/moonshot-nagayama-pj/PnPQ/issues/29 before we attempt to refactor existing code.
Acceptance criteria
Good to have
References