Add pvl_robustfit#4
Conversation
Added pvl_robustfit.m to provide an option for pvl_desoto_parameter_estimation and pvl_PVsyst_parameter_estimation that doesn’t rely on the Matlab Statistics Toolbox. Added py_rlm.py which is the Python code used if the Statistics Toolbox is not present.
Add new function
change ACPower(ACPower<Ps0)= -1.*abs(Pnt); to ACPower(DCPower<Ps0)= -1.*abs(Pnt);
|
Ok I'm learning this Github thing. Closing this pull request so I can bundle it with some other commits I've made. |
|
Oh wait it's already found and included my three commits. |
|
Assuming one does not have that stats MATLAB toolbox installed, does pvl_robustfit require a particular python package? If so, is the package specified? Such that the users can ensure that they have the appropriate package. |
|
Pvl_robustfit using the Matlab robustfit function if its available. Otherwise, if a python installation is found, the code launches a python process that uses a function in the python statsmodels package. The comments in the pvl_robustfit.m code identify these requirements. From: DanRiley [mailto:notifications@github.com] Assuming one does not have that stats MATLAB toolbox installed, does pvl_robustfit require particular python package? If so, is the package specified? Such that the users can ensure that they have the appropriate package. — |
Initial upload
Execution is much faster with GHI data at equally spaced time stamps
|
I've uploaded code for the clear-sky GHI detection algorithm. It operates on GHI and a clear sky model. |
|
Sweet! Some thoughts regarding the clear sky detection algorithm... It will probably come as no surprise that, at least for Python, I'd prefer a simple function that's independent of Location (see e.g. pvlib/pvlib-python#199). In the interest of consistency between libraries, I'll propose there could be two matlab functions: pvl_detect_clear_times (just core algorithm) and pvl_detect_clear_times_location. Here's what I'm thinking for Python: detect_clear_times(ghi, ghi_clearsky, elevation, win_length, sample_interval)
# automatically calculates clear sky, solar position
Location.detect_clear_times(ghi, win_length, sample_interval, clearsky_model=ineichen)The existing pvl_detect_clear_times function has no way of allowing a user to start with measured turbidity/pw/aod. Using measured data may make the simple scaling parameter more robust and reduce the need for the "more refined calibrations". My proposed detect_clear_times function would allow the user make the ghi_clearsky data however he/she chooses. Making the same work in my Location.detect_clear_times method would need some keyword argument trickery that I have to think more about. I would lean towards keyword arguments instead of hardcoded thresholds in Python. |
|
Good input, Will. I like all of your suggestions. |
pvl_detect_shadows identifies shadows from nearby objects such as wires and poles in a time series of GHI data.
Added pvl_robustfit.m to provide an option for
pvl_desoto_parameter_estimation and pvl_PVsyst_parameter_estimation that
doesn’t rely on the Matlab Statistics Toolbox. Added py_rlm.py which is
the Python code used if the Statistics Toolbox is not present.
Added parameter estimation for the Huld model.
Correction to the SNL inverter model.