bin/microspec_cmdline.py

Example Usage

Capture one frame once

microspec_cmdline.py captureframe

Capture a frame 50 times with 2 seconds inbetween

microspec_cmdline.py captureframe -r 50 -w 2

Capture a frame and print results in csv

microspec_cmdline.py captureframe -c

Set the binning to true, gain to 100, and row_bitmap to 010101 (0x15)

microspec_cmdline.py setsensorconfig binning=1 gain=100 row_bitmap=0x15

Connect to a specific COM4 port

microspec_cmdline.py -f COM4 …

Connect to a specific /dev/com123 file

microspec_cmdline.py -f /dev/com123 …

Connect to emulator instead of hardware

microspec_cmdline.py -e …


Command-line arguments

Positional arguments

Argument

Description

command

Command to send

arguments

Key=value pairs for command

Optional arguments

Argument

Description

-h, --help

show this help message and exit

-d, --debug

Internal debugging trace

-v, --verbose

Verbose trace

-t  TIMEOUT, --timeout  TIMEOUT

Timeout (seconds)

-r  REPEAT, --repeat  REPEAT

Repeat N times, 1=once, 0=forever

-w  WAIT, --wait  WAIT

Wait inbetween repeats (seconds)

-e, --emulator

Spawn emulator and connect to that

-f  FILE, --file  FILE

File/socket/device to connect to, default=auto-detect hardware

-c, --csv

Print-format: ‘default’ or ‘csv’

List of commands and arguments

SetAutoExposeConfig max_tries=xxx start_pixel=xxx stop_pixel=xxx target=xxx target_tolerance=xxx max_exposure=xxx

Argument

Description

Null

GetBridgeLED

led_num=xxx

SetBridgeLED

led_num=xxx led_setting=xxx

GetSensorLED

led_num=xxx

SetSensorLED

led_num=xxx led_setting=xxx

Reset

Verify

GetSensorConfig

SetSensorConfig

binning=xxx gain=xxx row_bitmap=xxx

GetExposure

SetExposure

cycles=xxx

CaptureFrame

AutoExposure

GetAutoExposeConfig

Note that command names are case-insensitive. For more information on each command, run pydoc microspeclib.datatypes.command


Script contents