Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def irradiance_rescale(clearsky_poa_unscaled, poa, rescale_poa, method):
if rescale_poa:
clearsky_poa = normalization.irradiance_rescale(
poa, clearsky_poa_unscaled, method=method
)
else:
clearsky_poa = clearsky_poa_unscaled
return clearsky_poa