DarkSkySites Dev Blog
Development updates and behind-the-scenes notes from DarkSkySites, the astronomy and astrophotography light pollution mapping tool.
See the Sky Before You Travel: Introducing APEX
- Entry #1778087214307
Choosing a dark-sky site has always involved a bit of guesswork. A map can tell you how bright an area is, but it cannot always show what the sky may look like when you arrive.
APEX is built to close that gap.
APEX is the new DarkSkySites light pollution simulator. It turns DSS map data into a visual prediction of the sky from a real observing location, helping you understand the shape, direction, and intensity of artificial skyglow before you travel.
The simulator includes several viewing modes. Hammer-Aitoff projection gives a full-sky scientific-style view. 360 All Sky shows the complete sky dome around your selected site. 3D first-person mode lets you pan around as if you were standing there in person. X-Band false colour reveals subtle glow structures that are difficult to see in a normal visual rendering.
APEX also includes beautiful natural-colour, photorealistic atmospherics. It renders glow morphology: how domes form, flatten, spread, fade, and interact with the horizon. Natural-colour mode is designed to feel intuitive and realistic, while X-Band complements it by exposing faint or complex structure that may be harder to read visually.
Compared with the old simulator, APEX is a major step forward. The previous version was useful, but more limited in how it represented horizon glow, distant cities, and directional sky brightness. APEX is more atmospheric, more immersive, and more site-aware.
It also validates very well against real-world observations. The goal is practical: answer the question every observer asks before committing to a site:
What will the sky look like when I get there?
That matters because two locations with similar map values can feel very different under the stars. One may have a clean northern horizon but a bright southern dome. Another may be protected by terrain. Another may look dark overhead but be compromised low in the direction of your target.
APEX helps reveal those differences before you pack the car, book the trip, or commit an imaging night.
It all runs fast in the browser. You need WebGL enabled and a modern browser, with no separate app or heavyweight download.
DarkSkySites has always been about helping people find better skies. With APEX, you can now see them before you go.
Clear skies,
Barrington
Time Warp Implementation
- Entry #1769507758106
The longest-standing goal of the platform was to implement a method where the user can warp back and forwards through time to see the Earth and its anthropogenic lights changing over months and years.
Today this feature was delivered!
I invested heavily over the last few months to build a robust data pipeline that automates retrieval of VIIRS datasets (can be annual, monthly, daily) directly from NASA, performs all the calibration, normalization, and physics, then loads the data to the site for browsing. That pipeline is now fully operational.
You can click the current date in the footer, which opens a shuttle where you can advance or rewind through time, or simply use the arrow keys on your keyboard.
What's interesting is that you can observe the changing Earth. See fishing fleets moving seasonally in the Pacific, watch cities develop in India, see Iraq rebuild after conflict, note Ukraine sadly going dark, watch the expansion of Dubai, observe France's shift to low-emission lighting, see gas platforms switch on and off, watch the coming and going of mining operations in remote areas... All super cool.
Currently the data is relatively sparse, most of 2025, and Januaries for preceding years. But I'll continually compute and load the intermediate data over the coming weeks. There's a lot - tens of gigabytes, and the compute takes time to process. The pipeline is robust now, so it's a mostly automated endeavour from this point on.
I hope you enjoy this new development.
Clear skies!
Barrington
Major new model updates - LUMIX + LFCC
- Entry #1766921263067
Over the past few months I’ve been rebuilding the light pollution physics engine behind DarkSkySites from the ground up. This post documents where it landed, why the rewrite was necessary, and what problems the new model is explicitly designed to solve.
This is not a blur-based visualization, nor a reskin of VIIRS or legacy atlases. It is a Garstang-class atmospheric light propagation model, implementing radiative-transfer–based scattering physics in a form that remains computationally viable at global scale.
**Why the original model hit a ceiling**
The previous engine formulated the problem in an observer-centric framework, explicitly integrating atmospheric scattering toward each output location. That formulation is physically valid, and it works well at small scales.
However, it reaches a ceiling when modeling:
- extended sources
- integrated flux
- horizon-scale emission geometry
- second-order scattering across large domains
Once realistic horizon glow and secondary scattering are introduced, the formulation becomes increasingly constrained. Preserving physical consistency across regional and continental scales becomes difficult, not because the physics is wrong, but because the structure of the solver cannot represent those effects cleanly.
The rewrite was not motivated by performance alone. It was motivated by model accuracy.
**Design goals**
The new engine was built around a small set of non-negotiable goals:
- preserve physically meaningful scattering behavior
- preserve long-range horizon glow
- preserve altitude and atmospheric structure
- enable physically consistent behavior at global scale
- remain stable under iterative calibration
**The new approach**
The new model reformulates light propagation in a source-centric, spatially invariant framework, enabling integrated source flux, emission geometry, and horizon-scale scattering behavior to be represented explicitly within the radiative transfer formulation.
Instead of asking “what does each observer see?”, the model asks “how does light physically spread across the surface?”
At its core is a zenith-integrated Garstang-class scattering kernel that explicitly models:
- Rayleigh and Mie scattering
- forward-peaked aerosol phase functions
- vertical atmospheric density profiles
- altitude via a global digital elevation model, with functional (but currently basic) terrain shielding
- Earth curvature, which becomes significant beyond ~150 km
- non-isotropic urban emission (sideways leakage vs vertical emission)
The engine implementing this formulation is called LUMIX.
**What this fixes**
Early testing of the previous engine revealed two persistent issues when compared against ground-based measurements:
- light from small settlements propagated too far
- light from large cities failed to build sufficiently extended domes
This was not a tuning problem. It was a structural limitation of the propagation model.
The earlier formulation treated all sources too similarly in how they spread light horizontally. That assumption breaks down once source extent and total flux matter.
In LUMIX, integrated source flux and spatial extent are intrinsic to propagation.
As a result:
- small settlements naturally produce compact, rapidly decaying glows
- large urban regions produce broad, layered domes with realistic far-field behavior
This behavior is not imposed heuristically and does not rely on thresholds. It emerges directly from:
- flux-aware source integration
- sideways emission profiling
- geometry-aware scattering and extinction
The earlier “small towns glow too much” failure mode disappears because the physics no longer permits it.
**Additional physics upgrades**
Beyond the new propagation formulation, LUMIX incorporates several major upgrades:
**Earth curvature**
Flat-Earth assumptions quietly fail at long range. The kernel integration now includes curvature-induced horizon drop and terrain shadowing, significantly improving distant glow realism.
**DEM-aware altitude attenuation**
High-altitude sources propagate differently, and high-altitude observers see less low-level glow. Altitude attenuation is applied both before and after propagation using a DEM aligned to the VIIRS grid.
**Rayleigh + Mie balance**
Scattering integrals explicitly include Rayleigh and Henyey–Greenstein Mie terms with tunable scale heights and asymmetry. This is not a generic blur kernel.
**Controlled second-order scattering**
Instead of a full second radiative transfer solve (physically appealing but numerically unstable), secondary scattering is modeled as a constrained, low-frequency energy reinjection based on single-scatter albedo and zenith probability. This produces realistic skyglow buildup without runaway amplification.
**Aerosol coupling**
The model can interpolate between “clear” and “murky” atmospheric kernels using CAMS aerosol optical depth data, allowing regional atmospheric conditions to influence glow extent and shape. CAMS datasets can be reintegrated on demand.
**Stability and repeatability**
The propagation model remains stable and physically consistent at local, continental, and global scales, enabling frequent recomputation and time-resolved sky brightness analysis rather than reliance on static atlases.
**Performance and update cadence**
Because the physics has been reformulated, the system is operational rather than academic.
In practice:
- global recomputation completes in ~3–4 hours on desktop-class hardware
- VIIRS data can be ingested automatically every 24 hours-
- the pipeline is fully automated end-to-end
Daily global maps are therefore technically trivial to produce.
However, accuracy matters more than frequency.
The current rollout plan is:
- monthly updates initially
- weekly updates once calibration stabilizes
- daily updates later if confidence and community appetite justify it
**LLFC: Local Light Field Calibration**
The most important system-level addition is LLFC (Local Light Field Calibration).
Most light pollution maps are static. Once published, their assumptions are frozen. If they are locally wrong, they cannot learn.
LLFC changes that.
It allows a physically based scattering model to be continuously constrained using empirical sky brightness measurements, without overriding the underlying radiative transfer physics. To my knowledge, no existing global light pollution map operates this way.
At present, LLFC ingests SQM (Sky Quality Meter) measurements only, from both fixed stations and handheld devices. This choice is deliberate: SQM provides a well-characterized, instrument-based, quantitatively comparable measurement regime.
SQM data is used to locally and regionally constrain:
- effective scattering strength
- aerosol influence
- secondary scattering contribution
- near-horizon glow behavior via terrain shielding
No single site can rewrite the map. Repeated, independent measurements allow convergence where global assumptions break down.
Users can also provide location-specific qualitative feedback (thumbs-up / thumbs-down with context). These signals do not directly modify the physics, but flag regions requiring closer evaluation.
Support for real-time SQM sensor feeds is planned.
The division of responsibility is explicit:
LUMIX defines physical propagation behavior
LLFC anchors that behavior empirically
Together, they form a living, community-calibrated physical model.
**Current status**
The model is currently in beta and undergoing active calibration.
Discrepancies between modeled and observed sky brightness are expected at this stage and are valuable. Submitting SQM data via the “Submit SQM” function directly improves the model locally and regionally.
This is not a finished static product. It is a physically grounded system designed to improve through real observation and frequent recomputation.
An update on new models
- Entry #1751988151475
A huge thank-you to everyone who's submitted SQM readings and brightness anomalies recently. As mentioned previously, these discrepancies arise from limitations in the current propagation model.
The good news is that I've made substantial progress on a new volumetric simulation that produces more accurate results, correctly integrating total flux over spatially extended urban areas.
The current model relies on Fast Fourier Transforms to estimate scattering. While efficient, this approach is not sufficient to fully capture the complexity of atmospheric radiative transfer. As a result, I rebuilt the core propagation system from scratch. The next release will include a significantly more advanced framework with the following properties:
- Physically accurate molecular and aerosol treatment for Rayleigh and Mie scattering.
- Full radiative transfer computation over a multi-layer 50km volumetric atmosphere.
- Phase-dependent directional extinction based on Garstang models.
- Integrated flux computation at both local and regional scales.
- Observer-centric, two-bounce, double-integration model for realistic sky rendering.
I am currently in the final stages of testing the new pipeline and expect to ship a test update within the next two weeks. The daily map update is paused until the upgraded system is ready.
Thank you for your continued support.
Barrington
@baz_astra
Notes on DarkSkySites 2.0
- Entry #1750284898441
DSS version 2 has generated far more interest than I anticipated since launching yesterday. I am genuinely overwhelmed by the support, feedback, and calibration data many of you have already shared. I am deeply grateful for every message and contribution.
DarkSkySites is a one-person project, squeezed between my day job, and time spent pondering the correct backfocus for my EdgeHD. As you might imagine, there aren't enough hours in the day!
A few notes about the v2 release today:
1. Converting absolute radiance to SQM and Bortle scales is non-trivial. The mapping must remain valid across a wide range of environmental conditions, and I'm working to refine the mapping using real-world calibration.
2. DSS uses a custom light propagation algorithm that scatters ground-based VIIRS radiance into the atmosphere. This is the physics that produces skyglow around cities. Based on community feedback and photometric validation, it is clear that the current model over-propagates light from small settlements and under-propagates light from major metropolitan areas. This explains, for example, why the Midwestern United States appears too bright and why Europe, especially the Netherlands, is under-reported.
I have traced the issue to an overly aggressive convolution kernel within the radiative transfer pipeline that computes skyglow from the VIIRS upward radiance. I will continue to fine-tune this kernel so the propagation more accurately reflects measured reality.
All light propagation models are ultimately approximations, and I expect to converge on a robust general solution in the coming weeks.
3. The All-Sky LP Simulator is still in its infancy. To the best of my knowledge it's a world-first, so there was no precedent to follow. Even so, I hope you find it both useful and exciting. There are a few issues with the sliders that I am resolving, since the rendering engine has been temperamental following the 2.0 upgrade.
In the longer term, the simulator will be replaced by APEX, an experimental atmospheric physics engine. APEX uses a more accurate scattering shader and will generate physically realistic skyglow that accounts for horizon extinction, beyond-horizon scattering, Earth curvature, lunar contamination, and other atmospheric effects.
Finally, special thanks to my good friends Rene Fonteijn, without whose pub brainstorming sessions, this project likely wouldn't exist - and to my almost-CTO, Ashik Salahudeen, to whom I dedicate this website as a monument to his indolent magnificence.
Clear skies,
Barrington
Where does the data come from?
- Entry #1750284829762
A common question I receive is about the origin of the data used on DarkSkySites and how it is applied throughout the platform.
DSS currently relies on the VNP46A1 Daily Gridded DNB Band dataset, providing VIIRS nighttime radiance at 500 meter resolution.
This data is downloadable from NASA every 24 hours. Once retrieved, the data is processed through a custom geospatial pipeline, that also reprojects the map to WebMercator using GDAL.
After reprojection, light sources are propagated through a virtual atmosphere using a set of multi-scale halo convolution kernels that compute zenith radiance for every map pixel as a consequence of atmospheric scattering.
These kernels approximate the radiative transfer physics in Garstang's work, and build upon refinements described by Cinzano and Falchi. Radiative transfer modelling underpins all attempts at realistic light pollution simulation, so finding an accurate and efficient implementation has been central to the development of DSS.
The current scattering algorithm is a high-performance Fast Fourier Transform written in Python. It's computationally intensive; taking around 80 hours to model the whole world.
Optimizing these models has taken significant time, and I continue to refine the solution as I learn more about the behavior and limitations of the output.
VIIRS data comes with instrinsic constraints. The sensor cannot reliably distinguish between artificial light and certain natural albedo features, including snow, ice, frost, and wildfire activity. As a result, seasonal snow cover may produce bright artefacts at high latitudes, and wildfires can appear as isolated glowing regions in areas with little or no permanent population.
If necessary, DSS may transition to the VIIRS monthly composite products, which include more effective masking for snow and fire contamination.
On a broader note, it was important to me not to simply copy existing light pollution maps, as most websites do.
Building my own data pipeline and propagation model was a core goal of this project. Rather than duplicating the work of LightPollutionMap or Lorenz, I wanted DSS to perform real physics and implement data architectures capable of calculating these phenomena natively and on demand.
The models are still evolving, but I believe that the long-term investment in mathematical rigor, once fully calibrated, will be worth it.
Thank you for your patience as the models continue to mature.