Skip to main content

Astronomical utilities for PANOPTES

Project description

PANOPTES Utilities

PANOPTES Logo


GHA Status codecov Documentation Status PyPI version

Utility functions for use within the Project PANOPTES ecosystem and for general astronomical processing.

This library defines a number of modules that contain useful functions as well as a few services.

Install

To install type:

pip install panoptes-utils

Full options for install:

pip install "panoptes-utils[config,docs,images,testing,social]"

See the full documentation at: https://panoptes-utils.readthedocs.io

Dependencies

There are a few system dependencies depending on what functionality you will be using.

In particular, the plate solving requires astrometry.net and the appropriate index files.

Use the following on a debian-based system (e.g. Ubuntu) to easily install all dependencies:

apt-get update && apt-get install --no-install-recommends --yes \
  libffi-dev libssl-dev \
  astrometry.net astrometry-data-tycho2 \
  dcraw exiftool libcfitsio-dev libcfitsio-bin \
  libfreetype6-dev libpng-dev libjpeg-dev libffi-dev

Command Line

The panoptes-utils command line tool is available for use with subcommands corresponding to the modules in this library. Currently, the only implemented subcommand is image, which includes commands for converting cr2 files into jpg and/or fits files as well as for plate-solving fits images.

The panoptes-utils image watch <path> command will watch the given path for new files and convert them to jpg and/or fits files as they are added.

See panoptes-utils --help and panoptes-utils image --help for details.

Config Server

There is a simple key-value configuration server available as part of the module.

After installing with the config option as above, type:

panoptes-config-server run --config-file <path-to-file.yaml>

Development with Hatch

This project uses the Hatch build system and environment management.

Prerequisites:

  • Python 3.12+
  • Hatch: https://hatch.pypa.io (install via pipx install hatch or pip install --user hatch).

Basic workflow:

  • Create and enter a dev environment with all testing tools:

    hatch env create
    hatch shell
    # or run commands without activating the shell using `hatch run ...`
    
  • Install optional extras as needed (choose any):

    # Examples: google, focuser, sensors, weather
    hatch run pip install -e ".[config,images,testing]"
    
  • Run tests:

    # All tests with coverage, using pytest options from pyproject.toml
    hatch run pytest
    
    # Single test file
    hatch run pytest tests/test_utils.py
    
  • Lint / style checks:

    # Lint (Ruff)
    hatch run lint
    # Format (Ruff)
    hatch run fmt
    # Check formatting without changes
    hatch run fmt-check
    
  • Build the package (wheel and sdist):

    hatch build
    
  • Run the CLI locally (Typer app):

    hatch run pocs --help
    
  • Versioning: Version is derived from git tags via hatch-vcs. To produce a new version, create and push a tag (e.g., v0.1.0).

[Testing]

To test the software, prefer running via Hatch so the right environment and options are used:

hatch run pytest

By default all tests will be run. If you want to run one specific test, give the specific filename as an argument to pytest:

hatch run pytest tests/test_mount.py

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_utils-0.2.53.tar.gz (60.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

panoptes_utils-0.2.53-py3-none-any.whl (74.3 kB view details)

Uploaded Python 3

File details

Details for the file panoptes_utils-0.2.53.tar.gz.

File metadata

  • Download URL: panoptes_utils-0.2.53.tar.gz
  • Upload date:
  • Size: 60.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for panoptes_utils-0.2.53.tar.gz
Algorithm Hash digest
SHA256 e4024e5e7c7f605d2d4ec29fc4388de1c1e0130c55b0fda7f6c7421d9f84adbd
MD5 5a3a777b42f3d67c1f6a3379f28d05dc
BLAKE2b-256 d7b5443bb166ce6304730b842a3a21ab40df640c3930f4090c2e87b9ec8ce391

See more details on using hashes here.

File details

Details for the file panoptes_utils-0.2.53-py3-none-any.whl.

File metadata

File hashes

Hashes for panoptes_utils-0.2.53-py3-none-any.whl
Algorithm Hash digest
SHA256 4087335b3db3dbb94978233af6d593e508112b176a88a4ddd83367c2ddece86e
MD5 81169e45b49120da3ed0e5ba910123a9
BLAKE2b-256 4cd379a8fa32f720059bbbe9d608952b012ec9560e933150e57eac6f12d7a1d1

See more details on using hashes here.

Supported by

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