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):
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.
The clear-sky model estimates the expected sky radiance as a function of:
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.
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 presents a difficult imaging environment due to:
To improve robustness during twilight operation, the system applies additional controls, including:
These controls significantly reduce false cloud estimates during sunrise and sunset transitions.
For each frame:
The remaining residual regions are classified as cloud candidates.
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:
For visualization and diagnostic purposes, optional overlays may include:
These overlays do not affect cloud detection calculations.