-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
I think we should reorder a handful of function arguments to put the most variable-like arguments first and most parameter-like arguments last. I'm guessing that a lot people will think that I'm just screwing with the API for no reason, but I do have a few reasons!
- consistency is important (and underrated)
- we can make better use of default arguments.
Here are the functions that I know about so far:
ashraeiam(b, aoi) ---> ashraeiam(aoi, b=0.05)
# updated to reflect Cliff's comment below
physicaliam(K, L, n, aoi) ---> physicaliam(aoi, n=1.526, K=4., L=0.002)
# see #200
singlediode(module, photocurrent, saturation_current, resistance_series, resistance_shunt, nNsVth) --->
singlediode(photocurrent, saturation_current, resistance_series, resistance_shunt, nNsVth)
# I just noticed that the matlab sapm api is very different. # see #198
sapm(module, poa_direct, poa_diffuse, temp_cell, airmass_absolute, aoi) --->
sapm(poa_direct, poa_diffuse, temp_cell, airmass_absolute, aoi, module)
snlinverter(inverter, v_dc, p_dc) ---> snlinverter(v_dc, p_dc, inverter)