Closed pjayathissa closed 1 year ago
I don't have sufficient experience in equatorial countries to know if this is a normal pattern.
I haven't looked at this really closely, but I'm not sure that it's wrong. Your second chart looks like a sine wave centered around 0, but the negative parts are wrapped around to the top. Maybe you just need to subtract 360 degrees from the values above 180 to make it look sensibly continuous?
It would also be interesting to know if get_azimuth() returns the same values as get_azimuth_fast() for the values you're testing.
Closing this for now. Please reopen if I’m in error here.
I was cross-referencing a basic radiation equation to your source code and was getting issues in near-equatorial countries (singapore), which I think is related to this logic. I was wondering what the reason for this boolean logic is?
Below is a graph of azimuth hourly profiles during the year, which I found to look a little strange. x axis is the hour of a year, and the y axis is the angle.
Zoomed into the the middle months:
https://github.com/pingswept/pysolar/blob/177b283eb8ed588d1241ecd1885d260b567d8da6/pysolar/solar.py#L175-L178
Code to regenerate the plots