-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ENH: allow user to specify the scaling of singlediode ivcurve-pnts or a specify an array, series, or sequence #418
Comments
Idea 1 - use keyword arguments maybe. V is most commonly used, I believe. Idea 2 - I'm ok with this as an optional argument. I'd default to log (natural log) of V. |
I would suggest providing any options you can think of since this is kind of a do-it-all function. Maybe even accept a list of V or I values (fractions of Voc and Isc). |
I think @adriesse makes a good point. I also think we'd be better off in the long run if we moved this functionality from |
I'm working on this issue and would appreciate any reactions to this addition of a kwarg |
I would be slightly more in favor of reusing try:
voltages = iter(ivcurve_pnts):
except TypeError:
voltages = None
else:
ivcurve_pnts = None This works for all combinations: ivcurve_pnts = None # -> voltages=None, ivcurve_pnts=None
ivcurve_pnts = 123 # -> voltages=None, ivcurve_pnts=123 (also works if x=0)
ivcurve_pnts = [1, 2, 3] # -> voltages=<list_iterator>, ivcurve_pnts=None
ivcurve_pnts = range(100) # voltages=<range_iterator>, ivcurve_pnts=None then either iterate over voltages or if needed call |
I thought the same but got stuck on the case when |
I still think this function is a mess and should be broken up into smaller pieces. |
Maybe I was a bit quick to thumbs up. Is the mess in |
That certainly doesn't help the situation, but my main complaint is that the function is supposed to do two different things: 1. calculate the 7 special points on the IV curve and 2. arbitrary points on the IV curve. The fact that the returned dict keys are different depending on the inputs is an indication that the API is not good. It also has some handling for time series that seems like a bad fit. |
What behavior would be expected from
Agree, this should be addressed.
Yes. And the if/then language in the Notes seems an obtuse way to describe the built-in spacing in points. |
I think it should means 5 points, and perhaps
me neither |
As a (non-typical) user I'm happy calling the bishop88 functions as often as necessary to get what I need. And I never seem to need more than 3 of the "typical 5" points. In general I don't see any problem having two or more separate (wrapper) functions that each give a curve, 5 points, or some other useful output combination. |
This idea also came up somewhere in #409 or #410. Currently the
singlediode
ivcurve_pnts
takes the following according to docstring:idea 1:
In addition let the user specify a sequence. Should it be sorted? Which values do they correspond to, I, V or Vd? IMO we should sort and scale them to the max value, and then multiply by Voc to keep them in the 1st quadrant.
idea 2:
Add another argument like
ivcurve_scale
which could be'log'
or'linear'
or other? IMO the default should be a log scaleOther ideas? Yea or Nay?
The text was updated successfully, but these errors were encountered: