Skip to main content

A hypermodern, type-safe, zero-dependency python library for the Boltwood II & III cloud sensors.

Project description

pypi versions License: MIT boltwood/test

Boltwood

Modern, type-safe, zero-dependency python library for controlling the Boltwood III observing conditions sensor.

Installation

uv add boltwood

or

using your preferred environment / package manager of choice, e.g., poetry, conda or pip:

pip install boltwood
poetry add boltwood
conda install boltwood

Usage

To use the conditions monitor, you need to create an instance of the BoltwoodIIIConditionsMonitorDeviceInterface class with the appropriate parameters.

Below is a simple example of how to set up and use the Boltwood III Conditions Monitor:

from boltwood import (
    BoltwoodIIIConditionsMonitorDeviceInterface,
    BoltwoodIIIConditionsMonitorDeviceParameters,
)

# Define the parameters for the BoltwoodIII monitor device:
params: BoltwoodIIIConditionsMonitorDeviceParameters = BoltwoodIIIConditionsMonitorDeviceParameters(
    name="Boltwood III Conditions Monitor",
    description="Boltwood III Conditions Monitor",
    port="/dev/ttyUSB0",  # Replace with your actual port
    baudrate=9600,
    latitude=33.87047,
    longitude=-118.24708,
    elevation=0.0,
    did="0", # Device ID
    vid="067b",  # Vendor ID
    pid="23a3",  # Product ID
)

# Create a new Boltwood III Conditions Monitor device interface:
monitor = BoltwoodIIIConditionsMonitorDeviceInterface(
    id=0,
    params=params,
)

# Initialise the monitor:
monitor.initialise()

# Get the current status of the monitor:
status = monitor.get_status()

...

To use the safety monitor, you can create an instance of the BoltwoodIIISafetyMonitorDeviceInterface class in a similar way:

from boltwood import (
    BoltwoodIIISafetyMonitorDeviceInterface,
    BoltwoodIIISafetyMonitorDeviceParameters,
)

# Define the parameters for the BoltwoodIII safety monitor device:
params: BoltwoodIIISafetyMonitorDeviceParameters = BoltwoodIIISafetyMonitorDeviceParameters(
    name="Boltwood III Safety Monitor",
    description="Boltwood III Safety Monitor",
    port="/dev/ttyUSB0",  # Replace with your actual port
    baudrate=9600,
    did="0", # Device ID
    vid="067b",  # Vendor ID
    pid="23a3",  # Product ID
)

# Create a new Boltwood III Safety Monitor device interface:
safety_monitor = BoltwoodIIISafetyMonitorDeviceInterface(
    id=0,
    params=params,
)

# Initialise the safety monitor:
safety_monitor.initialise()

# Get the current status of the safety monitor:
status = safety_monitor.get_status()

...

As the boltwood instance is fully typed, you can use your IDE's autocompletion to see all the available methods and properties.

We have also provided further usage examples in the examples directory.

Milestones

  • Type-safe modern 3.6+ Python
  • Fully unit tested
  • Simpler API (modelled around the ASCOM Alpaca API)
  • Integration testing with HIL testing (hardware-in-the-loop)
  • Zero-external dependencies (no numpy, astropy etc for portability)
  • Example API usage
  • Fully supported Observing Conditions Sensor operations
  • Fully supported Safety Monitor operations
  • Fully supported Alert Threshold operations
  • ASCOM Alpaca APIs w/Fast API

Disclaimer

This project is not affiliated with Diffraction Limited in any way. It is a community-driven project. All trademarks and logos are the property of their respective owners.

License

This project is licensed under the terms of the MIT license.

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

boltwood-0.2.0.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

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

boltwood-0.2.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file boltwood-0.2.0.tar.gz.

File metadata

  • Download URL: boltwood-0.2.0.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for boltwood-0.2.0.tar.gz
Algorithm Hash digest
SHA256 76e68e0ca574598fc4d5a1776baaf01a5bf559265803e7629a1535ec370eaed2
MD5 b63d2323a3a306305a687d8a46f5bad7
BLAKE2b-256 13be8171c6d46e431557353def740fe6c56942cefb17cea0bff89554ec514df9

See more details on using hashes here.

Provenance

The following attestation bundles were made for boltwood-0.2.0.tar.gz:

Publisher: publish.yml on michealroberts/boltwood

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file boltwood-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: boltwood-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for boltwood-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef9e589a4fc0926e6cb362a34aa7e93edca9474c9fd0c0368775ea3fef6ddf55
MD5 31cb21c7c09ac7a4fef79ff7bc4e2812
BLAKE2b-256 efa9a9431299a2d027130624f3f2db1348cb3ad5457129f8ea459801a5c4723e

See more details on using hashes here.

Provenance

The following attestation bundles were made for boltwood-0.2.0-py3-none-any.whl:

Publisher: publish.yml on michealroberts/boltwood

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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