Skip to main content

PANOPTES Observatory Control System

Project description

Welcome to POCS documentation!

PAN001


GHA Status Travis Status codecov Documentation Status PyPI version

Project PANOPTES

PANOPTES is an open source citizen science project designed to find transiting exoplanets with digital cameras. The goal of PANOPTES is to establish a global network of of robotic cameras run by amateur astronomers and schools (or anyone!) in order to monitor, as continuously as possible, a very large number of stars. For more general information about the project, including the science case and resources for interested individuals, see the project overview.

POCS

POCS (PANOPTES Observatory Control System) is the main software driver for a PANOPTES unit, responsible for high-level control of the unit.

For more information, see the full documentation at: https://pocs.readthedocs.io.

Install

POCS Environment

If you are running a PANOPTES unit then you will most likely want an entire PANOPTES environment, which includes things like plate-solvers (to tell you what stars you are looking at) and other necessary tools for operation.

There is a bash shell script that will install an entire working POCS system on your computer. Some folks even report that it works on a Mac.

To install POCS via the script, open a terminal and enter (you will be prompted for your sudo password):

curl -fsSL https://install.projectpanoptes.org > install-pocs.sh
bash install-pocs.sh

Or using wget:

wget -qO- https://install.projectpanoptes.org > install-pocs.sh
bash install-pocs.sh

POCS Module

If you want just the POCS module, for instance if you want to override it in your own OCS (see Huntsman-POCS for an example), then install via pip:

pip install panoptes-pocs

If you want the extra features, such as Google Cloud Platform connectivity, then use the extras options:

pip install "panoptes-pocs[google,focuser,testing]"

Running POCS

POCS requires three things to properly run:

  1. Environment variables that tell POCS the location of the main PANOPTES directory ($PANDIR).
  2. A panoptes-utils config-server running to provide dynamic configuration.
  3. An Observatory instance that has details about the location of a POCS unit (real or simulated), which hardware is available, etc.

A minimal working example with a simulated Observatory would be:

import os
from panoptes.utils.config.server import config_server
from panoptes.pocs.observatory import Observatory
from panoptes.pocs.core import POCS

os.environ['PANDIR'] = '/var/panoptes'
conf_server = config_server('conf_files/pocs.yaml')
I 01-20 01:01:10.886 Starting panoptes-config-server with  config_file='conf_files/pocs.yaml'
S 01-20 01:01:10.926 Config server Loaded 17 top-level items
I 01-20 01:01:10.928 Config items saved to flask config-server
I 01-20 01:01:10.934 Starting panoptes config server with localhost:6563

observatory = Observatory()
I 01-20 01:01:16.157 Creating PanDB panoptes
I 01-20 01:01:16.158 Initializing observatory
I 01-20 01:01:16.158 Setting up location
S 01-20 01:01:17.070 Observatory initialized

pocs = POCS(observatory, simulators=['all'])
I 01-20 01:01:20.408 Initializing PANOPTES unit - Generic PANOPTES Unit - Mauna Loa Observatory
I 01-20 01:01:20.419 Making a POCS state machine from panoptes
I 01-20 01:01:20.420 Loading state table: panoptes
S 01-20 01:01:20.485 Unit says: Hi there!
W 01-20 01:01:20.494 Scheduler not present
W 01-20 01:01:20.495 Cameras not present
W 01-20 01:01:20.496 Mount not present
I 01-20 01:01:20.497 Scheduler not present, cannot get current observation.

pocs.initialize()
W 01-20 01:01:28.386 Scheduler not present
W 01-20 01:01:28.388 Cameras not present
W 01-20 01:01:28.389 Mount not present
S 01-20 01:01:28.390 Unit says: Looks like we're missing some required hardware.
Out[10]: False

For a more realistic usage, see the full documentation at: https://pocs.readthedocs.io.

For actually deploying a PANOPTES unit, refer to the Operating Guider.

Developing POCS

See Coding in PANOPTES

Testing

To test the software, you can build a local Docker image using docker-compose.

First clone the repository, then run the following from the project's root directory:

docker-compose -f tests/docker-compose.yaml build

docker-compose -f tests/docker-compose.yaml up

By default that will build and run all tests. If you want to run one specific test, run the pytests test_file.py on the pocs service:

docker-compose -f tests/docker-compose.yaml run pocs "pytest tests/test_mount.py"

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panoptes-pocs-0.7.8.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

panoptes_pocs-0.7.8-py2.py3-none-any.whl (200.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file panoptes-pocs-0.7.8.tar.gz.

File metadata

  • Download URL: panoptes-pocs-0.7.8.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for panoptes-pocs-0.7.8.tar.gz
Algorithm Hash digest
SHA256 9b423118258b383e3fe05813610605311d9171f29f6c3680a8e97a40e83417f4
MD5 e9b45b5d15ce2d0db5de01ab76996fce
BLAKE2b-256 def8fa23c365d7194883eda95af8c2c9eb2635e2996da8c981a8d33f42c9523f

See more details on using hashes here.

File details

Details for the file panoptes_pocs-0.7.8-py2.py3-none-any.whl.

File metadata

  • Download URL: panoptes_pocs-0.7.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 200.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for panoptes_pocs-0.7.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f94468018c7baf6b5fef50635c7892b76a28eec746a6e56bee94439d39bc3e4b
MD5 c649b8a8410201db3d142176a3e39071
BLAKE2b-256 bd08f00262145a2f235d30d1ad0920da72410dd9f87f43f757bce43fe3aeffa8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page