style: replace em dashes with colons in docs and wiki

This commit is contained in:
Aric Camarata 2026-03-08 17:28:03 -04:00
parent 85f02365f5
commit 155217265d
16 changed files with 151 additions and 151 deletions

View file

@ -60,8 +60,8 @@ The MSC entry uses MSC minutes offsets relative to the SPA-computed sunrise/suns
The only runtime dependency is `nrel-spa`. It provides:
- `getSpa(date, lat, lng, tz, opts, zeniths)` batch NREL SPA computation
- `formatTime(fractionalHours)` converts `5.5` to `"05:30:00"`, returns `"N/A"` for NaN
- `getSpa(date, lat, lng, tz, opts, zeniths)`: batch NREL SPA computation
- `formatTime(fractionalHours)`: converts `5.5` to `"05:30:00"`, returns `"N/A"` for NaN
The SPA (Solar Position Algorithm) from the National Renewable Energy Laboratory is
the reference algorithm for solar position. It is accurate to within ±0.0003° and
@ -72,8 +72,8 @@ covers dates from -2000 to +6000.
`getSolarEphemeris` implements Jean Meeus, *Astronomical Algorithms* (2nd ed.),
Chapter 25. This provides:
- Solar declination (δ) accurate to ~0.01°
- Earth-Sun distance (r) in AU accurate to ~0.0001 AU
- Solar declination (δ): accurate to ~0.01°
- Earth-Sun distance (r) in AU: accurate to ~0.0001 AU
- Apparent ecliptic longitude (λ) in degrees
These values are used by `getAngles` to apply physics corrections to the MSC base
@ -105,8 +105,8 @@ This is faster than an SPA call and avoids a dependency on internal ephemeris st
All public types are in `src/types.ts` and re-exported from `src/index.ts`. The key
distinction is:
- `FractionalHours` (`number`) raw output from `getTimes` / `getTimesAll`
- `TimeString` (`string`) formatted output from `calcTimes` / `calcTimesAll`
- `FractionalHours` (`number`): raw output from `getTimes` / `getTimesAll`
- `TimeString` (`string`): formatted output from `calcTimes` / `calcTimesAll`
`PrayerTimesAll` extends `PrayerTimes` rather than duplicating fields. The `Methods`
map uses string keys (method IDs) rather than a union type, to allow forward

View file

@ -47,10 +47,10 @@ and declination are far apart.
`getAsr` is a pure math function. It requires:
1. `solarNoon` fractional hours (from the SPA output)
2. `latitude` decimal degrees
3. `declination` solar declination in degrees (from `solarEphemeris`)
4. `hanafi` boolean (default `false`)
1. `solarNoon`: fractional hours (from the SPA output)
2. `latitude`: decimal degrees
3. `declination`: solar declination in degrees (from `solarEphemeris`)
4. `hanafi`: boolean (default `false`)
```typescript
import { getAsr } from 'pray-calc';
@ -76,7 +76,7 @@ for any realistic use case.
The SPA uses a more rigorous ephemeris for declination (accurate to ~0.0003°
vs. Meeus at ~0.01°). For Asr, the difference in δ of 0.01° translates to less
than 5 seconds of timing error completely negligible.
than 5 seconds of timing error: completely negligible.
---

View file

@ -71,7 +71,7 @@ deeper depression. Conversely, at aphelion, the sky stays darker a bit longer.
Δr = -0.5 × ln(r) (degrees)
```
This correction is ±0.015° over the year small, but included for completeness.
This correction is ±0.015° over the year: small, but included for completeness.
**Fourier harmonic correction (Δf)**
@ -89,7 +89,7 @@ This adds up to ±0.15° at 45°N and proportionally less near the equator.
**Atmospheric refraction**
Near the horizon, refraction bends light rays by about 34 arcminutes. At twilight
angles (Sun 1418° below horizon), refraction is small — a few arcminutes — but
angles (Sun 1418° below horizon), refraction is small: a few arcminutes: but
is still computed via the Bennett/Saemundsson formula for completeness. The current
atmospheric conditions (pressure, temperature) are used.
@ -102,7 +102,7 @@ degrees below the geometric horizon:
d ≈ 1.06 × sqrt(h / 1000) (degrees)
```
At 1000 m, this is 1.06° the effective depression for a given visual phenomenon
At 1000 m, this is 1.06°: the effective depression for a given visual phenomenon
is reduced by this amount. The correction is:
```

View file

@ -4,7 +4,7 @@
At latitudes above approximately 48.5°N/S, the Sun never reaches 18° below the
horizon during summer months. Above 51.5°N/S, it never reaches 15° below the
horizon. During these periods, a fixed-angle method produces no Isha or computes
horizon. During these periods, a fixed-angle method produces no Isha: or computes
a sunrise before Fajr, or other nonsensical results.
Even at latitudes where the Sun does reach 18°, the resulting times can be extreme.
@ -44,7 +44,7 @@ renders it as `"N/A"`.
This is intentional. The Methods map in `getTimesAll` shows you exactly which methods
are applicable for a given location and date. If ISNA returns `N/A` for Isha in
London in June, that is the correct answer for that method it simply doesn't work
London in June, that is the correct answer for that method: it simply doesn't work
there.
## Juristic Solutions

View file

