Overview
Themlim module calculates the visual limiting magnitude for an observer based on the Bortle dark-sky class and the altitude angle of the observed celestial object.
calculate_mlim
Calculates the visual limiting magnitude adjusted for altitude angle.Parameters
Bortle class (1-9) representing sky darkness
Altitude angle above the horizon in degrees (clamped to 10-90°)
Atmospheric extinction coefficient (typically 0.15-0.45)
- 0.15: Exceptionally clear, high altitude
- 0.25: Typical conditions (default)
- 0.45: Hazy or humid conditions
Returns
Estimated limiting magnitude at the specified altitude
Formula
The zenith limiting magnitude is calculated as: Where is the Bortle class. This is then adjusted for altitude using atmospheric extinction:Example
calculate_mlim_from_sqm
Convenience function to calculate limiting magnitude directly from SQM reading.Parameters
Sky brightness in mag/arcsec²
Altitude angle in degrees
Atmospheric extinction coefficient
Returns
Estimated limiting magnitude
Example
sqm_to_bortle_class() and then calls calculate_mlim().
See Also
- Bortle Scale - Convert SQM to Bortle class
- Light Pollution Concepts - Understanding the DVNL → SQM → Bortle pipeline