Skip to content

Time Windows

Time windows control when your PhotoWeather rules are active. You can use absolute times, relative times from sunrise/sunset, and astronomical periods to precisely schedule your photography rules.

Fixed clock times that remain constant regardless of season or astronomical events.

Example: Daily time window from 7:00 AM to 9:00 AM in your location’s timezone.

Time ranges calculated relative to sunrise or sunset with minute-based offsets.

Example: Window from 30 minutes before sunrise to 60 minutes after sunrise, automatically calculated daily for your location.

PhotoWeather calculates precise astronomical times for your exact location coordinates with minute-level accuracy.

The golden hour occurs when the sun is between 0° and 6° above the horizon, providing warm, soft light ideal for photography.

Usage: Choose morning only, evening only, or both periods.

Available Periods:

  • morning: Morning golden hour after sunrise
  • evening: Evening golden hour before sunset
  • any: Both morning and evening periods

Photography Tip: Perfect for portraits with warm, directional light

The blue hour occurs when the sun is between 4° and 8° below the horizon, creating deep blue sky conditions.

Usage: Choose evening only, morning only, or both periods.

Available Periods:

  • morning: Morning blue hour before sunrise
  • evening: Evening blue hour after sunset
  • any: Both morning and evening periods

Photography Tip: Ideal for cityscapes with balanced ambient/artificial light

PhotoWeather calculates three distinct twilight phases:

Civil Twilight: Sun 0-6° below horizon

  • Available Periods: dawn, dusk
  • Photography Tip: Soft, even lighting without harsh shadows

Nautical Twilight: Sun 6-12° below horizon

  • Available Periods: dawn, dusk
  • Photography Tip: Horizon visible, first stars appearing

Astronomical Twilight: Sun 12-18° below horizon

  • Available Periods: dawn, dusk
  • Photography Tip: Dark enough for deep-sky astrophotography

Usage: Choose dawn, dusk, or both twilight periods for each type.

Complete darkness when the sun is more than 18° below the horizon - the darkest period between astronomical dusk and dawn.

Usage: Automatically detects the darkest hours of the night.

Available Periods:

  • any: The entire astronomical night period

Photography Tip: Best for Milky Way and deep-sky. Combine with low clouds and high visibility.

The is_daylight astronomical field provides precise day/night period filtering based on sunrise and sunset times for your exact location.

How it Works:

  • Day Period: Starts at sunrise, ends at sunset
  • Night Period: Starts at sunset, ends at sunrise (spans midnight)
  • Automatic Calculation: Adjusts daily based on your location’s astronomical data

Period Selection Modes:

Mode: “any” - Match conditions at any time (day or night)

{
"is_daylight": { "mode": "any" }
}

Note: This effectively applies no time filtering since every hour is either day or night.

Mode: “specific” - Match only during specified periods

// Daytime only (sunrise to sunset)
{
"is_daylight": {
"mode": "specific",
"periods": ["day"]
}
}
// Nighttime only (sunset to sunrise)
{
"is_daylight": {
"mode": "specific",
"periods": ["night"]
}
}

Common Use Cases:

  1. Daytime Landscape Photography

    • Use periods: ["day"] to ensure rules only trigger during daylight hours
    • Perfect for combining with weather conditions like cloud cover for dramatic landscapes
  2. Night Sky Photography

    • Use periods: ["night"] for astrophotography rules
    • Combine with moon visibility and astronomical night for darkest skies
  3. Flexible Scheduling

    • Use mode: "any" when time of day doesn’t matter
    • Useful for weather-driven rules like fog or storm conditions

Example Rules:

Daytime Fog Photography

{
"and": [
{ "is_daylight": { "mode": "specific", "periods": ["day"] } },
{ "visibility": { "max": 5000 } },
{ "temperature_2m": { "min": 0 } }
]
}

Night Storm Watching

{
"and": [
{ "is_daylight": { "mode": "specific", "periods": ["night"] } },
{ "lightning_potential": { "min": 60 } },
{ "cloud_cover": { "min": 70 } }
]
}

Photography Tips:

  • For sunrise/sunset, use relative time windows or golden/blue hour periods for more precision
  • For general day/night filtering, is_daylight is simpler and more maintainable than absolute time windows
  • Combine with astronomical periods (e.g., astronomical night + night period) for very specific conditions

Rules can specify when the moon is above or below the horizon.

Usage: Choose when moon is visible or not visible.

Available Periods:

  • visible: Moon is above the horizon
  • not_visible: Moon is below the horizon

Rules can target specific moon phases for optimal lighting conditions.

Available Phases:

  • new_moon: New moon for darkest skies
  • full_moon: Full moon for bright night illumination
  • quarter: Quarter moon phases

Photography Tip: Full moon for bright illumination, new moon for darkest skies (Milky Way)

Moon Illumination: Percentage of moon disc illuminated

  • Range: 0 to 100%
  • Photography Tip: High illumination for landscapes. Low illumination for astrophotography.

Moon Altitude: Moon’s elevation angle above horizon

  • Range: -90° to 90°
  • Photography Tip: Higher moon provides more light and avoids atmospheric interference

Moon Azimuth: Moon’s compass direction

  • Range: 0° to 360° (0° = North, 180° = South)
  • Photography Tip: Control moon position relative to your subject for optimal lighting
  • All times use the location’s local timezone
  • Automatic daylight saving time adjustments
  • Midnight-crossing windows are considered a continuous period

Rule that triggers during morning golden hour when there’s partial cloud cover (25-60%) for dramatic lighting.

Rule active from 15 minutes before sunrise to 30 minutes after, requiring moderate to heavy cloud cover (40-80%) for colorful skies.

Rule for astrophotography that requires astronomical night conditions when the moon is not visible, ensuring the darkest skies.