TychoCam

The Technology

Rather than relying on heuristic thresholds, the system uses a physically informed, parameterized clear-sky model combined with image differencing to identify clouds under daylight conditions. This approach balances physical realism with computational efficiency, enabling continuous, unattended operation in support of ALPACA observing conditions reporting.

 Measuring the Alpaca Required Observing Conditions

The TychoCam leverages several hardware technologies and software techniques to determine the ASCOM Observing Conditions and to present these in a meaningful and useful manner both on the website and on the APIs The API is in compliance with the ASCOM standards.

Hardware  Gauges and Measurements

Hardware technologies to precisely measure conditions at a geographic location are attached to the Tychocam. The TychoCam integrates the following hardware (with a considerable amount of supporting custom software):

Ambient Temperature Infrared Sky Temperature Wind Speed and Direction
Relative Humidity Rain Intensity Barometric Pressure
Sky Brightness LUX Sky Quality Bortle
Wind Gust 

Calculated Observed Conditions

StarFWHM Cloudiness

These conditions are created from comparing the image to the Bright Star Catalog. This resultant measurements are provided in the required format and measures (LUX, Bortle, arc-secs, metric, etc). This data is available on the user web site as well as the API's.

As backup to the local conditions reporting hardware, the TychoCam will query the local National Weather Service to provide for the missing data.  

Image Processing - Astronomical Night

An image is taken every 30 ms to 60 seconds with the 2080x2080 color astronomy camera and  fish-eye lens. The image is processed as follows (simple explanation):

  • Transform the Bright Star Catalog according to location, magnitude and  time, and other parameters (altitude...).
  • Transform the image per a transform matrix (rotation, fisheye mapping)
  • Find likely stars in the image
  • Flatten the fisheye image to match the star catalog
  • Create and apply moon and user provided masking
  • Calculate average starFWHM from a selection of stars
  • Plot the image with likely, found, and not found stars
  • Calculate cloudiness by comparing found/not found catalog stars
  • Plot constellation or range rings
  • Add optional data to the image legend for convenience; Cloudcover, temperatures, dewpoint, skytemperature...
Image Processing — Daytime and Twilight Cloud Detection

Daytime cloud detection presents a fundamentally different problem from nighttime astronomical imaging. During daylight and twilight, observed sky brightness is dominated by solar illumination, atmospheric scattering, horizon gradients, and wavelength-dependent attenuation, requiring a physically modeled reference approach rather than direct thresholding.

To address this, the system computes an idealized clear-sky radiance model for the current observing geometry and compares it to the observed camera image in real time.

Clear-Sky Reference Modeling

The clear-sky model estimates the expected sky radiance as a function of:

  • Solar zenith angle
  • Atmospheric scattering and attenuation
  • Viewing direction, using a pixel-wise line of sight
  • Instrument geometry and lens projection

The model accounts for wavelength-dependent atmospheric scattering, where shorter wavelengths scatter more strongly than longer wavelengths. As solar elevation decreases, increased atmospheric optical depth produces stronger gradients, horizon reddening, and asymmetric sky illumination.

This behavior is approximated using parameterized Rayleigh and aerosol, or Mie, scattering components optimized for real-time operation.

Adaptive Illumination Regimes

The system dynamically operates in four observing regimes:

Mode Description
Day Mode Used when the Sun is well above the horizon. The daytime atmospheric scattering model operates normally with full cloud sensitivity.
Dawn Twilight Mode Activated while the Sun is rising through low elevations. Cloud detection sensitivity is reduced to prevent atmospheric illumination gradients from being misclassified as clouds.
Dusk Twilight Mode Activated while the Sun is descending through low elevations. Exposure normalization, thresholding, and cloud estimation are damped to suppress false cloud detection caused by twilight scattering and rapid exposure adaptation.
Night Mode Used during astronomical darkness, where cloud estimation relies primarily on stellar extinction, background brightness, and nighttime image analysis.

This multi-regime approach improves cloud stability during sunrise and sunset transitions while preserving daytime and nighttime detection accuracy.

Twilight Gradient Suppression

Twilight presents a difficult imaging environment due to:

  • Strong horizon illumination gradients
  • Rapid changes in exposure and sky brightness
  • Increased atmospheric path length
  • Lens flare and scattered solar illumination

To improve robustness during twilight operation, the system applies additional controls, including:

  • Adaptive threshold scaling
  • Exposure normalization damping
  • Local background flattening
  • Reduced cloud-confidence weighting
  • Transitional blending between day and night operating modes

These controls significantly reduce false cloud estimates during sunrise and sunset transitions.

Image Differencing and Cloud Isolation

For each frame:

  1. A clear-sky radiance image is synthesized for the current Sun position and camera geometry.
  2. The observed image is geometrically corrected using a transformation matrix.
  3. The modeled clear-sky image is subtracted from the observed image to isolate cloud-related residuals.
  4. Solar and lunar regions are masked to eliminate direct illumination artifacts.
  5. Fixed obstructions are excluded using site-specific masks.
  6. Large-scale background gradients may be removed during twilight operation.

The remaining residual regions are classified as cloud candidates.

Cloud Fraction Estimation

Cloudiness is reported as fractional sky coverage, computed from the percentage of valid sky pixels exceeding the modeled clear-sky residual threshold after masking and correction.

During twilight operation, cloud estimates may be damped or blended with prior measurements to improve temporal stability and suppress false positives caused by atmospheric illumination gradients.

This approach provides:

  • Quantitative cloud coverage estimation
  • Reduced sensitivity to absolute brightness
  • Improved stability during twilight transitions
  • Robust performance across changing atmospheric and solar conditions
Optional Overlays and Diagnostics

For visualization and diagnostic purposes, optional overlays may include:

  • Solar and lunar positions
  • Sky coordinate grids
  • Constellation outlines
  • Environmental sensor values
  • Observing-condition metadata

These overlays do not affect cloud detection calculations.