Move away from arbitrary stream names
The purpose of our the base camera thing is to be general purpose, and then be sub-classed by different cameras. Currently the Camera Thing uses the Raspberry Pi stream names, we have then started to "hack" this by inventing our own ones that change the streams.
We should overhaul this python API to something that is cleaner and more easily applicable to other cameras.
## Details
To clean this up we need to sort our the camera API making it more uniform. The current status is:
| Ways to capture | Action? | Resolution set by | Format | Switches stream? | Saves to disk? | Return Type | Calls | Notes | Proposal |
|---------------------------|---------|----------------------------|-------------|------------------|----------------|------------------------|----------------------------|----------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| `capture_array` | Yes | stream name (+ "raw" + "full") | Numpy array | yes | no | Numpy array | camera specific | | change to `capture_as_array` to mirror grab_as_array |
| `capture_downsampled_array` | Yes | N/A | Numpy array | no | no | Numpy array | self.capture_array | Needed for camera stage mapping | Make issue to deprecate when we work on CSM |
| `capture_jpeg ` | Yes | stream name (+ "full") | Jpeg | yes | no | Blob | `self.capture_image` | | Roll into single `capture_image` function with format specified |
| `capture_png` | Yes | stream name (+ "full") | PNG | yes | no | Blob | `self.capture_image` | Repeats code from above, could be a flag. Need to work out LabThings return type | Roll into single capture_image function with format specified |
| `grab_jpeg` | Yes | stream name | JPEG | no | no | Blob | `stream.grab_frame` | Also `grab_jpeg_size` is related | |
| `grab_as_array` | Yes | stream name | Numpy array | no | no | Numpy array | `stream.grab_frame` | repeats code from grab_array | |
| `capture_image` | No | stream name | PIL image | no | no | PIL image | camera specific | | Make internal to camera |
| `capture_and_save` | Yes | resolution tuple | JPEG | no | yes | None | `self._robust_image_capture` | | Unify arguments with new `capture_image` allowing changing capture type |
| `capture_to_memory` | Yes | N/A | PIL image | no | no | Int | `self._robust_image_capture` | Return is the ID in memory, `save_from_memory` action can be used to save this | |
| `_robust_image_capture` | No | N/A | PIL Image | no | no | Tuple[PIL Image, dict] | `self.capture_image` | Returns metadata as well as PIL image
Probably to unifiy the camera api we need to do #424
issue