diff --git a/configs/remote_capture_rpi_gs.yaml b/configs/remote_capture_rpi_gs.yaml index f49c5bbc..0466e689 100644 --- a/configs/remote_capture_rpi_gs.yaml +++ b/configs/remote_capture_rpi_gs.yaml @@ -14,7 +14,7 @@ rpi: capture: sensor: rpi_gs - exp: 0.5 + exp: 0.2 bayer: True legacy: False # must be False for rpi_gs rgb: False diff --git a/lensless/hardware/utils.py b/lensless/hardware/utils.py index 97b384f6..a52668c5 100644 --- a/lensless/hardware/utils.py +++ b/lensless/hardware/utils.py @@ -58,6 +58,9 @@ def display( def check_username_hostname(username, hostname, timeout=10): + assert username is not None, "Username must be specified" + assert hostname is not None, "Hostname must be specified" + client = paramiko.client.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) diff --git a/scripts/measure/remote_capture.py b/scripts/measure/remote_capture.py index 13558c08..e2532c74 100644 --- a/scripts/measure/remote_capture.py +++ b/scripts/measure/remote_capture.py @@ -1,6 +1,23 @@ """ -python scripts/measure/remote_capture.py +For Bayer data with RPI HQ sensor: +``` +python scripts/measure/remote_capture.py \ +rpi.username=USERNAME rpi.hostname=IP_ADDRESS +``` + +For Bayer data with RPI Global shutter sensor: +``` +python scripts/measure/remote_capture.py -cn remote_capture_rpi_gs \ +rpi.username=USERNAME rpi.hostname=IP_ADDRESS +``` + +For RGB data with RPI HQ RPI Global shutter sensor: +``` +python scripts/measure/remote_capture.py -cn remote_capture_rpi_gs \ +rpi.username=USERNAME rpi.hostname=IP_ADDRESS \ +capture.bayer=False capture.down=2 +``` Check out the `configs/demo.yaml` file for parameters, specifically: @@ -54,12 +71,6 @@ def liveview(config): else: save = False - # proceed with capture - # if bayer: - # assert not rgb - # assert not gray - assert hostname is not None - # take picture remote_fn = "remote_capture" print("\nTaking picture...") @@ -85,7 +96,7 @@ def liveview(config): result = ssh.stdout.readlines() error = ssh.stderr.readlines() - if error != []: + if error != [] and legacy: # new camera software seems to return error even if it works print("ERROR: %s" % error) return if result == []: @@ -108,6 +119,7 @@ def liveview(config): "RPi distribution" in result_dict.keys() and "bullseye" in result_dict["RPi distribution"] and not legacy + and bayer ): # copy over DNG file remotefile = f"~/{remote_fn}.dng"