GithubHelp home page GithubHelp logo

pyoculus's Introduction

pyOculus

Python set up for Oculus allsky camera on Raspberry Pi. The code is currently running on an Starlight Xpress Oculus installed in the Brecon Beacons National Park, in South Wales. More details about the installation are on my blog, Dark Matter Sheep.

Setup

  • A Raspberry Pi
  • Need to install INDI server for Raspberry Pi.
  • Install Swig via sudo apt-get install swig you may need to do sudo apt-get install -f to get the dependencies
  • You may also need to install python dev using sudo apt-get install python-dev
  • I recommend doing this inside a virtualenv or a conda environment, to prevent funny stuff with permissions.
  • Install the [PyINDI client] by doing
pip3 install pyindi-client
  • Note: This code now uses Python 3. If you need a code using Python 2, use the V1.0 release.
  • I use s3cmd to transfer the images to Amazon S3 but you could copy them to any other location off the Pi.

You should already have python and git if you are using Raspbian.

[OPTIONAL INSTALLS]

  • I use ImageMagick (for JPEG compression) and FFMPEG for making the video of the timelapse You will have to add the following to your /etc/apt/sources.list to get ffmpeg
deb http://ftp.uk.debian.org/debian jessie-backports main

Then running following should install ffmpeg and ImageMagick fine.

sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install imagemagick

Instructions

The INDI server handles all the communication with the camera, so the server has to be running for this code to be able to talk to the camera. In my case Oculus uses a Starlight Xpress CCD, so I started the camera with:

indiserver -v -m 100 indi_sx_ccd

This needs to be running when you do the next step, so open a new terminal (or if you are running headless, open another ssh session).

python snapper.py --test

will save a file called latest.fits after taking an image.

Testing Setup

If you are in doubt of whether the camera is connected and working, you can run the following test script (assuming the INDi server is running):

python pyOculus/test-indiclient.py

pyoculus's People

Contributors

zemogle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyoculus's Issues

snapper.py code execution error

python3 snapper.py --test
2021-09-23 12:04:07,046 creating an instance of PyQtIndi.IndiClient
INDI::BaseClient::connectServer: creating new connection...
INDI::BaseClient::connectServer: Already connected.
Server connected (localhost:7624)
2021-09-23 12:04:07,046 Set new device SX CCD SuperStar!
2021-09-23 12:04:07,046 Got property CONNECTION for <PyIndi.BaseDevice; proxy of <Swig Object of type 'INDI::BaseDevice *' at 0x7fe72e381cf0> >!
2021-09-23 12:04:07,048 new Text DRIVER_INFO for device SX CCD SuperStar
2021-09-23 12:04:07,048 new Switch CONNECTION for device SX CCD SuperStar
2021-09-23 12:04:07,048 <<<<<<<< Exposure >>>>>>>>>
Traceback (most recent call last):
File "/home/sebastian/Documentos/pyOculus-master/indiclient.py", line 32, in newProperty
self.takeExposure()
File "/home/sebastian/Documentos/pyOculus-master/indiclient.py", line 71, in takeExposure
exp[0].value = self.exptime
TypeError: 'INumberPropertyview' object does not support indexing
BaseClient::~BaseClient: Probability of detecting a deadlock.

that object indexing faill

Swig issue during installation

Hi.

I have been trying to use your code, but when I try to run "pip3 install pyindi-client" i get an error related with swig. Attached you will see the log file obtained with the pip3 instruction
logfile_swig.txt

Any idea what could be the problem?

I am using a raspberry pi 3 b+.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.