Docs
astrocam
astrocam
A Go driver for astronomy CMOS cameras that talks the cameras’ USB protocol
directly. No vendor SDK runs in the process. The driver is cgo-free everywhere
except the macOS USB backend: Linux and Windows build with CGO_ENABLED=0,
while macOS uses IOUSBHost through cgo.
Source: github.com/mikefsq/astrocam , MIT.
Vendor-independent by design
A (VID,PID) → Model registry and a VID → Vendor dialect map let one sensor
profile, keyed by the Sony die, serve every vendor that uses that die. ZWO
and PlayerOne share the IMX455 and IMX571 profiles. The only per-vendor
difference is the register-map opcodes and the gain and offset unit scale,
selected at call time. Vendors register themselves at init.
Sensor profiles ship for IMX174, IMX178, IMX290, IMX455, IMX462, IMX571, and IMX585.
Status
The control and data plane, cooling PID loop, guiding, and snap and stream capture are implemented, with modular sensor profiles. HCG gain, sub-frame ROI, binning, offset and black level, RAW8 and RAW16 readout, 10-bit high-speed mode, and host-timed long exposures are wired across the family.
Hardware-validated on the wire:
| Camera | Sensor | Notes |
|---|---|---|
| ASI6200MM Pro, ASI6200MC Pro | IMX455 | Full-frame pixel-matched to the SDK. Optical-black crop and FX3 DDR frame-marker repair are on by default; hot-pixel map repair is off by default. |
| ASI290MM Mini | IMX290 | |
| ASI462 | IMX462 | 12-bit and 10-bit high-speed. Shares the FX3 frame-marker repair, which is a per-sensor opt-in. |
| ASI174MM Mini | IMX174 | Global shutter, so no hardware binning. |
IMX178 and IMX585 are in progress.
gosnap
cmd/gosnap is the bring-up and capture tool. Run without arguments it detects
the camera, prints its identity, and disconnects, using control transfers only.
gosnap # detect + identify, no capture
gosnap -capture -exposure 100ms -gain 200 -out frame.raw
gosnap -capture -bin 2 -roi x,y,w,h -raw8 -highspeed
gosnap -capture -fps -discard # streaming, per-frame interval statsCross-building for a telescope host is a single command, since Linux and Windows need no C toolchain:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o gosnap ./cmd/gosnapOn Linux, opening the device needs udev access to the USB vendor id.