Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
18 changes: 10 additions & 8 deletions src/hispec/driver/tracking_camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,29 @@ 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.

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=<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

Expand Down
2 changes: 2 additions & 0 deletions src/hispec/driver/tracking_camera/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading