Skip to content
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

clearsky.py requires scipy.io #13

Closed
wholmgren opened this issue Mar 2, 2015 · 6 comments
Closed

clearsky.py requires scipy.io #13

wholmgren opened this issue Mar 2, 2015 · 6 comments
Assignees
Milestone

Comments

@wholmgren
Copy link
Member

Scipy either needs to be added to the setup.py file or we need to wrap the scipy statement with try/except and then throw a warning about reduced usability.

I would lean towards the latter as scipy installation is much more difficult than numpy and pandas. Best would be to remove the scipy.io dependency entirely.

@bmu
Copy link
Contributor

bmu commented Mar 2, 2015

Recent matlab files should be hdf5 based (see this question on SO). So maybe we could simply update this file and read it with pd.read_hdf (Seems not to work with the current file, so maybe this is created with an older matlab version).

@wholmgren
Copy link
Member Author

Looks like it's matlab 5.

$ head pvlib/data/LinkeTurbidities.mat 
MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Mon Jul 16 10:16:10 2012

I checked the PVLIB 1.2 release and it's the same. I think that the ideal situation would be for both the matlab and python projects to use the same .h5 file. Maybe this could be a part of the work going into #3.

@robwandrews
Copy link
Contributor

Yes, I think the best would be for us to lead in translating this into a more portable file format, best case would be a .csv that can then be read with standard techniques (as this is just a 2D array). Any takers? In the near term, @wholmgren , could you add scipy.io to the setup.py to make sure we're internally consistent?

@wholmgren
Copy link
Member Author

Yes, but I would prefer to go with something like

try: 
    import scipy.io
except ImportError:
    raise(ImportError, 'You must install scipy to automatically load the Linke Turbidities')

right before line 137.

@bmu bmu added this to the 0.1 milestone Mar 12, 2015
@wholmgren wholmgren self-assigned this Mar 12, 2015
@robwandrews
Copy link
Contributor

Sounds good to me

@bmu
Copy link
Contributor

bmu commented Mar 20, 2015

I close this for 0.1 in favor of #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants