You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
author = {{The SunPy Community} and Barnes, Will T. and Bobra, Monica G. and Christe, Steven D. and Freij, Nabil and Hayes, Laura A. and Ireland, Jack and Mumford, Stuart and Perez-Suarez, David and Ryan, Daniel F. and Shih, Albert Y. and Chanda, Prateek and Glogowski, Kolja and Hewett, Russell and Hughitt, V. Keith and Hill, Andrew and Hiware, Kaustubh and Inglis, Andrew and Kirk, Michael S. F. and Konge, Sudarshan and Mason, James Paul and Maloney, Shane Anthony and Murray, Sophie A. and Panda, Asish and Park, Jongyeob and Pereira, Tiago M. D. and Reardon, Kevin and Savage, Sabrina and Sipőcz, Brigitta M. and Stansby, David and Jain, Yash and Taylor, Garrison and Yadav, Tannmay and Rajul and Dang, Trung Kien},
128
+
title = {The SunPy Project: Open Source Development and Status of the Version 1.0 Core Package},
Copy file name to clipboardExpand all lines: paper/paper.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,11 +36,11 @@ bibliography: paper.bib
36
36
37
37
# Statement of need
38
38
39
-
Calculating the sun's position is a fundamental task in solar energy research, for example, when modeling solar irradiance, estimating the yield of photovoltaic (PV) systems, or determining rotation angles for solar trackers. For this reason, the literature contains numerous solar position algorithms (SPAs), some of which are: `[@spencer1971fourier; @walraven1978calculating; @michalsky1988astronomical, @reda2004spa, @blanco2020updating]`.
39
+
Calculating the sun's position is a fundamental task in solar energy research, for example, when modeling solar irradiance, estimating the yield of photovoltaic (PV) systems, or determining rotation angles for solar trackers. For this reason, the literature contains numerous solar position algorithms (SPAs), some of which are: `[@spencer1971; @walraven1978; @michalsky1988, @reda2004, @blanco2020]`.
40
40
41
41
Existing SPAs vary in (1) accuracy, (2) computational speed, and (3) period of validity. These characteristics are usually tradeoffs, and thus the choice of algorithm depends on the application. Some algorithms have been developed to be computationally lightweight for use in solar tracker microcontrollers, and as a tradeoff, are inaccurate for past and future years. In contrast, high-accuracy algorithms may consist of several hundred mathematical operations to retain validity for hundreds or even thousands of years. One example of such an algorithm is the SPA from NREL, whose high accuracy and extensive period of validity come at the cost of being computationally expensive and impractical for non-experts to implement.
42
42
43
-
Solar position algorithms are already available in several open source software packages, such as the PV modeling software packages pvlib [@pvlib] and pysolar [@pysolar], the astronomy packages pyephem [@pyephem] and skyfield [@skyfield], and the sun physics package sunpy [@sunpy]. However, these packages are tailored to very specific purposes and only contain one or a few solar position algorithms. Consequently, there are many solar position algorithms for which open source reference implementations are not available. This makes it difficult to evaluate the tradeoffs of the various solar position algorithms, which is necessary in order to make informed decisions on which algorithm to choose for a specific application.
43
+
Solar position algorithms are already available in several open source software packages, such as the PV modeling software packages pvlib [@anderson2023] and pysolar [@stafford2025], the astronomy packages pyephem [@rhodes2011] and skyfield [@rhodes2019], and the sun physics package sunpy [@sunpy2020]. However, these packages are tailored to very specific purposes and only contain one or a few solar position algorithms. Consequently, there are many solar position algorithms for which open source reference implementations are not available. This makes it difficult to evaluate the tradeoffs of the various solar position algorithms, which is necessary in order to make informed decisions on which algorithm to choose for a specific application.
44
44
45
45
SolarPositionX (the X is for eXtreme awesomeness) is a Python package for calculating solar position angles and atmospheric refraction corrections. The package provides reference implementations of a large number of solar position and refraction correction algorithms spanning 50 years of the scientific literature. The SPAs range from simple algorithms based on fitted equations to research-grade astronomy algorithms based on complex ephemerides. As of solposx version v1.0.0, the package includes 11 different solar position algorithms and 6 algorithms for estimating atmospheric refraction. An overview of the modules and functions is provided in \autoref{fig:package}.
46
46
@@ -49,9 +49,9 @@ The solar position functions follow a standard pattern, taking three main input
49
49
50
50

51
51
52
-
The package relies heavily on the pandas Python package [@pandas], due to its convenient DatetimeIndex class. The reason for this choice is that it offers a very convenient way to handle timestamps, including timezone information and conversion between different timezones. The refraction correction algorithms are not reliant on pandas but can be used with most Python array libraries.
52
+
The package relies heavily on the pandas Python package [@mckinney2010], due to its convenient DatetimeIndex class. The reason for this choice is that it offers a very convenient way to handle timestamps, including timezone information and conversion between different timezones. The refraction correction algorithms are not reliant on pandas but can be used with most Python array libraries.
53
53
54
-
Besides direct applications involving calculating solar positions, one of the main use cases of the package is providing verified reference implementations to users who are implementing algorithms in other languages. Having access to verified reference implementations is an essential tool as solar position algorithms tend to be sensitive to small implementation details. For example, using an incorrect rounding convention, e.g., rounding towards zero vs. rounding down, can result in solar position angles being off by more than 0.1 degrees, an error much larger than the claimed accuracy of most SPAs. Such subtle but serious implementation errors are, in the authors’ experience, almost inevitable when implementing SPAs, creating a need for correct and accessible reference implementations. With access to vetted and tested reference implementations of these SPAs, users can generate reliable test values for validating and debugging their own implementations. Notably, the solposx package has already been used for research purposes, most recently in a study comparing the performance of solar position algorithms for PV applications [@pvpmc].
54
+
Besides direct applications involving calculating solar positions, one of the main use cases of the package is providing verified reference implementations to users who are implementing algorithms in other languages. Having access to verified reference implementations is an essential tool as solar position algorithms tend to be sensitive to small implementation details. For example, using an incorrect rounding convention, e.g., rounding towards zero vs. rounding down, can result in solar position angles being off by more than 0.1 degrees, an error much larger than the claimed accuracy of most SPAs. Such subtle but serious implementation errors are, in the authors’ experience, almost inevitable when implementing SPAs, creating a need for correct and accessible reference implementations. With access to vetted and tested reference implementations of these SPAs, users can generate reliable test values for validating and debugging their own implementations. Notably, the solposx package has already been used for research purposes, most recently in a study comparing the performance of solar position algorithms for PV applications [@jensen2025].
55
55
56
56
solposx is developed openly on GitHub and released under a BSD 3-clause license, allowing permissive use with attribution. The package is extensively tested, ensuring that the algorithms work for a large range of inputs and remain consistent. In general, solposx has been developed following modern best practices for packaging, documentation, and testing. Additional algorithms are expected to be added as new algorithms are developed or if additional historical algorithms of interest are identified.
0 commit comments