specify the ZWO SDK in the config file

It was not obvious that I had to use an environment variable
pull/38/head
Chris Kuethe 2019-09-20 10:16:51 -07:00
parent a6344f628a
commit db6a3c3bf9
3 changed files with 7 additions and 3 deletions

View File

@ -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`

View File

@ -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()

View File

@ -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