diff --git a/.gitmodules b/.gitmodules index 2238a80..5777b22 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,11 +46,11 @@ path = src/hispec/driver/newport url = https://github.com/COO-Utilities/newport branch = main -[submodule "etc/PIPython"] - path = etc/PIPython +[submodule "external/PIPython"] + path = external/PIPython url = https://github.com/PI-PhysikInstrumente/PIPython -[submodule "etc/camera-interface"] - path = etc/camera-interface +[submodule "external/camera-interface"] + path = external/camera-interface url = https://github.com/CaltechOpticalObservatories/camera-interface branch = main [submodule "src/hispec/driver/pdu"] diff --git a/etc/PIPython b/external/PIPython similarity index 100% rename from etc/PIPython rename to external/PIPython diff --git a/etc/camera-interface b/external/camera-interface similarity index 100% rename from etc/camera-interface rename to external/camera-interface diff --git a/src/hispec/driver/tracking_camera/README.md b/src/hispec/driver/tracking_camera/README.md index 34c89bf..9ebc5e3 100644 --- a/src/hispec/driver/tracking_camera/README.md +++ b/src/hispec/driver/tracking_camera/README.md @@ -6,9 +6,9 @@ everything common to any camerad camera. ## Prerequisite -pycamerad wraps `camera_interface`, a pybind11 module built from +pycamerad wraps a pybind11 module built from [camera-interface](https://github.com/CaltechOpticalObservatories/camera-interface), -checked out here as the `etc/camera-interface` submodule. It is a compiled +checked out here as the `external/camera-interface` submodule. It is a compiled extension built per instrument rather than a package on an index, so it cannot be a dependency in `pyproject.toml` and has to be installed separately. @@ -16,17 +16,19 @@ Install it into whichever environment you run hispec from, alongside hispec itself: ```bash -pip install ./etc/camera-interface \ - --config-settings=cmake.define.INSTRUMENT=hispec_tracking_camera +pip install ./external/camera-interface/packaging/tracking ``` -Add `--config-settings=cmake.define.ENABLE_SHM_OUTPUT=ON` for the +That package fixes the instrument and names the module +`camera_interface_tracking`, which is what `TrackingCamera.MODULE_NAME` loads. +Building a second instrument under its own name lets both live in one +environment. Add `--config-settings=cmake.define.ENABLE_SHM_OUTPUT=ON` for the shared-memory output, and `cmake.define.ImageStreamIO_DIR=` if ImageStreamIO is not under `/usr/local/lib/cmake`. -`import camera_interface` then works with no `PYTHONPATH`, and `camerad` is on -`PATH` whenever that environment is active. pybind11 is fetched into an -isolated build environment, so it never has to be installed by hand. +The import then works with no `PYTHONPATH`, and `camerad` is on `PATH` +whenever that environment is active. pybind11 is fetched into an isolated +build environment, so it never has to be installed by hand. ### Build dependencies diff --git a/src/hispec/driver/tracking_camera/camera.py b/src/hispec/driver/tracking_camera/camera.py index cf6f15e..93df605 100644 --- a/src/hispec/driver/tracking_camera/camera.py +++ b/src/hispec/driver/tracking_camera/camera.py @@ -52,6 +52,8 @@ def width(self) -> int: class TrackingCamera(Camerad): """The HISPEC tracking camera, adding its instrument commands.""" + MODULE_NAME = "camera_interface_tracking" + ### lifecycle def initialize(self) -> None: