-
Notifications
You must be signed in to change notification settings - Fork 1.1k
spa license fixes #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2f910ec
remove nrel spa.c and .h files
wholmgren 50302c9
allow for missing spa files
wholmgren a49b496
allow for missing spa files in tests
wholmgren e8da440
add pyephem to dependencies
wholmgren 75d8f5d
update cython code for 08-SEP-2014 version of nrel spa
wholmgren f2458d0
updated spa readme
wholmgren d7855e5
add .md to readme
wholmgren 4736aad
add spa sources to .gitignore
wholmgren ca2ba81
fix readme typos
wholmgren 26e97d9
update top level readme with spa install directions
wholmgren 68512b2
fix install instruction
wholmgren 7b3a6cc
update readme and whatsnew
wholmgren 67972e0
fix numbering
wholmgren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
README | ||
------ | ||
|
||
NREL provides a C implementation of the solar position algorithm | ||
described in | ||
[Reda, I.; Andreas, A. (2003). Solar Position Algorithm for Solar Radiation Applications. 55 pp.; NREL Report No. TP-560-34302]( | ||
http://www.nrel.gov/docs/fy08osti/34302.pdf). | ||
|
||
This folder contains the files required to make NREL's C code accessible | ||
to the ``pvlib-python`` package. We use the Cython package to wrap NREL's SPA | ||
implementation. | ||
|
||
** Due to licensing issues, you must download the NREL C files from their | ||
[website](http://www.nrel.gov/midc/spa) ** | ||
|
||
Download the ``spa.c`` and ``spa.h`` files from NREL, | ||
and copy them into the ``pvlib/spa_c_files`` directory. | ||
|
||
There are a total of 5 files needed to compile the C code, described below: | ||
|
||
* ``spa.c``: original C code from NREL | ||
* ``spa.h``: header file for spa.c | ||
* ``cspa_py.pxd``: a cython header file which essentially tells cython which parts of the main header file to pay attention to | ||
* ``spa_py.pyx``: the cython code used to define both functions in the python namespace. NOTE: It is possible to provide user access to other paramters of the SPA algorithm through modifying this file | ||
* ``setup.py``: a distutils file which performs the compiling of the cython code | ||
|
||
The cython compilation process produces two files: | ||
* ``spa_py.c``: an intermediate cython c file | ||
* ``spa_py.so``: the python module which can be imported into a namespace | ||
|
||
To process the original 5 files, | ||
use the following shell command inside this folder | ||
|
||
$ python setup.py build_ext --inplace |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
pvlib/spa_c_files/spa_py.so
should be removed from the repo and also be added to the ignore file (also because the SPA tests are passing before SPA is installed!)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I'll fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, on second thought I already removed the file and line 10 of
.gitignore
is*.so
. You may be seeing the file because of some git oddity when switching between branches.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I see. Sorry that I was causing this confusion. The problem that the
so
will stay in the file structure exists, because it is ignored and will stay at its place, if you switch branches.