Add a typed facade for the tracking camera over the camera_interface module - #207
Conversation
|
|
||
| ```bash | ||
| cd camera-interface/build | ||
| pip install pybind11 |
There was a problem hiding this comment.
Should we update the toml to install this?
There was a problem hiding this comment.
No: pybind11 is only needed to compile camera_interface, not to import it (the built .so links cfitsio, CCfits and OpenCV but not pybind11), so it is camera-interface's build dependency rather than one of ours, and camera_interface itself cannot go in the toml either since it is a compiled extension built per instrument rather than a package on an index. The real fix is to package camera-interface with scikit-build-core so pip install ./camera-interface --config-settings=cmake.define.INSTRUMENT=... pulls pybind11 into an isolated build env and installs the module into the venv, which deletes this instruction instead of explaining it; that is planned as a separate piece of work. README now says build-only.
9512aa7 to
530e0be
Compare
camera_interfaceexposes instrument commands asinstrument_cmd(name, argument_string), so every caller would otherwise build the same argument strings by hand;TrackingCameragives them real signatures and puts the formatting in one placeset_guiding_roi(y0, y1, x0, x1),set_centred_roi(height, width),set_readmode(ReadMode.RX),set_window(bool),set_autofetch(bool),set_freerun(bool), andinitialize()for the open, load, power on, h2rg_init sequencegeometry()returns aGeometrydataclass withheightandwidthrather than a string to parse, andReadModeis an enum so a bad mode raisesValueErrorbefore anything is sentcamera_interface.Camera, so base commands likeexposeandexptimeare reached directly without re-wrapping all 22camera_interfaceis a compiled extension rather than a PyPI package