In [1]:
%matplotlib inline
In [2]:
import pandas
pandas.set_option('display.mpl_style', 'default') # Make the graphs a bit prettier
df = pandas.read_csv('pysolar_v_usno.csv', index_col='timestamp')
In [3]:
print('Mean error: {0} degrees'.format(df.az_error.mean()))
print('Standard deviation: {0} degrees'.format(df.az_error.std()))
print('Minimum error: {0} degrees'.format(df.az_error.min()))
print('Maximum error: {0} degrees'.format(df.az_error.max()))
In [4]:
print('Mean error: {0} degrees'.format(df.alt_error.mean()))
print('Standard deviation: {0} degrees'.format(df.alt_error.std()))
print('Minimum error: {0} degrees'.format(df.alt_error.min()))
print('Maximum error: {0} degrees'.format(df.alt_error.max()))
In [5]:
alt_error_plot = df.plot(x='alt1', y='alt_error', marker='.', linestyle='', color='#2980B9', figsize=(15,10))
alt_error_plot.set_xlabel('Altitude [degrees]', fontsize=16)
alt_error_plot.set_ylabel('Error [degrees]', fontsize=16)
alt_error_plot.set_title('Error in altitude between USNO and Pysolar', fontsize=16)
Out[5]:
In [6]:
az_error_plot = df.plot(x='az1', y='az_error', marker='.', linestyle='', color='#2980B9', figsize=(15,10))
az_error_plot.set_xlabel('Azimuth [degrees]', fontsize=16)
az_error_plot.set_ylabel('Error [degrees]', fontsize=16)
az_error_plot.set_title('Error in azimuth between USNO and Pysolar', fontsize=16)
az_error_plot.set_xlim(0, 360)
Out[6]:
In [7]:
longitude_error_plot = df.plot('longitude', 'alt_error', 'longitude', 'az_error', marker='.', linestyle='', color='#2980B9', figsize=(15,10))
longitude_error_plot.set_xlabel('Longitude [degrees]', fontsize=16)
longitude_error_plot.set_ylabel('Error [degrees]', fontsize=16)
longitude_error_plot.set_title('Error between USNO and Pysolar as a function of longitude', fontsize=16)
longitude_error_plot.set_xlim(0, 360)
Out[7]:
In [8]:
latitude_error_plot = df.plot('latitude', 'alt_error', 'latitude', 'az_error', marker='.', linestyle='', color='#2980B9', figsize=(15,10))
latitude_error_plot.set_xlabel('Latitude [degrees]', fontsize=16)
latitude_error_plot.set_ylabel('Error [degrees]', fontsize=16)
latitude_error_plot.set_title('Error between USNO and Pysolar as a function of latitude', fontsize=16)
latitude_error_plot.set_xlim(-90, 90)
Out[8]:
It may appear from the graph above that the latitude errors are worse in the northern hemisphere. That's not the case; we've just gathered more data from the northern hemisphere because we didn't know how to retrieve data for the southern hemisphere from the USNO website until late 2013. At some point, we'll rerun the data-gathering script with points evenly distributed in both hemispheres.
In [ ]: