diff --git a/README.md b/README.md index aa9197f..2da03e9 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Consider using a VirtualEnv to run stvid on a separate python virtual environmen * `sextractor` needs to be executable in your path * [Astromentry.net](https://github.com/dstndstn/astrometry.net) * `solve-field` needs to be executable in your path, with index files appropriate for your FOV +* [ZWO ASI SDK](https://astronomy-imaging-camera.com/software-drivers) if using a ZWO camera ## Configuration * Copy the `configuration.ini-dist` file to `configuration.ini` diff --git a/acquire.py b/acquire.py index 39059d7..4d0bf23 100755 --- a/acquire.py +++ b/acquire.py @@ -78,12 +78,13 @@ def capture_cv2(buf, z1, t1, z2, t2, nx, ny, nz, tend, device_id, live): # Capture images def capture_asi(buf, z1, t1, z2, t2, nx, ny, nz, tend, device_id, live, gain, - maxgain, autogain, exposure, bins, brightness, bandwidth, high_speed): + maxgain, autogain, exposure, bins, brightness, bandwidth, + high_speed, sdk): # Array flag first = True # Initialize device - asi.init(os.getenv("ZWO_ASI_LIB")) + asi.init(sdk) camera = asi.Camera(device_id) camera_info = camera.get_camera_property() @@ -405,6 +406,7 @@ if __name__ == '__main__': binning = cfg.getint(camera_type, 'bin') brightness = cfg.getint(camera_type, 'brightness') bandwidth = cfg.getint(camera_type, 'bandwidth') + sdk = cfg.get(camera_type, 'sdk') high_speed = cfg.getint(camera_type, 'high_speed') # Initialize arrays @@ -431,7 +433,7 @@ if __name__ == '__main__': args=(buf, z1, t1, z2, t2, nx, ny, nz, tend.unix, device_id, live, gain, maxgain, autogain, exposure, binning, - brightness, bandwidth, high_speed)) + brightness, bandwidth, high_speed, sdk)) # Start pcapture.start() diff --git a/configuration.ini-dist b/configuration.ini-dist index 2966f7a..2e4d2e0 100644 --- a/configuration.ini-dist +++ b/configuration.ini-dist @@ -41,6 +41,7 @@ bin = 2 # Binning factor (1: 1x2, 2: 2x2 etc) brightness = 10 # Target brightness of pixels bandwidth = 90 # Bandwidth usage (percent) high_speed = 1 # High speed mode (0 for False, 1 for True) +sdk = /path/to/libASICamera2.so # path to the SDK library [Astrometry] sex_config = /path/to/solve.sex