Every repository with this icon (
Every repository with this icon (
Validation
Pysolar has recently been validated against similar ephemeris code maintained by the United States Naval Observatory (USNO). In a random sampling of 6000 locations distributed across the northern hemisphere at random times in 2008, Pysolar matched the observatory’s predictions very accurately. The azimuth estimations correlated much more closely than the altitude estimations, but both agreed with the naval observatory’s to within less than 0.1 degrees on average.
Using the script included in Pysolar called query_usno.py, around 6200 datapoints were gathered from the website of the US Naval Observatory. The datapoints were randomly distributed in time and space, with the following restrictions:
- Times were limited to 2008 and, to match the USNO’s resolution, rounded to the nearest second.
- Locations were limited to integral degrees of latitude and longitude in the northern hemisphere to match USNO’s resolution. (In theory, the USNO script should accept locations in the southern hemisphere; in practice, negative latitudes caused the script to fail.)
- Elevation was limited to sea level to make the search space smaller.
Error statistics (units are degrees)
The statistics below are generated by query_usno.py when run on the data file usno_data_6259.txt, as in:
python -i query_usno.py usno_data_6259.txt
Azimuth error
- Mean error: 0.00295
- Standard deviation of error: 0.00355
- Minimum error: 1.1836 × 10e-6
- Maximum error: 0.12369
Altitude error
- Mean error: 0.07125
- Standard deviation: 0.12109
- Minimum error: 7.88452 × 10e-6
- Maximum error: 1.2755
Validation data
The full validation data files are included in Pysolar. See the files: usno_data_6259.txt and pysolar_v_usno.csv.
Click on charts for larger versions.











