Skip to content

Conversation

@wholmgren
Copy link
Member

@wholmgren wholmgren commented Sep 11, 2018

  • Closes incorrect horizon test in tracker.singleaxis #569
  • I am familiar with the contributing guidelines.
  • Fully tested. Added and/or modified tests to ensure correct behavior for all reasonable inputs. Tests (usually) must pass on the TravisCI and Appveyor testing services.
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate docs/sphinx/source/whatsnew file for all changes.
  • Code quality and style is sufficient. Passes LGTM and SticklerCI checks.
  • New code is fully documented. Includes sphinx/numpydoc compliant docstrings and comments in the code where necessary.
  • Pull request is nearly complete and ready for detailed review.

I punted on the question of nan/0.

Would also be nice to remove the requirement that input data be series. Yuck. Now accepts scalar/1d input

@wholmgren wholmgren added the bug label Sep 11, 2018
@wholmgren wholmgren added this to the 0.6.0 milestone Sep 11, 2018
expect = pd.DataFrame({'tracker_theta': 0, 'aoi': 10,
'surface_azimuth': 90, 'surface_tilt': 0},
index=[0], dtype=np.float64)
index=index, dtype=np.float64)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E127 continuation line over-indented for visual indent

apparent_azimuth = np.array([[180, 180], [180, 180]])
with pytest.raises(ValueError):
tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth,
axis_tilt=0, axis_azimuth=0,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

with pytest.raises(ValueError):
tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth,
axis_tilt=0, axis_azimuth=0,
max_angle=90, backtrack=True,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

tracker_data = tracking.singleaxis(apparent_zenith, apparent_azimuth,
axis_tilt=0, axis_azimuth=0,
max_angle=90, backtrack=True,
gcr=2.0/7.0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E128 continuation line under-indented for visual indent

@wholmgren wholmgren changed the title fix singleaxis horizon test fix incorrect nan assignments in singleaxis, allow scalar and 1d array input Sep 11, 2018
@wholmgren wholmgren requested a review from cwhanse September 12, 2018 01:10
# filter for sun above panel horizon
wid[zp <= 0] = np.nan
zen_gt_90 = apparent_zenith > 90
wid[apparent_zenith > 90] = np.nan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean wid[zen_gt_90] = np.nan?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks

@wholmgren wholmgren merged commit e1dacb2 into pvlib:master Sep 12, 2018
@wholmgren wholmgren deleted the sattilt branch September 12, 2018 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants