Skip to content

Commit bf88e3c

Browse files
author
Daniel Lassahn
committed
Linter optimisation
1 parent 0749c55 commit bf88e3c

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

pvlib/solarposition.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,15 +1502,19 @@ def spencer_mc(times, latitude, longitude):
15021502
day_time = (julians_2000 % 1) * 24
15031503

15041504
# Eccentricity: correction factor of the earth's orbit.
1505-
eccentricity = (1.00011 + 0.034221 * cos_gamma[0] + 0.001280 *
1506-
sin_gamma[0] + 0.000719 * cos_gamma[1] + 0.000077 *
1507-
sin_gamma[1])
1505+
eccentricity = 1.00011 + 0.034221 * cos_gamma[0]
1506+
eccentricity += 0.001280 * sin_gamma[0]
1507+
eccentricity += 0.000719 * cos_gamma[1]
1508+
eccentricity += 0.000077 * sin_gamma[1]
15081509

15091510
declination = np.array(declination_spencer71(times.dayofyear))
15101511

15111512
# Equation of time (difference between standard time and solar time).
1512-
eot = (0.000075 + 0.001868 * cos_gamma[0] - 0.032077 * sin_gamma[0] -
1513-
0.014615 * cos_gamma[1] - 0.040849 * sin_gamma[1]) * 229.18
1513+
eot = 0.000075 + 0.001868 * cos_gamma[0]
1514+
eot -= 0.032077 * sin_gamma[0]
1515+
eot -= 0.014615 * cos_gamma[1]
1516+
eot -= 0.040849 * sin_gamma[1]
1517+
eot *= 229.18
15141518

15151519
# True local time
15161520
tlt = (day_time + longitude / 15 + eot / 60) % 24 - 12

pvlib/test/test_solarposition.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,8 @@ def test_spencer_mc():
759759
latitude = 48.367073
760760
longitude = 10.868378
761761
to_test = solarposition.spencer_mc(times,
762-
latitude,
763-
longitude)
762+
latitude,
763+
longitude)
764764
np.testing.assert_array_almost_equal(
765765
to_test.zenith.values,
766766
np.array(

0 commit comments

Comments
 (0)