@ -26,7 +26,7 @@ fixed-angle methods are included for comparison.
| [Research Overview](Research) | Study summary, headline results, PCD algorithm description |
| [Methodology](Research-Methodology) | Reference standard, measurement approach, test infrastructure |
| [Global Accuracy Study](Research-Global-Study) | 18-city comparison across latitudes 6°S51.5°N and all seasons |
| [Home-Territory Study](Research-Home-Territory) | Each method tested at its own calibration city PCD wins 13/14 |
| [Home-Territory Study](Research-Home-Territory) | Each method tested at its own calibration city: PCD wins 13/14 |
| [Observational Evidence](Research-Observational-Evidence) | Field observations, published studies, academic literature |
| [Field Observation Comparison](Research-Verified-Observations) | Systematic comparison of PCD vs real-world verified Fajr measurements |
@ -79,9 +79,9 @@ never produces the "Isha never ends" failure that 18°-everywhere causes above 5
## Related Packages
- [nrel-spa](https://github.com/acamarata/nrel-spa) NREL Solar Position Algorithm (solar position foundation)
- [luxon-hijri](https://github.com/acamarata/luxon-hijri) Hijri/Gregorian calendar conversion
- [moon-sighting](https://github.com/acamarata/moon-sighting) Crescent visibility (Yallop/Odeh criteria)
- [nrel-spa](https://github.com/acamarata/nrel-spa): NREL Solar Position Algorithm (solar position foundation)
- [luxon-hijri](https://github.com/acamarata/luxon-hijri): Hijri/Gregorian calendar conversion
- [moon-sighting](https://github.com/acamarata/moon-sighting): Crescent visibility (Yallop/Odeh criteria)
---

View file

@ -8,7 +8,7 @@ In pray-calc v1, the package included five functions for moon data:
| `getMoonPhase(date)` | Synodic-month calculation from known reference new moon |
| `getMoonPosition(date, lat, lon)` | Thin wrapper around `suncalc.getMoonPosition` |
| `getMoonIllumination(date)` | Thin wrapper around `suncalc.getMoonIllumination` |
| `getMoonVisibility(date, lat, lon)` | Stub function explicitly not accurate |
| `getMoonVisibility(date, lat, lon)` | Stub function: explicitly not accurate |
All five have been removed from pray-calc v2. They live in the dedicated
[moon-sighting](https://github.com/acamarata/moon-sighting) package, which is the
@ -17,7 +17,7 @@ right place for this work.
## Why They Moved
These functions did not belong in a prayer-times package. They were thin wrappers
around `suncalc` a third-party library that uses simplified spherical astronomy,
around `suncalc`: a third-party library that uses simplified spherical astronomy,
not a full topocentric pipeline. The visibility function was explicitly documented
as a placeholder. Bundling them in pray-calc added a dependency (suncalc) for
functionality that was, at best, approximate.
@ -28,7 +28,7 @@ moon-sighting does the same job properly:
ephemeris with full topocentric correction (parallax, WGS84 geodetic model).
- Bennett atmospheric refraction applied to apparent altitude.
- Illumination uses the correct Meeus phase angle formula, not a simplified fraction.
- Visibility uses the Odeh (2006) V-parameter model a genuine criterion from
- Visibility uses the Odeh (2006) V-parameter model: a genuine criterion from
published research, not a placeholder window function.
The two packages complement each other. pray-calc handles solar-based prayer times.
@ -63,7 +63,7 @@ import { getMoon, getMoonPhase, getMoonPosition, getMoonIllumination } from 'moo
| `getMoonVisibility(date, lat, lon)` | `getMoonVisibilityEstimate(date, lat, lon, elevation?)` | Real Odeh V-parameter, returns zone AD, ARCL, ARCV, W |
| `getMoon(date, lat, lon)` | `getMoon(date, lat, lon, elevation?)` | Same concept, properly computed |
Return shapes are additive all fields that existed in v1 still exist in v1.1.
Return shapes are additive: all fields that existed in v1 still exist in v1.1.
New fields are added but nothing is removed. The function for visibility is renamed
(`getMoonVisibility` to `getMoonVisibilityEstimate`) to be explicit about what it
returns.

View file

@ -61,7 +61,7 @@ Error is `method_time MSC_reference` in minutes. Positive = later than MSC,
| 14 | ISNACA | 26.96 | 18.45 | 22.71 | 18 | 18 |
| 15 | UOIF | 31.59 | 20.00 | 25.80 | 18 | 18 |
**Notes on n values:** Methods with `n_Fajr = 17` or `n_Isha = 17` had one NaN result (typically London summer). Methods returning NaN for that case are not penalized in MAE the actual failure rate is noted in the High-Latitude section below.
**Notes on n values:** Methods with `n_Fajr = 17` or `n_Isha = 17` had one NaN result (typically London summer). Methods returning NaN for that case are not penalized in MAE: the actual failure rate is noted in the High-Latitude section below.
---
@ -128,10 +128,10 @@ London, UK on June 21 (51.5°N) is the most extreme test case. As the sun approa
| ISNA | 15° | 24:49 (technically computed, next day) |
| SAMR | 15° | 24:49 (same as ISNA Isha) |
| IGUT | 14° | 24:05 (next day) |
| UAQ | +90 min | 22:51 (valid not angle-based) |
| Qatar | +90 min | 22:51 (valid not angle-based) |
| MSC | seasonal | 22:41 (valid observation-based) |
| **PCD** | **10.00°** | **22:54 (valid adapted)** |
| UAQ | +90 min | 22:51 (valid: not angle-based) |
| Qatar | +90 min | 22:51 (valid: not angle-based) |
| MSC | seasonal | 22:41 (valid: observation-based) |
| **PCD** | **10.00°** | **22:54 (valid: adapted)** |
| MWL | 17° | **N/A** |
| DIBT | 17° | **N/A** |
| Karachi | 18° | **N/A** |
@ -139,7 +139,7 @@ London, UK on June 21 (51.5°N) is the most extreme test case. As the sun approa
| Egypt | 17.5° | **N/A** |
| MUIS | 18° | **N/A** |
Six of the 14 methods produce no Isha time at London in midsummer. PCD adapts by clamping to the 10° lower bound and produces 22:54 13 minutes later than MSC's 22:41 (the largest single error in the study). The error is structural: at 51.5°N in June, the sky never fully darkens, and both the observation reference and any computed method are approximations of a genuinely ambiguous twilight condition.
Six of the 14 methods produce no Isha time at London in midsummer. PCD adapts by clamping to the 10° lower bound and produces 22:54: 13 minutes later than MSC's 22:41 (the largest single error in the study). The error is structural: at 51.5°N in June, the sky never fully darkens, and both the observation reference and any computed method are approximations of a genuinely ambiguous twilight condition.
---
@ -168,7 +168,7 @@ How the PCD-computed depression angle varies across the test cases.
| London | 51.5°N | Dec | 14.69° | 14.24° | ISNA (15°) |
| London | 51.5°N | Jun | 11.88° | 10.00° | UOIF (12°) |
The angle moves from ~20° at tropical latitudes in summer to ~12° at high-latitude summer. No fixed method tracks this gradient correctly. SAMR (16°) is closest for North American and Central Asian summers. ISNA (15°) handles Toronto and London winter. IGUT (17.7°) is closest for Tehran and mid-latitude winters. But each of these methods fails in other conditions only PCD adapts dynamically across the full range.
The angle moves from ~20° at tropical latitudes in summer to ~12° at high-latitude summer. No fixed method tracks this gradient correctly. SAMR (16°) is closest for North American and Central Asian summers. ISNA (15°) handles Toronto and London winter. IGUT (17.7°) is closest for Tehran and mid-latitude winters. But each of these methods fails in other conditions: only PCD adapts dynamically across the full range.
---

View file

@ -4,7 +4,7 @@
**pray-calc version:** 2.0.0
**Reference:** MSC (Moonsighting Committee Worldwide) observation-calibrated model
This study tests each of the 14 traditional methods at the specific city and season for which it was designed. It is the most favorable possible test for each fixed-angle method a method's best-case performance.
This study tests each of the 14 traditional methods at the specific city and season for which it was designed. It is the most favorable possible test for each fixed-angle method: a method's best-case performance.
The question: does PCD (Prayer Calc Dynamic) remain more accurate than a method even when that method is tested in its own home territory?
@ -20,7 +20,7 @@ Across 34 Fajr + 34 Isha home-territory test cases:
| Isha MAE | **0.64 min** | 9.84 min | 15.4× worse |
| Combined MAE | **0.64 min** | 8.69 min | **13.5× worse** |
**PCD wins 13 of 14 methods at their own home territory.** The only exception is MSC itself, which edges PCD by 0.5 minutes expected, since PCD uses the MSC model as its Layer 1 base. MSC is the observation reference; PCD is the computed approximation of it.
**PCD wins 13 of 14 methods at their own home territory.** The only exception is MSC itself, which edges PCD by 0.5 minutes: expected, since PCD uses the MSC model as its Layer 1 base. MSC is the observation reference; PCD is the computed approximation of it.
---
@ -43,7 +43,7 @@ Each row represents one traditional method, tested at its home city across all l
| Qatar | Doha, Qatar | 18.0° | 19.33° | +1.33° | 0.12 min | 7.18 min | ★ PCD | 7.1 min |
| Egypt | Cairo, Egypt | 19.5° | 19.06° | 0.44° | 0.17 min | 5.01 min | ★ PCD | 4.8 min |
| MUIS | Singapore | 20.0° | 18.68° | 1.32° | 0.21 min | 4.24 min | ★ PCD | 4.0 min |
| MSC | New York, USA | seasonal | 17.14° | | 0.55 min | 0.00 min | MSC | 0.5 min |
| MSC | New York, USA | seasonal | 17.14° |: | 0.55 min | 0.00 min | MSC | 0.5 min |
"Δ° (Dyn Fixed)" = PCD computed angle minus the method's fixed angle, averaged across the tested seasons for that city. A positive value means the method's fixed angle is too low for its own home city; negative means it is too high.
@ -51,7 +51,7 @@ Each row represents one traditional method, tested at its home city across all l
## Season-by-Season Detail
### UOIF Paris, France (12°/12°)
### UOIF: Paris, France (12°/12°)
*Lowest angles of any major method. Designed for France's large Muslim minority seeking the least restrictive valid times.*
@ -62,7 +62,7 @@ Each row represents one traditional method, tested at its home city across all l
**Note:** At Paris in summer (48.9°N, June), UOIF's 12° Fajr gives a time 13.7 minutes later than MSC. The PCD angle (13.14°) is slightly higher than UOIF's 12°, correctly recognizing that even at Paris in summer, physical twilight starts slightly earlier than UOIF assumes.
### ISNACA Ottawa, Canada (13°/13°)
### ISNACA: Ottawa, Canada (13°/13°)
*Symmetric 13° angles for Canada. Used by the Islamic Council of North America.*
@ -73,7 +73,7 @@ Each row represents one traditional method, tested at its home city across all l
**Note:** ISNACA's 13° angles are too low by 1.63.6° across Ottawa's seasons. In summer, ISNACA Fajr is 15.8 minutes late vs MSC; in winter, 21.2 minutes late. ISNACA consistently underestimates the twilight angle even in its intended region.
### ISNA Chicago, USA (15°/15°)
### ISNA: Chicago, USA (15°/15°)
*Revised from 18° to 15° in 2007 after observational review by the Fiqh Council of North America. The 15° standard was justified partly by the finding that 18° produces astronomically unreachable angles in summer at North American latitudes.*
@ -83,11 +83,11 @@ Each row represents one traditional method, tested at its home city across all l
| Dec 21 | 17.42° | 06:38 | **0.5 min** | +13.1 min | **+0.5 min** | 10.1 min | ★ PCD by 11.2 min |
| Mar 21 | 17.46° | 05:21 | **0.4 min** | +13.3 min | **+0.7 min** | +0.1 min | ★ PCD by 6.1 min |
**Note:** Even ISNA's revised 15° is too low for Chicago in summer the PCD angle of 15.94° reflects that Chicago in June needs slightly more than 15°. ISNA's 15° remains more accurate than the old 18°, but PCD is still 10.7 minutes better on average.
**Note:** Even ISNA's revised 15° is too low for Chicago in summer: the PCD angle of 15.94° reflects that Chicago in June needs slightly more than 15°. ISNA's 15° remains more accurate than the old 18°, but PCD is still 10.7 minutes better on average.
### SAMR Moscow, Russia (16°/15°)
### SAMR: Moscow, Russia (16°/15°)
*The most dramatically failing method at its home city. Moscow in summer (55.8°N) has such short nights that the sun never reaches 16° depression both Fajr and Isha return NaN.*
*The most dramatically failing method at its home city. Moscow in summer (55.8°N) has such short nights that the sun never reaches 16° depression: both Fajr and Isha return NaN.*
| Season | PCD Fajr° | SAMR result | PCD Fajr err | SAMR Fajr err | Winner |
| --- | --- | --- | --- | --- | --- |
@ -96,7 +96,7 @@ Each row represents one traditional method, tested at its home city across all l
**Note:** SAMR silently fails for its own primary city in summer. PCD's 10° clamped result is off by 17 minutes in Fajr, but this is far better than no result at all. In winter Moscow, PCD is within 0.7 minutes while SAMR is 22.3 minutes off (its 16°/15° angles, calibrated for the region's winter worship pattern, are too high for winter morning and too low to compute in summer).
### IGUT Tehran, Iran (17.7°/14°)
### IGUT: Tehran, Iran (17.7°/14°)
*The closest fixed-angle match at its own home territory. IGUT's 17.7° Fajr is within 0.82° of PCD's average Tehran output (18.52°).*
@ -106,9 +106,9 @@ Each row represents one traditional method, tested at its home city across all l
| Dec 21 | 18.78° | **1.5 min** | +4.0 min | **+1.5 min** | 20.2 min | ★ PCD by 10.6 min |
| Mar 21 (Nowruz) | 18.84° | **1.5 min** | +4.3 min | **+0.9 min** | 11.5 min | ★ PCD by 6.8 min |
**Note:** IGUT wins in summer by 1.2 minutes the only case where a fixed-angle method beats PCD at its home territory. This is because Tehran in summer happens to closely match IGUT's calibrated 17.7° Fajr angle. IGUT's 14° Isha (shafaq ahmer) is also close to PCD's summer Isha computation. However, this advantage disappears in winter and at Nowruz, where PCD is consistently better.
**Note:** IGUT wins in summer by 1.2 minutes: the only case where a fixed-angle method beats PCD at its home territory. This is because Tehran in summer happens to closely match IGUT's calibrated 17.7° Fajr angle. IGUT's 14° Isha (shafaq ahmer) is also close to PCD's summer Isha computation. However, this advantage disappears in winter and at Nowruz, where PCD is consistently better.
### MWL Makkah, Saudi Arabia (18°/17°)
### MWL: Makkah, Saudi Arabia (18°/17°)
*The Muslim World League is headquartered in Makkah. 18° was historically derived from observations at equatorial and sub-tropical locations.*
@ -118,9 +118,9 @@ Each row represents one traditional method, tested at its home city across all l
| Dec 21 | 19.58° | **0.5 min** | +6.7 min | **+0.5 min** | 10.2 min | ★ PCD by 8.0 min |
| Mar 21 | 20.22° | **0.5 min** | +9.1 min | **+0.2 min** | 6.7 min | ★ PCD by 7.5 min |
**Note:** At Makkah, PCD consistently computes ~19.620.2° higher than MWL's fixed 18°. The physics bear this out: Makkah at 21.4°N is tropical rather than equatorial, and the equatorial-calibrated 18° underestimates the actual twilight angle. PCD converges closer to the empirical MSC reference.
**Note:** At Makkah, PCD consistently computes ~19.620.2°: higher than MWL's fixed 18°. The physics bear this out: Makkah at 21.4°N is tropical rather than equatorial, and the equatorial-calibrated 18° underestimates the actual twilight angle. PCD converges closer to the empirical MSC reference.
### DIBT Ankara, Turkey (18°/17°)
### DIBT: Ankara, Turkey (18°/17°)
*Same angles as MWL. Diyanet (Turkish Directorate of Religious Affairs) uses this standard nationally.*
@ -129,9 +129,9 @@ Each row represents one traditional method, tested at its home city across all l
| Jun 21 | 16.81° | **2.5 min** | 13.1 min | **+2.2 min** | +35.2 min | ★ PCD by 21.8 min |
| Dec 21 | 17.98° | **1.4 min** | 1.5 min | **+1.4 min** | 1.0 min | DIBT by 0.2 min |
**Note:** In Ankara summer, DIBT's fixed 18° is too high the sun never reaches it cleanly, producing a very early Fajr that is 13.1 minutes earlier than MSC's observation reference. PCD at 16.81° is 2.5 minutes early (still closer). In winter, DIBT and PCD are almost identical. The difference is clear: DIBT was calibrated for winter/moderate conditions; PCD adapts to both.
**Note:** In Ankara summer, DIBT's fixed 18° is too high: the sun never reaches it cleanly, producing a very early Fajr that is 13.1 minutes earlier than MSC's observation reference. PCD at 16.81° is 2.5 minutes early (still closer). In winter, DIBT and PCD are almost identical. The difference is clear: DIBT was calibrated for winter/moderate conditions; PCD adapts to both.
### Karachi Karachi, Pakistan (18°/18°)
### Karachi: Karachi, Pakistan (18°/18°)
*Symmetric 18° angles, standard across Pakistan, Bangladesh, India, and Afghanistan.*
@ -140,16 +140,16 @@ Each row represents one traditional method, tested at its home city across all l
| Jun 21 | 19.43° | **0.1 min** | +7.9 min | **+0.1 min** | +11.1 min | ★ PCD by 9.4 min |
| Dec 21 | 19.39° | **+0.1 min** | +6.6 min | **0.1 min** | 4.6 min | ★ PCD by 5.5 min |
**Note:** Karachi at 24.9°N sits in the subtropical band where PCD computes ~19.4° higher than the fixed 18°. The Karachi method (established for a city at approximately this latitude) is 78 minutes off Fajr even at home. PCD tracks MSC within 0.1 minutes.
**Note:** Karachi at 24.9°N sits in the subtropical band where PCD computes ~19.4°: higher than the fixed 18°. The Karachi method (established for a city at approximately this latitude) is 78 minutes off Fajr even at home. PCD tracks MSC within 0.1 minutes.
### Kuwait Kuwait City (18°/17.5°)
### Kuwait: Kuwait City (18°/17.5°)
| Season | PCD Fajr° | PCD Fajr err | Kuwait Fajr err | PCD Isha err | Kuwait Isha err | Winner |
| --- | --- | --- | --- | --- | --- | --- |
| Jun 21 | 18.95° | **0.4 min** | +5.5 min | **+0.4 min** | +14.4 min | ★ PCD by 9.6 min |
| Dec 21 | 19.09° | **0.1 min** | +5.1 min | **+0.1 min** | 6.5 min | ★ PCD by 5.8 min |
### UAQ Riyadh, Saudi Arabia (18.5°/+90 min)
### UAQ: Riyadh, Saudi Arabia (18.5°/+90 min)
*The official Saudi government calendar used for all religious timing in the Kingdom. 18.5° Fajr is slightly higher than MWL's 18° to account for Saudi geographic and atmospheric conditions.*
@ -161,14 +161,14 @@ Each row represents one traditional method, tested at its home city across all l
**Note:** UAQ's +90 min flat offset for Isha produces a systematic +1014 minute Isha error at Riyadh. The UAQ Isha definition (Maghrib + 90 min) is a civil convenience rule rather than an astronomical one. The actual shafaq abyad end at Riyadh is 7686 minutes after sunset depending on season.
### Qatar Doha, Qatar (18°/+90 min)
### Qatar: Doha, Qatar (18°/+90 min)
| Season | PCD Fajr° | PCD Fajr err | Qatar Fajr err | PCD Isha err | Qatar Isha err | Winner |
| --- | --- | --- | --- | --- | --- | --- |
| Jun 21 | 19.33° | **0.1 min** | +7.4 min | **+0.1 min** | +12.0 min | ★ PCD by 9.6 min |
| Dec 21 | 19.33° | **+0.1 min** | +6.3 min | **0.1 min** | +3.0 min | ★ PCD by 4.5 min |
### Egypt Cairo, Egypt (19.5°/17.5°)
### Egypt: Cairo, Egypt (19.5°/17.5°)
*Egypt has the highest Fajr angle (19.5°) of any major method. It was established by the Egyptian General Authority of Survey and applies across Egypt, Syria, Iraq, and Lebanon.*
@ -178,11 +178,11 @@ Each row represents one traditional method, tested at its home city across all l
| Dec 21 | 19.13° | **0.0 min** | 1.7 min | **0.0 min** | 5.9 min | ★ PCD by 3.8 min |
| Mar 21 | 19.33° | **0.0 min** | 0.8 min | **0.5 min** | +0.9 min | ★ PCD by 0.6 min |
**Note:** Egypt's 19.5° Fajr is higher than PCD's computed angle for Cairo (18.7319.33°). The fixed angle makes Fajr slightly earlier than MSC predicts. The closest result is at equinox (0.8 min vs 0.0 min), where PCD is only 0.6 minutes better Egypt's best case.
**Note:** Egypt's 19.5° Fajr is higher than PCD's computed angle for Cairo (18.7319.33°). The fixed angle makes Fajr slightly earlier than MSC predicts. The closest result is at equinox (0.8 min vs 0.0 min), where PCD is only 0.6 minutes better: Egypt's best case.
### MUIS Singapore (20°/18°)
### MUIS: Singapore (20°/18°)
*The highest Fajr angle of any major method. MUIS was designed for Singapore's near-equatorial location (1.35°N). However, PCD computes 18.219.6° at Singapore consistently lower than 20°.*
*The highest Fajr angle of any major method. MUIS was designed for Singapore's near-equatorial location (1.35°N). However, PCD computes 18.219.6° at Singapore: consistently lower than 20°.*
| Season | PCD Fajr° | PCD Fajr err | MUIS Fajr err | PCD Isha err | MUIS Isha err | Winner |
| --- | --- | --- | --- | --- | --- | --- |
@ -190,9 +190,9 @@ Each row represents one traditional method, tested at its home city across all l
| Dec 21 | 18.23° | **0.4 min** | 8.1 min | **0.1 min** | 1.1 min | ★ PCD by 4.4 min |
| Mar 21 | 19.59° | **+0.2 min** | 1.4 min | **+0.1 min** | 6.3 min | ★ PCD by 3.7 min |
**Note:** At the equatorial city it was designed for, MUIS's 20° Fajr makes Fajr 8 minutes earlier than MSC in summer and winter. The MSC model, calibrated from actual observations, places Singapore Fajr at approximately 76 minutes before sunrise shorter than what 20° would produce. PCD's 18.218.4° is the more accurate description of actual equatorial twilight.
**Note:** At the equatorial city it was designed for, MUIS's 20° Fajr makes Fajr 8 minutes earlier than MSC in summer and winter. The MSC model, calibrated from actual observations, places Singapore Fajr at approximately 76 minutes before sunrise: shorter than what 20° would produce. PCD's 18.218.4° is the more accurate description of actual equatorial twilight.
### MSC New York, USA (seasonal/seasonal)
### MSC: New York, USA (seasonal/seasonal)
*This comparison tests PCD against the MSC seasonal model at MSC's own home (the latitude for which Khalid Shaukat published and validated his tables most extensively).*
@ -202,7 +202,7 @@ Each row represents one traditional method, tested at its home city across all l
| Dec 21 | +0.1 min | 0.0 min | 0.1 min | 0.0 min | MSC by 0.1 min |
| Sep 21 | 0.9 min | 0.0 min | +1.6 min | 0.0 min | MSC by 1.3 min |
**Note:** MSC wins by a fraction of a minute at its own home. This is expected and appropriate PCD uses MSC as its base, and the physics corrections introduce small deviations at the reference latitude. The question is whether those physics corrections help elsewhere (they do PCD is more accurate at Tehran, high-elevation cities, and polar-season locations).
**Note:** MSC wins by a fraction of a minute at its own home. This is expected and appropriate: PCD uses MSC as its base, and the physics corrections introduce small deviations at the reference latitude. The question is whether those physics corrections help elsewhere (they do: PCD is more accurate at Tehran, high-elevation cities, and polar-season locations).
---
@ -212,19 +212,19 @@ The "Δ°" column in the scorecard shows the gap between a method's fixed angle
| Method | Fixed° | Actual° (PCD avg) | Δ° | Calibration quality |
| --- | --- | --- | --- | --- |
| IGUT | 17.7° | 18.52° | +0.82° | Excellent closest fixed calibration |
| Egypt | 19.5° | 19.06° | 0.44° | Good slightly high |
| DIBT | 18.0° | 17.40° | 0.60° | Good slightly high for Ankara |
| MUIS | 20.0° | 18.68° | 1.32° | Fair overcorrected high |
| Karachi | 18.0° | 19.41° | +1.41° | Fair too low for subtropical Karachi |
| MWL | 18.0° | 19.86° | +1.86° | Fair 18° too low for equatorial-adjacent latitudes |
| ISNA | 15.0° | 16.94° | +1.94° | Moderate revised from 18° but still too low |
| UAQ | 18.5° | 19.73° | +1.23° | Fair better than MWL but still low |
| Kuwait | 18.0° | 19.02° | +1.02° | Fair similar to MWL |
| IGUT | 17.7° | 18.52° | +0.82° | Excellent: closest fixed calibration |
| Egypt | 19.5° | 19.06° | 0.44° | Good: slightly high |
| DIBT | 18.0° | 17.40° | 0.60° | Good: slightly high for Ankara |
| MUIS | 20.0° | 18.68° | 1.32° | Fair: overcorrected high |
| Karachi | 18.0° | 19.41° | +1.41° | Fair: too low for subtropical Karachi |
| MWL | 18.0° | 19.86° | +1.86° | Fair: 18° too low for equatorial-adjacent latitudes |
| ISNA | 15.0° | 16.94° | +1.94° | Moderate: revised from 18° but still too low |
| UAQ | 18.5° | 19.73° | +1.23° | Fair: better than MWL but still low |
| Kuwait | 18.0° | 19.02° | +1.02° | Fair: similar to MWL |
| Qatar | 18.0° | 19.33° | +1.33° | Fair |
| UOIF | 12.0° | 14.30° | +2.30° | Weak 2.3° too low even for Paris |
| ISNACA | 13.0° | 15.59° | +2.59° | Weak too low for Canadian latitudes |
| SAMR | 16.0° | 11.57° | 4.43° | Very poor too high to function in Moscow summer |
| UOIF | 12.0° | 14.30° | +2.30° | Weak: 2.3° too low even for Paris |
| ISNACA | 13.0° | 15.59° | +2.59° | Weak: too low for Canadian latitudes |
| SAMR | 16.0° | 11.57° | 4.43° | Very poor: too high to function in Moscow summer |
**IGUT is the best-calibrated fixed-angle method**: its 17.7° Fajr angle was clearly derived from observation at Tehran's latitude and elevation. The 0.82° deviation from PCD is within the margin of seasonal variation, and IGUT beats PCD in summer at Tehran by 1.2 minutes.

View file

@ -6,13 +6,13 @@ Accuracy comparisons require a ground truth. For Islamic twilight times, no univ
Shaukat compiled his seasonal tables from direct field observations across multiple continents over several decades. The model represents minutes-before-sunrise (Fajr) and minutes-after-sunset (Isha) as piecewise functions of latitude and month. Unlike fixed-angle methods, which were derived from theoretical or historical-document reasoning, the MSC values were adjusted iteratively to match what trained observers actually saw.
Because the PCD algorithm uses the MSC model as its Layer 1 base, using MSC as the accuracy reference is a conservative test it measures how much the physics corrections in Layers 2 and 3 deviate from the MSC base. A PCD result that closely tracks MSC demonstrates the physics corrections do not introduce noise; a PCD result that slightly improves on MSC at specific locations (high elevation, perihelion dates) would confirm the corrections add value.
Because the PCD algorithm uses the MSC model as its Layer 1 base, using MSC as the accuracy reference is a conservative test: it measures how much the physics corrections in Layers 2 and 3 deviate from the MSC base. A PCD result that closely tracks MSC demonstrates the physics corrections do not introduce noise; a PCD result that slightly improves on MSC at specific locations (high elevation, perihelion dates) would confirm the corrections add value.
### Why Not Astronomical Twilight as Reference?
Astronomical twilight (18° depression, the moment sky background is fully dark) is a defined, computable quantity. However, it does not correspond to Islamic Fajr or Isha for two reasons:
1. **Fajr (Subh Sadiq)** is the horizontal spread of light along the horizon, not full astronomical darkness. Field observations consistently place this between 12° and 18° depending on latitude and season not at a fixed 18°.
1. **Fajr (Subh Sadiq)** is the horizontal spread of light along the horizon, not full astronomical darkness. Field observations consistently place this between 12° and 18° depending on latitude and season: not at a fixed 18°.
2. **Isha (end of Shafaq Abyad)** is when the white twilight glow vanishes. This corresponds to approximately 1418° depression, not a single value.
Using a fixed 18° as "truth" would prejudge the result in favor of fixed-18° methods and defeat the purpose of the study.

View file

@ -6,7 +6,7 @@ This page documents the empirical basis for the twilight angle values used in th
## Why Observational Evidence Matters
Islamic prayer times are not purely mathematical constructs. Fajr (Subh Sadiq, true dawn) is defined as the moment horizontal white light becomes distinguishable along the eastern horizon a physical phenomenon, not a calculation. Isha (the end of shafaq) similarly corresponds to the disappearance of the post-sunset glow again, a physical event.
Islamic prayer times are not purely mathematical constructs. Fajr (Subh Sadiq, true dawn) is defined as the moment horizontal white light becomes distinguishable along the eastern horizon: a physical phenomenon, not a calculation. Isha (the end of shafaq) similarly corresponds to the disappearance of the post-sunset glow: again, a physical event.
Depression angles are a mathematical proxy for these physical events. The question of which angle correctly represents the physical phenomenon can only be settled by looking at what trained observers actually record when they witness the event.
@ -16,11 +16,11 @@ The core finding across all published observational studies: **the twilight angl
## Published Observational Studies
### Khalid Shaukat Moonsighting Committee Worldwide (MSC)
### Khalid Shaukat: Moonsighting Committee Worldwide (MSC)
Decades of field observation, primarily 1980s2010s. Reference: moonsighting.com.
Khalid Shaukat conducted and compiled field observations of Fajr and Isha across multiple continents over several decades. His observations led to the MSC seasonal model a piecewise function of latitude and month that returns minutes-before-sunrise (Fajr) and minutes-after-sunset (Isha).
Khalid Shaukat conducted and compiled field observations of Fajr and Isha across multiple continents over several decades. His observations led to the MSC seasonal model: a piecewise function of latitude and month that returns minutes-before-sunrise (Fajr) and minutes-after-sunset (Isha).
Selected reference values from Shaukat's seasonal tables:
@ -39,9 +39,9 @@ Selected reference values from Shaukat's seasonal tables:
Key conclusions from Shaukat's work:
1. At the equator, the MSC model converges to approximately 108 minutes, corresponding to roughly 18° depression. This confirms the historical basis of the 18° standard.
2. At 4045°N in summer, the model yields 7384 minutes corresponding to approximately 1316° depression, not 18°.
2. At 4045°N in summer, the model yields 7384 minutes: corresponding to approximately 1316° depression, not 18°.
3. At 5055°N in summer, 6879 minutes corresponds to approximately 1114° depression.
4. In winter, at all latitudes, the minute offsets increase and converge differences between methods become smaller.
4. In winter, at all latitudes, the minute offsets increase and converge: differences between methods become smaller.
The PCD algorithm implements Shaukat's piecewise model directly as its Layer 1 base.
@ -56,9 +56,9 @@ Anugraha and Satria conducted photometric and naked-eye observations at Bandung,
- At Jakarta/Bandung (near-equatorial, 6°S6°N range), Fajr was observed at solar depression angles of **1719°**, consistent with the historical 18° baseline.
- The study found no significant seasonal variation at equatorial latitudes, confirming that equatorial locations are where fixed-18° methods are most accurate.
- The 20° angle used by MUIS (Singapore) was found to be systematically too early the study observed Fajr at ~18°, not 20°.
- The 20° angle used by MUIS (Singapore) was found to be systematically too early: the study observed Fajr at ~18°, not 20°.
**Relevance to PCD:** At Jakarta, PCD computes 18.72° Fajr (summer) directly supported by Anugraha and Satria's observational range of 1719°. MUIS at 20° is too early by approximately 68 minutes at these equatorial latitudes.
**Relevance to PCD:** At Jakarta, PCD computes 18.72° Fajr (summer): directly supported by Anugraha and Satria's observational range of 1719°. MUIS at 20° is too early by approximately 68 minutes at these equatorial latitudes.
### Karahanoglu (2019)
@ -88,11 +88,11 @@ In 2007, the Fiqh Council of North America formally revised the ISNA prayer time
- Field observation placed true Fajr at approximately **1416°** depression at these latitudes in summer.
- The 15° compromise was adopted to balance astronomical accuracy with doctrinal continuity.
The ISNA revision is significant because it represents a formal institutional acknowledgment that fixed 18° was empirically wrong for North American latitudes. PCD confirms this: at New York in summer, PCD computes 16.21° Fajr. At Chicago, 15.94°. The 2007 revision moved in the right direction but stopped at 15° still slightly low.
The ISNA revision is significant because it represents a formal institutional acknowledgment that fixed 18° was empirically wrong for North American latitudes. PCD confirms this: at New York in summer, PCD computes 16.21° Fajr. At Chicago, 15.94°. The 2007 revision moved in the right direction but stopped at 15°: still slightly low.
**Relevance to PCD:** PCD computes 15.916.9° for Chicago across seasons consistently slightly above the ISNA 15° standard, consistent with the expectation that 15° understates the phenomenon by ~12°.
**Relevance to PCD:** PCD computes 15.916.9° for Chicago across seasons: consistently slightly above the ISNA 15° standard, consistent with the expectation that 15° understates the phenomenon by ~12°.
### UK Observations HMNAO and Academic Sources
### UK Observations: HMNAO and Academic Sources
**Her Majesty's Nautical Almanac Office (HMNAO) and UK Islamic Scholars, various dates.**
@ -103,20 +103,20 @@ The HMNAO publishes detailed astronomical twilight tables for UK cities. For Lon
UK Islamic scholars and the Muslim Council of Britain have noted that:
- True Fajr at London in summer corresponds to approximately **1213°** solar depression.
- Methods using 18° (MWL) or higher are unusable for London in summer they produce times before midnight or N/A.
- The MSC model (which PCD implements) yields 120 minutes before sunrise at London in June, corresponding to approximately 12° matching these observations.
- Methods using 18° (MWL) or higher are unusable for London in summer: they produce times before midnight or N/A.
- The MSC model (which PCD implements) yields 120 minutes before sunrise at London in June, corresponding to approximately 12°: matching these observations.
The Edinburgh Observation (cited by Shaukat): at 56°N in summer, Fajr was observed at approximately 65 minutes before sunrise corresponding to roughly **11.5°** depression.
The Edinburgh Observation (cited by Shaukat): at 56°N in summer, Fajr was observed at approximately 65 minutes before sunrise: corresponding to roughly **11.5°** depression.
**Relevance to PCD:** At London (51.5°N) in summer, PCD computes 11.88° Fajr and clips Isha to 10° (the lower bound). This is consistent with UK observations of 1213° true Fajr.
### Iranian Institute of Geophysics Tehran (IGUT Calibration)
### Iranian Institute of Geophysics: Tehran (IGUT Calibration)
**Institute of Geophysics, University of Tehran. Calibration basis for the IGUT method.**
The IGUT method (17.7°/14°) was developed with observational input from the Institute of Geophysics. The 14° Isha angle reflects shafaq ahmer (red glow disappearance) rather than shafaq abyad (white glow) an intentional juristic distinction followed in Iranian Shia fiqh.
The IGUT method (17.7°/14°) was developed with observational input from the Institute of Geophysics. The 14° Isha angle reflects shafaq ahmer (red glow disappearance) rather than shafaq abyad (white glow): an intentional juristic distinction followed in Iranian Shia fiqh.
The 17.7° Fajr angle for Tehran (35.7°N, 1191m elevation) was derived from observations at this specific location. PCD computes 17.9518.84° for Tehran across seasons within approximately 0.31.1° of IGUT's 17.7° calibration. This close agreement validates both IGUT's observational basis and PCD's physics model for high-elevation mid-latitude locations.
The 17.7° Fajr angle for Tehran (35.7°N, 1191m elevation) was derived from observations at this specific location. PCD computes 17.9518.84° for Tehran across seasons: within approximately 0.31.1° of IGUT's 17.7° calibration. This close agreement validates both IGUT's observational basis and PCD's physics model for high-elevation mid-latitude locations.
---
@ -141,7 +141,7 @@ Legend: ✓ = within 0.5° of observed, ≈ = within 1°, ✗ = 13° off, ✗
‡ Based on adjacent-latitude field studies: Egyptian NRIA study (2431°N, 19841987) found a mean of 14.7°; the Hail study (27.5°N, 20142015, 365 nights) found 14.01° ± 0.32°; the Fayum photometric study (29.3°N, 20182019) found 1414.8°. All three are annual means, not summer-only. Direct summer observations for 2125°N are not available in the published literature.
**The high-latitude summer band (>48°N) is where PCD's advantage is clearest.** At Blackburn, England (53.75°N) in summer, PCD computed 11.87° vs the observed 12.0° an error of 0.13°. Fixed-angle methods at 18° cannot produce any result at these latitudes in summer. At subtropical latitudes, the picture is more complex: all calculation methods, including PCD and the MSC base, compute angles in the 1820° range, while multiple independent field studies consistently find true Fajr at 1315° at these locations. This discrepancy is an active area of research and may reflect differences in observation methodology, atmospheric clarity, or the distinction between false dawn (zodiacal light) and true Subh Sadiq.
**The high-latitude summer band (>48°N) is where PCD's advantage is clearest.** At Blackburn, England (53.75°N) in summer, PCD computed 11.87° vs the observed 12.0°: an error of 0.13°. Fixed-angle methods at 18° cannot produce any result at these latitudes in summer. At subtropical latitudes, the picture is more complex: all calculation methods, including PCD and the MSC base, compute angles in the 1820° range, while multiple independent field studies consistently find true Fajr at 1315° at these locations. This discrepancy is an active area of research and may reflect differences in observation methodology, atmospheric clarity, or the distinction between false dawn (zodiacal light) and true Subh Sadiq.
---
@ -157,7 +157,7 @@ The 18° standard became problematic only when it was exported globally without
## The Shafaq Distinction
Isha is defined by the disappearance of shafaq the post-sunset glow. There are two recognized criteria:
Isha is defined by the disappearance of shafaq: the post-sunset glow. There are two recognized criteria:
**Shafaq Ahmer (red glow):** The red/orange color at the horizon disappears. This occurs at approximately **47°** solar depression. Used by: IGUT (14°), Iranian Shia fiqh, some Hanbali scholars.

View file

@ -10,7 +10,7 @@ Most prayer time research compares methods against each other (e.g., PCD vs. ISN
Two types of observational data exist:
**Angle-based studies** measure the solar depression angle directly at the moment a trained observer identifies Subh Sadiq. These range from naked-eye campaigns (hundreds of nights at a single location) to photometric measurements using calibrated instruments. The result is a depression angle the angular distance of the sun below the horizon at the moment of true dawn.
**Angle-based studies** measure the solar depression angle directly at the moment a trained observer identifies Subh Sadiq. These range from naked-eye campaigns (hundreds of nights at a single location) to photometric measurements using calibrated instruments. The result is a depression angle: the angular distance of the sun below the horizon at the moment of true dawn.
**Time-based verification points** record a specific date, location, and clock time at which a trained observer identified true Fajr. The corresponding depression angle is computed from the recorded time and date using spherical trigonometry.
@ -24,16 +24,16 @@ Both study types test the same question: does the calculated Fajr time match whe
| ID | Location | Latitude | Elevation | Period | N | Instrument | Observed° | Source |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| TUB-S | Tubruq, Libya sea horizon | 32.1°N | 25 m | 20002003 | 429 | Naked eye | **13.48°** | Odeh 2004 |
| TUB-D | Tubruq, Libya desert horizon | 32.1°N | 25 m | 20002003 | 623 | Naked eye | **13.14°** | Odeh 2004 |
| EGY | Egypt multi-site (4 cities) | 2431°N | 1095 m | 19841987 | | Photometric + naked eye | **14.7°** mean | ENRIA 1987 |
| TUB-S | Tubruq, Libya: sea horizon | 32.1°N | 25 m | 20002003 | 429 | Naked eye | **13.48°** | Odeh 2004 |
| TUB-D | Tubruq, Libya: desert horizon | 32.1°N | 25 m | 20002003 | 623 | Naked eye | **13.14°** | Odeh 2004 |
| EGY | Egypt multi-site (4 cities) | 2431°N | 1095 m | 19841987 |: | Photometric + naked eye | **14.7°** mean | ENRIA 1987 |
| HAI | Hail, Saudi Arabia | 27.5°N | 990 m | 20142015 | 365 | Naked eye | **14.01° ± 0.32°** | Al-Shehri 2017 |
| FAY | Fayum, Egypt | 29.3°N | 29 m | 20182019 | | Photometric | **14.4°** [1414.8°] | AAAS 2019 |
| BLK-S | Blackburn, UK — summer | 53.8°N | 75 m | 19871988 | — | Naked eye | **12°** | Duff & Duff 1989 |
| BLK-W | Blackburn, UK — winter | 53.8°N | 75 m | 19871988 | — | Naked eye | **18°** | Duff & Duff 1989 |
| CHI | Chicago, USA — summer | 41.9°N | 181 m | 1985 | — | Naked eye | **14°** [1315°] | Shaukat 1985 |
| LAP | Indonesia — 6 LAPAN stations | 6.5°S1.5°N | 50350 m | 20162017 | — | Sky brightness | **16.51°** mean | LAPAN 2017 |
| MYS | Malaysia/Indonesia DSLR | 27°N | 50250 m | 2017 | 64 nights | DSLR photometry | **16.67°** [15.817.2°] | Zambri & Anwar 2017 |
| FAY | Fayum, Egypt | 29.3°N | 29 m | 20182019 |: | Photometric | **14.4°** [1414.8°] | AAAS 2019 |
| BLK-S | Blackburn, UK: summer | 53.8°N | 75 m | 19871988 |: | Naked eye | **12°** | Duff & Duff 1989 |
| BLK-W | Blackburn, UK: winter | 53.8°N | 75 m | 19871988 |: | Naked eye | **18°** | Duff & Duff 1989 |
| CHI | Chicago, USA: summer | 41.9°N | 181 m | 1985 |: | Naked eye | **14°** [1315°] | Shaukat 1985 |
| LAP | Indonesia: 6 LAPAN stations | 6.5°S1.5°N | 50350 m | 20162017 |: | Sky brightness | **16.51°** mean | LAPAN 2017 |
| MYS | Malaysia/Indonesia: DSLR | 27°N | 50250 m | 2017 | 64 nights | DSLR photometry | **16.67°** [15.817.2°] | Zambri & Anwar 2017 |
### Time-Based Verification Points
@ -76,7 +76,7 @@ Each study location was assigned the regional method most likely in use there:
---
## Part 1: Angle-Based Studies Full Results
## Part 1: Angle-Based Studies: Full Results
### Comparison Table
@ -106,9 +106,9 @@ For each study: observed depression angle, PCD computed mean angle over study mo
---
## Part 2: Time-Based Verification Points Full Results
## Part 2: Time-Based Verification Points: Full Results
### Miami Beach, Florida December 3, 2000
### Miami Beach, Florida: December 3, 2000
**Observers:** Khalid Shaukat, plus four co-observers. Location: Miami Beach (25.77°N, 80.13°W, elevation 2m). Timezone: UTC-5 (EST).
@ -118,7 +118,7 @@ For each study: observed depression angle, PCD computed mean angle over study mo
| Method | Fajr time | Error vs observed | Angle used |
| --- | --- | --- | --- |
| Observed | 05:45:00 | | 14.75° |
| Observed | 05:45:00 |: | 14.75° |
| PCD | 05:23:42 | **-21.3 min early** | 19.46° |
| MSC reference | 05:23:48 | -21.2 min early | 19.5° (equiv) |
| ISNA (15°) | 05:44:24 | **-0.6 min** | 15° |
@ -126,11 +126,11 @@ For each study: observed depression angle, PCD computed mean angle over study mo
Sunrise: 06:51:48 EST. The observation places Fajr at 66.8 minutes before sunrise.
**Analysis:** ISNA's 15° standard closely matches the observation (0.6 min error). PCD and MSC are both 21 minutes early they predict Fajr at 88 minutes before sunrise, placing it at an equivalent angle of 19.5°. This case is the clearest single-point validation of the 15° standard for Miami in December, and the clearest evidence that the MSC base angle is too high for this location and season.
**Analysis:** ISNA's 15° standard closely matches the observation (0.6 min error). PCD and MSC are both 21 minutes early: they predict Fajr at 88 minutes before sunrise, placing it at an equivalent angle of 19.5°. This case is the clearest single-point validation of the 15° standard for Miami in December, and the clearest evidence that the MSC base angle is too high for this location and season.
---
### Pampigny, Switzerland June 23, 2016
### Pampigny, Switzerland: June 23, 2016
**Observer:** Khalid Shaukat. Location: Pampigny (46.625°N, 6.537°E, elevation 550m). Timezone: UTC+2 (CEST).
@ -140,37 +140,37 @@ Sunrise: 06:51:48 EST. The observation places Fajr at 66.8 minutes before sunris
| Method | Fajr time | Error vs observed | Angle used |
| --- | --- | --- | --- |
| Observed | 03:56:00 | | 13.39° |
| Observed | 03:56:00 |: | 13.39° |
| PCD | 03:43:21 | **-12.6 min early** | 14.28° |
| MSC reference | 03:45:57 | -10.1 min early | |
| MSC reference | 03:45:57 | -10.1 min early |: |
| UOIF (12°) | 04:08:00 | **+12.0 min late** | 12° |
| MWL (18°) | N/A | | 18° (sun never reaches 18°) |
| MWL (18°) | N/A |: | 18° (sun never reaches 18°) |
Sunrise: 05:40:57 CEST. The observation places Fajr at 104.9 minutes before sunrise.
**Analysis:** PCD performs better than UOIF (12°) which is too late. However, PCD is still 12.6 minutes early. The elevated site (550m) and clear alpine atmosphere may contribute to a later observable Fajr than standard-atmosphere calculations predict. Notably, Shaukat's own MSC model predicts 3:45 AM 11 minutes early relative to what he himself observed in the field. This is a rare case where the model's originator documented a discrepancy with his own observation.
**Analysis:** PCD performs better than UOIF (12°) which is too late. However, PCD is still 12.6 minutes early. The elevated site (550m) and clear alpine atmosphere may contribute to a later observable Fajr than standard-atmosphere calculations predict. Notably, Shaukat's own MSC model predicts 3:45 AM: 11 minutes early relative to what he himself observed in the field. This is a rare case where the model's originator documented a discrepancy with his own observation.
---
### Jakarta, Indonesia May 8, 2019
### Jakarta, Indonesia: May 8, 2019
**Observers:** Multiple observers from the Indonesian Muslim astronomy community. Location: Jakarta (6.2°S, 106.816°E, elevation 8m). Timezone: UTC+7 (WIB).
**Observation:** The official MUIS schedule gave Fajr at 4:35 AM WIB. Community observers documented true visible Fajr at approximately 5:01 AM WIB 26 minutes later than the official time. The computed depression angle at 5:01 AM was **13.13°**.
**Observation:** The official MUIS schedule gave Fajr at 4:35 AM WIB. Community observers documented true visible Fajr at approximately 5:01 AM WIB: 26 minutes later than the official time. The computed depression angle at 5:01 AM was **13.13°**.
**Computed results:**
| Method | Fajr time | Error vs observed | Angle used |
| --- | --- | --- | --- |
| Observed | 05:01:00 | | 13.13° |
| Observed | 05:01:00 |: | 13.13° |
| PCD | 04:35:11 | **-25.8 min early** | 19.49° |
| MSC reference | 04:35:27 | -25.6 min early | |
| MSC reference | 04:35:27 | -25.6 min early |: |
| MUIS (20°) | 04:33:03 | -28.0 min early | 20° |
| ISNA (15°) | 04:51:51 | -9.2 min early | 15° |
Sunrise: 05:53:27 WIB. The observation places Fajr at 52.4 minutes before sunrise.
**Analysis:** All standard methods are significantly early. PCD and MSC are 26 minutes early. MUIS (20°) is slightly earlier still at 28 minutes early. Even the lower-angle ISNA (15°) is 9 minutes early. This observation, placing Fajr at only 13.1° depression and 52 minutes before sunrise, is the lowest-angle recorded in the time-based dataset. It is also the most logistically complex the verification involves community observers rather than a single expert, which introduces more observer variability.
**Analysis:** All standard methods are significantly early. PCD and MSC are 26 minutes early. MUIS (20°) is slightly earlier still at 28 minutes early. Even the lower-angle ISNA (15°) is 9 minutes early. This observation, placing Fajr at only 13.1° depression and 52 minutes before sunrise, is the lowest-angle recorded in the time-based dataset. It is also the most logistically complex: the verification involves community observers rather than a single expert, which introduces more observer variability.
---
@ -180,7 +180,7 @@ Sunrise: 05:53:27 WIB. The observation places Fajr at 52.4 minutes before sunris
The data divides into two distinct latitude-behavior groups:
**High latitudes (above approximately 48°N) in summer:** PCD and MSC are both near the observations. Blackburn summer: PCD 11.87° vs observed 12° (0.13° error). Fixed-angle methods are completely inapplicable the sun cannot reach 18° below the horizon. This is the domain where adaptive methods are unambiguously correct.
**High latitudes (above approximately 48°N) in summer:** PCD and MSC are both near the observations. Blackburn summer: PCD 11.87° vs observed 12° (0.13° error). Fixed-angle methods are completely inapplicable: the sun cannot reach 18° below the horizon. This is the domain where adaptive methods are unambiguously correct.
**Subtropical to equatorial latitudes (below approximately 40°N):** All methods, including PCD and MSC, systematically predict Fajr at higher angles (1720°) than what field observers record (1217°). The error range is 26° depending on site and season.
@ -206,7 +206,7 @@ For context: the Egypt General Authority of Survey uses 19.5° for its official
Three explanations are most commonly advanced:
**False dawn (Khayt al-Subh / zodiacal light).** At subtropical clear-sky sites, the zodiacal light — a diffuse cone of sunlight scattered by interplanetary dust along the ecliptic — becomes visible before true Fajr. In the Arabian Peninsula and North Africa, where skies are exceptionally clear and dry, this phenomenon is particularly prominent. The zodiacal light appears at roughly 1820° solar depression and disappears before true Fajr begins at ~1315°.
**False dawn (Khayt al-Subh / zodiacal light).** At subtropical clear-sky sites, the zodiacal light: a diffuse cone of sunlight scattered by interplanetary dust along the ecliptic: becomes visible before true Fajr. In the Arabian Peninsula and North Africa, where skies are exceptionally clear and dry, this phenomenon is particularly prominent. The zodiacal light appears at roughly 1820° solar depression and disappears before true Fajr begins at ~1315°.
Medieval Islamic astronomers making observations in Arabia would have encountered this phenomenon regularly. There is credible historical scholarship suggesting that some historical angle values were calibrated to the zodiacal light (false dawn) rather than to true horizontal Fajr. This would explain why the 18° standard, calibrated in Arabia at the exact latitude where these studies were conducted, systematically overestimates the Fajr time at those same latitudes when tested against modern observational methods.
@ -226,17 +226,17 @@ In summer at high latitudes, the sun never reaches 18° and PCD correctly adapts
| Scenario | Best method | Runner-up | Worst method |
| --- | --- | --- | --- |
| High latitude (>48°N) summer | PCD / MSC | | Fixed ≥18° (fails) |
| High latitude (>48°N) winter | Fixed 18° (MWL) | | PCD / MSC (too early) |
| High latitude (>48°N) summer | PCD / MSC |: | Fixed ≥18° (fails) |
| High latitude (>48°N) winter | Fixed 18° (MWL) |: | PCD / MSC (too early) |
| Mid-latitude (3648°N) summer | ISNA (15°) | PCD (close) | Fixed 18° (early) |
| Subtropical (2036°N) | ISNA (15°) | MSC (marginally closer than PCD) | Fixed ≥18° (most early) |
| Near-equatorial (010°) | ISNA (15°) | MSC | Fixed 20° (MUIS) |
### What This Means for PCD
PCD's core design decision — reducing the Fajr angle at high latitudes in summer — is unambiguously validated by the Blackburn summer data and the Edinburgh observations cited in the Shaukat literature. At latitudes above 48°N in summer, PCD is the only method that produces a result and that result closely matches observation.
PCD's core design decision: reducing the Fajr angle at high latitudes in summer: is unambiguously validated by the Blackburn summer data and the Edinburgh observations cited in the Shaukat literature. At latitudes above 48°N in summer, PCD is the only method that produces a result and that result closely matches observation.
At subtropical and equatorial latitudes, PCD inherits the limitations of the MSC base layer. Because the MSC seasonal model appears to be calibrated to angles in the 1720° range (which field studies suggest corresponds to false dawn, not true Fajr, at those latitudes), PCD computes Fajr times that are 2030 minutes earlier than what independent observers recorded. In this regime, ISNA's 15° standard — though empirically derived rather than physics-derived — is a better approximation for many practical locations.
At subtropical and equatorial latitudes, PCD inherits the limitations of the MSC base layer. Because the MSC seasonal model appears to be calibrated to angles in the 1720° range (which field studies suggest corresponds to false dawn, not true Fajr, at those latitudes), PCD computes Fajr times that are 2030 minutes earlier than what independent observers recorded. In this regime, ISNA's 15° standard: though empirically derived rather than physics-derived: is a better approximation for many practical locations.
The honest conclusion is that PCD is best-in-class for high-latitude use, and provides superior global coverage compared to any single fixed-angle method. However, the observational data does not support the claim that PCD closely tracks physical reality at subtropical latitudes. At those latitudes, the scientific picture is genuinely contested: the field studies suggest 1315°, the MSC/PCD model says 1820°, and the disagreement likely traces to the false dawn problem rather than a failure of PCD's physics corrections.

View file

@ -1,6 +1,6 @@
# Research & Accuracy Data
This section documents the empirical accuracy analysis behind the **PCD (Prayer Calc Dynamic)** method the physics-grounded adaptive twilight algorithm at the core of pray-calc v2.
This section documents the empirical accuracy analysis behind the **PCD (Prayer Calc Dynamic)** method: the physics-grounded adaptive twilight algorithm at the core of pray-calc v2.
The methodology, data, and conclusions here are reproducible. All computations were run against pray-calc v2.0.0 installed from a packed tarball and tested across 18 city/date combinations spanning latitudes 6°S to 51.5°N and all four seasons.
@ -10,12 +10,12 @@ The methodology, data, and conclusions here are reproducible. All computations w
| Metric | PCD (Dynamic) | Best Fixed Method | All Methods Avg |
| --- | --- | --- | --- |
| Global MAE Fajr | **0.64 min** | 10.21 min (Qatar) | 18.6 min |
| Global MAE Isha | **1.30 min** | 10.22 min (Qatar/UAQ) | 18.8 min |
| Global MAE Combined | **0.97 min** | 10.21 min (Qatar) | 18.7 min |
| Home-territory MAE Fajr | **0.65 min** | 4.24 min (MUIS) | 8.69 min |
| Home-territory MAE Combined | **0.64 min** | 4.24 min (MUIS) | 8.69 min |
| Win rate at method's own home city | **13 / 14** | — | — |
| Global MAE: Fajr | **0.64 min** | 10.21 min (Qatar) | 18.6 min |
| Global MAE: Isha | **1.30 min** | 10.22 min (Qatar/UAQ) | 18.8 min |
| Global MAE: Combined | **0.97 min** | 10.21 min (Qatar) | 18.7 min |
| Home-territory MAE: Fajr | **0.65 min** | 4.24 min (MUIS) | 8.69 min |
| Home-territory MAE: Combined | **0.64 min** | 4.24 min (MUIS) | 8.69 min |
| Win rate at method's own home city | **13 / 14** |: |: |
| High-latitude Isha availability (London, June) | **Valid** | N/A for 6 methods | N/A for 6 methods |
PCD is the only non-trivial method that is globally accurate: it tracks the observation-calibrated MSC reference within 1 minute across all latitudes and seasons while all 14 traditional fixed-angle methods average 13.5× more error even at their own calibration cities.
@ -37,7 +37,7 @@ PCD is the only non-trivial method that is globally accurate: it tracks the obse
The Prayer Calc Dynamic (PCD) method computes twilight depression angles in three layers rather than applying a globally fixed value.
**Layer 1 MSC Seasonal Base**
**Layer 1: MSC Seasonal Base**
The Moonsighting Committee Worldwide (MSC) seasonal model, developed by Khalid Shaukat from field observations across latitudes 0°55°N/S, provides a latitude- and season-adjusted minute offset before sunrise (Fajr) and after sunset (Isha). These offsets are converted to depression angles via spherical trigonometry:
@ -47,7 +47,7 @@ cos(H) = (sin(a) sin(φ)·sin(δ)) / (cos(φ)·cos(δ))
where `H` is the hour angle, `a` is the target altitude, `φ` is latitude, and `δ` is solar declination.
**Layer 2 Physics Corrections**
**Layer 2: Physics Corrections**
Four corrections are applied to the base angle:
@ -58,7 +58,7 @@ Four corrections are applied to the base angle:
| Atmospheric refraction | Bennett/Saemundsson formula at computed altitude | Variable by elevation |
| Elevation dip | `0.3 × 1.06 × √(h/1000)` degrees | Negative for elevated sites |
**Layer 3 Physical Bounds**
**Layer 3: Physical Bounds**
The computed angle is clipped to [10°, 22°]. This prevents astronomically impossible angles at extreme high latitudes (above ~55°N in summer) while maintaining the full range across temperate and equatorial zones.

View file

@ -46,7 +46,7 @@ used method in the US, UK, Australia, and New Zealand.
### SAMR (16°/15°)
The Spiritual Administration of Muslims of Russia uses a split angle 16° for
The Spiritual Administration of Muslims of Russia uses a split angle: 16° for
Fajr and 15° for Isha. The asymmetry reflects differing shafaq criteria (red
twilight fades before white) and the latitudinal challenges of Russian Muslim
communities, many of whom live above 50°N.
@ -54,7 +54,7 @@ communities, many of whom live above 50°N.
### IGUT / Tehran (17.7°/14°)
The Institute of Geophysics at the University of Tehran derived these values from
observational studies in Iran. The 17.7° Fajr is unusual close to the historical
observational studies in Iran. The 17.7° Fajr is unusual: close to the historical
18° but with a slight downward revision. The 14° Isha reflects the Shia tradition
of using shafaq ahmer (red glow) rather than shafaq abyad (white glow), since red
twilight disappears earlier. This method is used by Shia communities worldwide and
@ -89,7 +89,7 @@ do not follow UAQ or Qatar.
### UAQ (18.5°/+90 min)
Umm Al-Qura University in Makkah publishes the official Saudi calendar. The Fajr
angle is 18.5° more conservative than most methods. Isha uses a fixed 90-minute
angle is 18.5°: more conservative than most methods. Isha uses a fixed 90-minute
offset from sunset rather than an angle. In Ramadan, UAQ extends this to 120 minutes
(some implementations; this library uses 90 year-round per the standard).
@ -115,7 +115,7 @@ similar to MWL.
### MUIS (20°/18°)
Singapore's Islamic Religious Council uses the most conservative angles in the table.
Singapore sits at about 1.3°N — very close to the equator — where atmospheric
Singapore sits at about 1.3°N: very close to the equator: where atmospheric
conditions and the nearly vertical Sun path do result in a slightly later dawn and
earlier dusk compared to higher latitudes. The 20° Fajr reflects these local conditions.

View file

@ -7,11 +7,11 @@ evaluating any prayer time calculation.
Neither the Quran nor Hadith specifies a numeric angle. The required criteria are:
- **Fajr**: The appearance of *Subh Sadiq* (true dawn) a broad, horizontal
- **Fajr**: The appearance of *Subh Sadiq* (true dawn): a broad, horizontal
whitening of the eastern sky that stretches from north to south. Distinguished from
*Subh Kadhib* (false dawn), which is a vertical column of zodiacal light that
appears and then vanishes before true dawn.
- **Isha**: The disappearance of *Shafaq* the twilight glow remaining in the western
- **Isha**: The disappearance of *Shafaq*: the twilight glow remaining in the western
sky after sunset. Classical scholars disagreed on which glow: *shafaq ahmer* (red
glow, which fades first) or *shafaq abyad* (white glow, which persists longer).
Shia tradition and the IGUT/Tehran method use shafaq ahmer; Sunni tradition generally
@ -39,7 +39,7 @@ astronomical twilight, depending on the convention.
### Latitude Effect
The Sun's path intersects the horizon at a shallower angle at higher latitudes. Near
the equator, the path is nearly vertical the Sun passes through 18° of depression
the equator, the path is nearly vertical: the Sun passes through 18° of depression
quickly. At 55°N in summer, the Sun may skim 510° below the horizon before rising
again. The geometry forces twilight to persist at much smaller depression angles.
@ -50,7 +50,7 @@ cos(H) = (sin(-a) - sin(φ)sin(δ)) / (cos(φ)cos(δ))
```
When φ (latitude) is large and δ (declination) has the same sign, the denominator
shrinks, and the solution for H spreads out more time is spent near the horizon.
shrinks, and the solution for H spreads out: more time is spent near the horizon.
### Seasonal Effect (Declination)
@ -127,7 +127,7 @@ is still computed by `getAngles` for completeness.
After sunset, the western sky transitions through several phases:
1. **Shafaq ahmer** (red glow): The brilliant red/orange color disappears when the Sun
is about 47° below the horizon well before astronomical Isha. The Tehran/IGUT
is about 47° below the horizon: well before astronomical Isha. The Tehran/IGUT
method places Isha at 14° depression, reflecting this earlier boundary.
2. **Shafaq abyad** (white glow): The diffuse white luminosity persists longer. Most
Sunni calculations use this, placing Isha at 1518° depression.

View file

@ -8,10 +8,10 @@ All notable changes to this project will be documented in this file.
- Full TypeScript rewrite with dual CJS/ESM build (tsup)
- Physics-grounded dynamic twilight angle algorithm: MSC seasonal base + Earth-Sun distance correction + Fourier harmonic smoothing + atmospheric refraction + elevation horizon dip
- Three new traditional methods: IGUT/Tehran (17.7°/14°), Kuwait (18°/17.5°), Qatar (18°/90 min) total now 14
- Three new traditional methods: IGUT/Tehran (17.7°/14°), Kuwait (18°/17.5°), Qatar (18°/90 min): total now 14
- `getAngles()` exported as a standalone function
- `getMscFajr()` / `getMscIsha()` exported with `shafaq` mode parameter (`general`, `ahmer`, `abyad`)
- `solarEphemeris()` / `toJulianDate()` exported Jean Meeus solar ephemeris (declination, r, ecliptic lon)
- `solarEphemeris()` / `toJulianDate()` exported: Jean Meeus solar ephemeris (declination, r, ecliptic lon)
- `METHODS` array exported for documentation and tooling
- All TypeScript types exported (`PrayerTimes`, `FormattedPrayerTimes`, `PrayerTimesAll`, etc.)
- `.wiki/` documentation: Home, API Reference, Dynamic Algorithm, Traditional Methods, Architecture, Twilight Physics, High-Latitude, Asr Calculation, Changelog
@ -31,7 +31,7 @@ All notable changes to this project will be documented in this file.
### Removed
- All moon-related functions (`getMoon`, `getMoonPhase`, `getMoonPosition`, `getMoonIllumination`, `getMoonVisibility`) moved to `moon-sighting` package
- All moon-related functions (`getMoon`, `getMoonPhase`, `getMoonPosition`, `getMoonIllumination`, `getMoonVisibility`): moved to `moon-sighting` package
- `suncalc` runtime dependency (removed with moon functions)
- `getEarthSunDistance` helper (inlined into `getSolarEphemeris`)
- `methods.json` (methods now embedded in `getTimesAll.ts` with full metadata)

View file

@ -140,15 +140,15 @@ the Sun is around 1416° below the horizon, not 18°.
The dynamic method computes the angle in three layers:
1. **MSC seasonal base** Khalid Shaukat's piecewise model, calibrated against field
1. **MSC seasonal base**: Khalid Shaukat's piecewise model, calibrated against field
observations across latitudes 0°55°N/S. Returns minutes before/after sunrise/sunset,
converted to depression degrees via spherical trigonometry.
2. **Physics corrections** Earth-Sun distance (r via Jean Meeus elliptical orbit),
2. **Physics corrections**: Earth-Sun distance (r via Jean Meeus elliptical orbit),
Fourier harmonic smoothing, atmospheric refraction at the computed altitude, and
elevation horizon dip.
3. **Physical bounds** clipped to [10°, 22°].
3. **Physical bounds**: clipped to [10°, 22°].
At the equator the result converges to approximately 18°, consistent with historical
usage. At 5055°N in summer it falls to 1214°, matching empirical UK observations.
@ -158,8 +158,8 @@ Full detail: [Dynamic Algorithm wiki page](https://github.com/acamarata/pray-cal
## Architecture
- Only runtime dependency: `nrel-spa` (NREL Solar Position Algorithm)
- `getSolarEphemeris` Jean Meeus Ch. 25: declination, Earth-Sun distance, ecliptic lon
- `getTimesAll` single batch SPA call for all 14×2 + 2 dynamic zenith angles
- `getSolarEphemeris`: Jean Meeus Ch. 25: declination, Earth-Sun distance, ecliptic lon
- `getTimesAll`: single batch SPA call for all 14×2 + 2 dynamic zenith angles
Full detail: [Architecture wiki page](https://github.com/acamarata/pray-calc/wiki/Architecture)
@ -196,9 +196,9 @@ Full documentation: [GitHub Wiki](https://github.com/acamarata/pray-calc/wiki)
## Related
- [nrel-spa](https://github.com/acamarata/nrel-spa) NREL Solar Position Algorithm
- [luxon-hijri](https://github.com/acamarata/luxon-hijri) Hijri/Gregorian calendar
- [moon-sighting](https://github.com/acamarata/moon-sighting) Crescent visibility
- [nrel-spa](https://github.com/acamarata/nrel-spa): NREL Solar Position Algorithm
- [luxon-hijri](https://github.com/acamarata/luxon-hijri): Hijri/Gregorian calendar
- [moon-sighting](https://github.com/acamarata/moon-sighting): Crescent visibility
## Acknowledgments